git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e464e40
)
ldb:tests: Add missing size check for tdb
author
Andreas Schneider
<asn@samba.org>
Thu, 5 Dec 2019 16:15:01 +0000
(17:15 +0100)
committer
Andreas Schneider
<asn@cryptomilk.org>
Fri, 6 Dec 2019 09:12:26 +0000
(09:12 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
lib/ldb/tests/ldb_kv_ops_test.c
patch
|
blob
|
history
diff --git
a/lib/ldb/tests/ldb_kv_ops_test.c
b/lib/ldb/tests/ldb_kv_ops_test.c
index 03711c9eeb383600072cba4e8af60e72cdb84fe5..67e785ab59944231a0d2611cadb81108f5809fc7 100644
(file)
--- 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);
}