]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/test/run-3G-file.c
tests: now we run in tmp dir, always create temporary files in this dir.
[ccan] / ccan / tdb / test / run-3G-file.c
index ba858c4d59fce5afe7ce047bc2eac89fa2750e17..ea395a9c35bdbdef76ae5abf06f72b689ff1737c 100644 (file)
@@ -10,6 +10,7 @@
 #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>
@@ -49,9 +50,7 @@ static const struct tdb_methods large_io_methods = {
        tdb_write,
        tdb_next_hash_chain,
        tdb_oob,
-       tdb_expand_file_sparse,
-       tdb_brlock,
-       tdb_brunlock
+       tdb_expand_file_sparse
 };
 
 static int test_traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
@@ -71,10 +70,10 @@ int main(int argc, char *argv[])
        TDB_DATA key, orig_data, data;
        uint32_t hash;
        tdb_off_t rec_ptr;
-       struct list_struct rec;
+       struct tdb_record rec;
 
        plan_tests(24);
-       tdb = tdb_open("/tmp/test.tdb", 1024, TDB_CLEAR_IF_FIRST,
+       tdb = tdb_open("run-36-file.tdb", 1024, TDB_CLEAR_IF_FIRST,
                       O_CREAT|O_TRUNC|O_RDWR, 0600);
 
        ok1(tdb);