From: Andreas Schneider Date: Thu, 5 Dec 2019 16:15:01 +0000 (+0100) Subject: ldb:tests: Add missing size check for tdb X-Git-Tag: ldb-2.1.0~407 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9323b5c50042738b4afbea3dc0db0ddbc096f99c;p=thirdparty%2Fsamba.git ldb:tests: Add missing size check for tdb Signed-off-by: Andreas Schneider Reviewed-by: Gary Lockyer --- diff --git a/lib/ldb/tests/ldb_kv_ops_test.c b/lib/ldb/tests/ldb_kv_ops_test.c index 03711c9eeb3..67e785ab599 100644 --- a/lib/ldb/tests/ldb_kv_ops_test.c +++ b/lib/ldb/tests/ldb_kv_ops_test.c @@ -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); }