1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

ldb:tests: Add missing size check for tdb

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
This commit is contained in:
Andreas Schneider 2019-12-05 17:15:01 +01:00 committed by Andreas Schneider
parent e464e40c97
commit 9323b5c500

View File

@ -1739,6 +1739,12 @@ static void test_get_size(void **state)
size = ldb_kv->kv_ops->get_size(ldb_kv);
#ifdef TEST_LMDB
assert_int_equal(3, size);
#else
/*
* The tdb implementation of get_size over estimates for sparse files
* which is perfectly acceptable for it's intended use.
*/
assert_in_range(size, 2500, 5000);
#endif
talloc_free(tmp_ctx);
}