#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>
current = target = 0;
reset:
+ unlink(TEST_DBNAME);
+ tdb = tdb_open_ex(TEST_DBNAME, 1024, TDB_NOMMAP,
+ O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL);
+
if (setjmp(jmpbuf) != 0) {
/* We're partway through. Simulate our death. */
close(tdb->fd);
goto reset;
}
- unlink(TEST_DBNAME);
- tdb = tdb_open_ex(TEST_DBNAME, 1024, TDB_NOMMAP,
- O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL);
-
/* Put key for agent to fetch. */
key.dsize = strlen(KEY_STRING);
key.dptr = (void *)KEY_STRING;