<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/ldb/tests, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>lib:ldb:tests: Fix memory leaks in ldb_lmdb_free_list_test</title>
<updated>2025-10-29T12:18:43+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2024-10-14T13:52:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f7812173e40b7c5a019ddfd6cc331a5c5d473611'/>
<id>f7812173e40b7c5a019ddfd6cc331a5c5d473611</id>
<content type='text'>
Found by Leak Sanitizer

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Wed Oct 29 12:18:43 UTC 2025 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found by Leak Sanitizer

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Wed Oct 29 12:18:43 UTC 2025 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:ldb:tests: Avoid memory leaks in ldb_kv_ops test</title>
<updated>2025-10-29T11:14:31+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2024-10-14T13:33:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b6bcd39986b6332569335de4bbcfa3a66b4ac559'/>
<id>b6bcd39986b6332569335de4bbcfa3a66b4ac559</id>
<content type='text'>
Detected by Leak Sanitizer.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Detected by Leak Sanitizer.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing include needed for cmocka.h</title>
<updated>2025-10-17T11:12:29+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2025-08-07T08:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=50604bc027c3d053cafd803ff515e6da881e79a5'/>
<id>50604bc027c3d053cafd803ff515e6da881e79a5</id>
<content type='text'>
This will be required in future.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be required in future.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ldb: remove unused test-sqlite3.sh</title>
<updated>2025-03-05T02:37:39+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-03-04T00:00:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=92078188efeefc4f657b0dabb05a2971227fad4e'/>
<id>92078188efeefc4f657b0dabb05a2971227fad4e</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&gt;
Reviewed-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Jennifer Sutton &lt;jennifersutton@catalyst.net.nz&gt;
Reviewed-by: Martin Schwenke &lt;mschwenke@ddn.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ldb:tests: add tests ensuring indexes don't change search results</title>
<updated>2024-12-19T23:00:32+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2024-08-17T01:34:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9754980b03fcb740a4bfa7b098b991e53cd67157'/>
<id>9754980b03fcb740a4bfa7b098b991e53cd67157</id>
<content type='text'>
The index code (lib/ldb_key_value/ldb_kv_index.c) recapitulates LDB
expression logic, and it seemed less than completely obvious that it
would never make a mistake and return a different result than an
unindexed search.

Here we run the same search on an unindexed database and on some that
have been indexed with a variety of options. We assert that the
results are identical over a number of searches.

By default, when run from the command line, that number is 495161,
which takes a couple of minutes. But if the SKIP_SLOW_TESTS
environment variable is set, the number is 33569, which takes 20
seconds or so. In selftest we set the variable and run the smaller
number.

The tests will print the cumulative search time for each database for
each testsuite, like this:

$ python3 lib/ldb/tests/python/index_transparency.py
..........................................................[...]
&lt;class '__main__.SearchTest'&gt;
25.78186821937561 &lt;ldb connection tdb:///tmp/tmpf1x72x7l/tdb-indexed-dn.ldb&gt;
17.73349642753601 &lt;ldb connection tdb:///tmp/tmpf1x72x7l/tdb-half-indexed.ldb&gt;
15.14864206314087 &lt;ldb connection tdb:///tmp/tmpf1x72x7l/tdb-indexed-guid.ldb&gt;
13.107165575027466 &lt;ldb connection mdb:///tmp/tmpf1x72x7l/mdb-indexed.ldb&gt;

Like all benchmarks it is interesting but misleading. One caveat here
is that you have (probably) compiled tdb in developer mode without
optimisation, while lmdb is probably a system package compiled with -O2,
though perhaps not tuned to your exact architecture.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The index code (lib/ldb_key_value/ldb_kv_index.c) recapitulates LDB
expression logic, and it seemed less than completely obvious that it
would never make a mistake and return a different result than an
unindexed search.

Here we run the same search on an unindexed database and on some that
have been indexed with a variety of options. We assert that the
results are identical over a number of searches.

By default, when run from the command line, that number is 495161,
which takes a couple of minutes. But if the SKIP_SLOW_TESTS
environment variable is set, the number is 33569, which takes 20
seconds or so. In selftest we set the variable and run the smaller
number.

The tests will print the cumulative search time for each database for
each testsuite, like this:

$ python3 lib/ldb/tests/python/index_transparency.py
..........................................................[...]
&lt;class '__main__.SearchTest'&gt;
25.78186821937561 &lt;ldb connection tdb:///tmp/tmpf1x72x7l/tdb-indexed-dn.ldb&gt;
17.73349642753601 &lt;ldb connection tdb:///tmp/tmpf1x72x7l/tdb-half-indexed.ldb&gt;
15.14864206314087 &lt;ldb connection tdb:///tmp/tmpf1x72x7l/tdb-indexed-guid.ldb&gt;
13.107165575027466 &lt;ldb connection mdb:///tmp/tmpf1x72x7l/mdb-indexed.ldb&gt;

Like all benchmarks it is interesting but misleading. One caveat here
is that you have (probably) compiled tdb in developer mode without
optimisation, while lmdb is probably a system package compiled with -O2,
though perhaps not tuned to your exact architecture.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ldb:test:lmdb_free_list: s/the the/to the/ in comment</title>
<updated>2024-11-06T10:57:35+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2024-09-13T02:31:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a909db027ff17d5feb8e071cca5e0b7a7440514b'/>
<id>a909db027ff17d5feb8e071cca5e0b7a7440514b</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ldb:test:api_search: shift remaining setUp adds to class add_index</title>
<updated>2024-09-24T10:38:03+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2024-08-29T00:52:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3d47fc749aef6822f11036ae3f93d11886c4f9bc'/>
<id>3d47fc749aef6822f11036ae3f93d11886c4f9bc</id>
<content type='text'>
Before:

ldb.python.api_search -&gt; 52
ldb.python.api_search.tr -&gt; 48

After:

ldb.python.api_search.tr -&gt; 10
ldb.python.api_search -&gt; 9

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Tue Sep 24 10:38:03 UTC 2024 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before:

ldb.python.api_search -&gt; 52
ldb.python.api_search.tr -&gt; 48

After:

ldb.python.api_search.tr -&gt; 10
ldb.python.api_search -&gt; 9

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Tue Sep 24 10:38:03 UTC 2024 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>ldb:test:api_search: remove pass-through setUp()s</title>
<updated>2024-09-24T09:14:39+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2024-08-29T00:39:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=45137017af3860be31f974c711e96efa95d6b61c'/>
<id>45137017af3860be31f974c711e96efa95d6b61c</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ldb:test:api_search: use @unittest.skipIf for LMDB tests</title>
<updated>2024-09-24T09:14:39+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2024-08-29T00:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=1871eb9d1cbc94c2a429f7db630e4b124f49a0ed'/>
<id>1871eb9d1cbc94c2a429f7db630e4b124f49a0ed</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>ldb:test:api_search: skip LMDB tests at class level</title>
<updated>2024-09-24T09:14:39+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2024-08-29T00:23:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=235c7d15ef516685d86763229fed7803805ad272'/>
<id>235c7d15ef516685d86763229fed7803805ad272</id>
<content type='text'>
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 &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</pre>
</div>
</content>
</entry>
</feed>
