]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/test/run-missing-entries.c
tdb2: test: fix run-57-die-during-transaction.c to be more efficient.
[ccan] / ccan / tdb2 / test / run-missing-entries.c
index bd5127dda2565d3a792540dec8fd841a2a411eb2..22d6ba4270af6b22277fc8aa2356b82039c19f41 100644 (file)
@@ -1,11 +1,5 @@
+#include "tdb2-source.h"
 /* Another test revealed that we lost an entry.  This reproduces it. */
 /* Another test revealed that we lost an entry.  This reproduces it. */
-#include <ccan/tdb2/tdb.c>
-#include <ccan/tdb2/free.c>
-#include <ccan/tdb2/lock.c>
-#include <ccan/tdb2/io.c>
-#include <ccan/tdb2/hash.c>
-#include <ccan/tdb2/check.c>
-#include <ccan/tdb2/traverse.c>
 #include <ccan/tap/tap.h>
 #include "logging.h"
 
 #include <ccan/tap/tap.h>
 #include "logging.h"
 
@@ -25,7 +19,7 @@ int main(int argc, char *argv[])
        struct tdb_data key = { (unsigned char *)&i, sizeof(i) };
        struct tdb_data data = { (unsigned char *)&i, sizeof(i) };
        union tdb_attribute hattr = { .hash = { .base = { TDB_ATTRIBUTE_HASH },
        struct tdb_data key = { (unsigned char *)&i, sizeof(i) };
        struct tdb_data data = { (unsigned char *)&i, sizeof(i) };
        union tdb_attribute hattr = { .hash = { .base = { TDB_ATTRIBUTE_HASH },
-                                               .hash_fn = failhash } };
+                                               .fn = failhash } };
 
        hattr.base.next = &tap_log_attr;
        plan_tests(1 + 2 * NUM_RECORDS + 1);
 
        hattr.base.next = &tap_log_attr;
        plan_tests(1 + 2 * NUM_RECORDS + 1);