IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Maybe Coverity understands that talloc_realloc re-allocates the input
buf. It does not understand that talloc_realloc_size does it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Sometime proxy dns servers mess up the case of parts of the
name...
So we should match with strequal() instead of strcmp(),
which results in much less dns packets on the wire...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Sep 29 08:09:46 UTC 2024 on atb-devel-224
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sat Sep 28 01:20:01 UTC 2024 on atb-devel-224
We want to avoid that the optimizer will use stack allocations. This way
the test should be a bit more realistic.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
If the speed test gets optimized, the malloc() and free() might be
replaced by stack allocations.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15643
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Sep 27 09:06:43 UTC 2024 on atb-devel-224
It should be off by default, as this is not needed by default. It
crashes named on startup, if bind is built with jemalloc support.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15643
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
We should build with lmdb support also if it is not in AD case. The lmdb
backend is also used e.g. by sssd.
If you don't want to build it, you can always specify --without-ldb-lmdb
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15721
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep 25 05:36:13 UTC 2024 on atb-devel-224
LMDB is not going to turn up midway through the testsuite, so we might
as well skip the whole class
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
The index attribute of these classes was a mutable object, which made
me nervous. If a subclass were to alter the class.index (rather than
replace it), it would affect tests in other subclasses.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
The api_search tests are really slow, in part because we populate the
database identically for all the individual tests. We can instead do
it once and use copies.
This makes the test several times faster.
Comparing "make test TESTS=ldb.python":
Before:
TOP 10 slowest tests
ldb.python.api_search.tr -> 415
ldb.python.api_search -> 413
ldb.python.api_add_modify -> 5
ldb.python.api_add_modify.tr -> 4
ldb.python.index.tr -> 4
ldb.python.index -> 4
ldb.python.api_simple.tr -> 2
ldb.python.api_simple -> 2
ldb.python.repack -> 2
ldb.python.api_misc.tr -> 1
'testonly' finished successfully (14m13.276s)
After:
TOP 10 slowest tests
ldb.python.api_search.tr -> 52
ldb.python.api_search -> 50
ldb.python.api_add_modify -> 7
ldb.python.api_add_modify.tr -> 7
ldb.python.index.tr -> 4
ldb.python.index -> 4
ldb.python.api_simple -> 4
ldb.python.api_simple.tr -> 2
ldb.python.repack -> 2
ldb.python.api_misc -> 1
'testonly' finished successfully (2m14.505s)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This will help enusre we are using the right DB when (in the next
commit) we set up the database for each test via copy. It also helps
with debugging.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
This makes them available to class methods.
In a later commit we will convert the index attribute into an
add_index() class method, because having a mutable variable on a class
is a slightly bad idea.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
`list = res.msgs` tests nothing more than a bare `res.msgs`,
and we can instead assert that the result is a list.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
`self.assertRaises(TypeError, ldb.Control, ldb, 1234)` is raising a
TypeError because `ldb` is not an ldb.Ldb object, it is the ldb module.
What we want to test here is that the non-string `1234` raises a
TypeError -- the previous line tests the type of the ldb argument.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
super.tearDown() was removing the tmpdir, but because self.ldb had
the file open, the directory was not cleared.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
The result is exactly the same, unless we previously had the wrong
class name in the pass-through, in which case the result is *probably*
the same, only more correct.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
The point of this realloc is that we are not using this array, but
keeping it around to remain a node the talloc tree. We'd prefer to
reduce it to nothing.
Coverity rightly spotted that it was reallocing an array of `struct
ldb_val` to an array of `struct ldb_val *`, which has a different size
and all. But it doesn't matter in this case, because we will never use
it.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15590
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jennifer Sutton <josutton@catalyst.net.nz>
Suppose that ‘slen’ is equal to (size_t)-1. A few lines up, we had:
if (lastp != 0) goto slow_path;
Therefore, ‘lastp’ must evaluate to false.
Now suppose that ‘slen’ is not equal to (size_t)-1. In that case, we
would have executed:
if (slen != 0) goto slow_path;
Therefore, ‘slen’ must evaluate to false.
Consequently, this code can be seen to be unreachable.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>