ldb 2.1.2: test_get_size failure on ppc64el

Gary gary at catalyst.net.nz
Thu May 7 22:08:32 UTC 2020



On 8/05/20 6:16 am, Andreas Hasenack via samba-technical wrote:
> Hi,
> 
> I'm building ldb 2.1.2 on ubuntu groovy 20.10, along with all the
> other dependencies for samba 4.12.2, and I'm getting this test error
> on ppc64el only:
> 
> [ RUN      ] test_get_size
> [  ERROR   ] --- 13369 is not within the range 2500-5000
> [   LINE   ] --- ../../tests/ldb_kv_ops_test.c:1721: error: Failure!
> [  FAILED  ] test_get_size
> [==========] 13 test(s) run.
> [  PASSED  ] 12 test(s).
> [  FAILED  ] 1 test(s), listed below:
> [  FAILED  ] test_get_size
> 
> That assert use to be
> 
> assert_true( size > 2500);
> 
> but was changed to
> 
> assert_in_range(size, 2500, 5000);
> 
> in commit
> 
> commit e464e40c977cd6592240763c7dbb9c45ff16470f
> Author: Andreas Schneider <asn at samba.org>
> Date:   Thu Dec 5 17:14:31 2019 +0100
> 
>     ldb:tests: Use assert_in_range() in test_get_size()
> 
>     Signed-off-by: Andreas Schneider <asn at samba.org>
>     Reviewed-by: Gary Lockyer <gary at samba.org>
> 
> 
> Is that 5000 ceiling limit just a guess, or is this failure indicating
> a real bug somewhere? The value 13369 I got on ppc64el seems a bit
It's just a guess. for tdb we estimate the number of records with
#define RECORD_SIZE 500

static size_t ltdb_get_size(struct ldb_kv_private *ldb_kv)

{

    size_t map_size = tdb_map_size(ldb_kv->tdb);

    size_t size = map_size / RECORD_SIZE;


    return size;

}

This estimate gets used to size the in memory TDB used when re-indexing
the database.

So changing the test to assert_in_range(size, 2500, 20000);
Should be ok.

> excessive. On amd64, size is 2572, so it falls within that range.
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20200508/21b1fa76/signature.sig>


More information about the samba-technical mailing list