tdb: enforce hashing, via example hash in old rwlocks entry in header.
[ccan] / ccan / tdb / test / run-endian.c
index 8899296c2aeba6232093ee773218c480e92cbc31..9ee877dde5090a1bf3a1e550f75fb5cf0f9bacf8 100644 (file)
@@ -1,14 +1,15 @@
 #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/tap/tap.h>
 #include <stdlib.h>
 #include <err.h>
 
@@ -18,7 +19,7 @@ int main(int argc, char *argv[])
        TDB_DATA key, data;
 
        plan_tests(13);
-       tdb = tdb_open("/tmp/test.tdb", 1024, TDB_CLEAR_IF_FIRST|TDB_CONVERT,
+       tdb = tdb_open("run-endian.tdb", 1024, TDB_CLEAR_IF_FIRST|TDB_CONVERT,
                       O_CREAT|O_TRUNC|O_RDWR, 0600);
 
        ok1(tdb);
@@ -45,7 +46,7 @@ int main(int argc, char *argv[])
        tdb_close(tdb);
 
        /* Reopen: should read it */
-       tdb = tdb_open("/tmp/test.tdb", 1024, 0, O_RDWR, 0);
+       tdb = tdb_open("run-endian.tdb", 1024, 0, O_RDWR, 0);
        ok1(tdb);
        
        key.dsize = strlen("hi");