#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 <stdbool.h>
#include <err.h>
ok1(tdb_store(tdb, key, data, TDB_INSERT) == 0);
- ok1(external_agent_transaction(agent, tdb_name(tdb)));
+ ok1(external_agent_operation(agent, TRANSACTION, tdb_name(tdb)));
ok1(tdb_transaction_start(tdb) == 0);
- ok1(!external_agent_transaction(agent, tdb_name(tdb)));
+ ok1(!external_agent_operation(agent, TRANSACTION, tdb_name(tdb)));
tdb_traverse(tdb, traverse, NULL);
/* That should *not* release the transaction lock! */
- ok1(!external_agent_transaction(agent, tdb_name(tdb)));
+ ok1(!external_agent_operation(agent, TRANSACTION, tdb_name(tdb)));
tdb_traverse_read(tdb, traverse, NULL);
/* That should *not* release the transaction lock! */
- ok1(!external_agent_transaction(agent, tdb_name(tdb)));
+ ok1(!external_agent_operation(agent, TRANSACTION, tdb_name(tdb)));
ok1(tdb_transaction_commit(tdb) == 0);
/* Now we should be fine. */
- ok1(external_agent_transaction(agent, tdb_name(tdb)));
+ ok1(external_agent_operation(agent, TRANSACTION, tdb_name(tdb)));
tdb_close(tdb);