strsplit: remove nump argument
[ccan] / ccan / tdb / test / run-nested-transactions.c
index 5c1ecfcd23e26f874bf7dc64c620c06a77fcec77..d13977ca8ae7bc1addb7a439aa575f6a95c9274b 100644 (file)
@@ -1,17 +1,21 @@
 #define _XOPEN_SOURCE 500
-#include "tdb/tdb.h"
-#include "tdb/io.c"
-#include "tdb/tdb.c"
-#include "tdb/lock.c"
-#include "tdb/freelist.c"
-#include "tdb/traverse.c"
-#include "tdb/transaction.c"
-#include "tdb/error.c"
-#include "tdb/open.c"
-#include "tap/tap.h"
+#include <ccan/tdb/tdb.h>
+#include <ccan/tdb/io.c>
+#include <ccan/tdb/tdb.c>
+#include <ccan/tdb/lock.c>
+#include <ccan/tdb/freelist.c>
+#include <ccan/tdb/traverse.c>
+#include <ccan/tdb/transaction.c>
+#include <ccan/tdb/error.c>
+#include <ccan/tdb/open.c>
+#include <ccan/tdb/check.c>
+#include <ccan/tdb/hash.c>
+#include <ccan/tap/tap.h>
 #include <stdlib.h>
 #include <stdbool.h>
 #include <err.h>
+#include "logging.h"
+
 int main(int argc, char *argv[])
 {
        struct tdb_context *tdb;
@@ -21,8 +25,9 @@ int main(int argc, char *argv[])
        key.dsize = strlen("hi");
        key.dptr = (void *)"hi";
 
-       tdb = tdb_open("/tmp/test4.tdb", 1024, TDB_CLEAR_IF_FIRST,
-                      O_CREAT|O_TRUNC|O_RDWR, 0600);
+       tdb = tdb_open_ex("run-nested-transactions.tdb",
+                         1024, TDB_CLEAR_IF_FIRST,
+                         O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL);
        ok1(tdb);
 
        /* No nesting by default. */
@@ -48,7 +53,8 @@ int main(int argc, char *argv[])
        free(data.dptr);
        tdb_close(tdb);
 
-       tdb = tdb_open("/tmp/test4.tdb", 1024, TDB_ALLOW_NESTING, O_RDWR, 0);
+       tdb = tdb_open_ex("run-nested-transactions.tdb",
+                         1024, TDB_ALLOW_NESTING, O_RDWR, 0, &taplogctx, NULL);
        ok1(tdb);
 
        ok1(tdb_transaction_start(tdb) == 0);