#include <ccan/tap/tap.h>
#include <stdlib.h>
#include <err.h>
-#include "tdb1-logging.h"
+#include "logging.h"
#undef fcntl
data.dsize = strlen("world");
data.dptr = (void *)"world";
- if (tdb1_store(tdb, key, data, 0) != 0)
+ if (tdb_store(tdb, key, data, 0) != TDB_SUCCESS)
return false;
}
return true;
{
struct tdb_context *tdb;
int errors = 0;
+ union tdb_attribute hsize;
+
+ hsize.base.attr = TDB_ATTRIBUTE_TDB1_HASHSIZE;
+ hsize.base.next = &tap_log_attr;
+ hsize.tdb1_hashsize.hsize = 1024;
plan_tests(41);
- tdb = tdb1_open_ex("run-no-lock-during-traverse.tdb",
- 1024, TDB_DEFAULT, O_CREAT|O_TRUNC|O_RDWR,
- 0600, &taplogctx, NULL);
+ tdb = tdb_open("run-no-lock-during-traverse.tdb1",
+ TDB_VERSION1, O_CREAT|O_TRUNC|O_RDWR,
+ 0600, &hsize);
ok1(tdb);
ok1(prepare_entries(tdb));
ok1(locking_errors1 == 0);
ok1(tdb1_unlockall(tdb) == 0);
- ok1(tdb1_close(tdb) == 0);
+ ok1(tdb_close(tdb) == 0);
return exit_status();
}