X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Ftest%2Frun-nested-transactions.c;h=d13977ca8ae7bc1addb7a439aa575f6a95c9274b;hp=50da919e24001db187bd17d1cee3d997ef8125e3;hb=100444225380d3f5ca29424ea54703d308c7c651;hpb=39357f4e89f4ac02eb11861812cbfc67b4f1d4ef diff --git a/ccan/tdb/test/run-nested-transactions.c b/ccan/tdb/test/run-nested-transactions.c index 50da919e..d13977ca 100644 --- a/ccan/tdb/test/run-nested-transactions.c +++ b/ccan/tdb/test/run-nested-transactions.c @@ -8,10 +8,14 @@ #include #include #include +#include +#include #include #include #include #include +#include "logging.h" + int main(int argc, char *argv[]) { struct tdb_context *tdb; @@ -21,8 +25,9 @@ int main(int argc, char *argv[]) key.dsize = strlen("hi"); key.dptr = (void *)"hi"; - tdb = tdb_open("/tmp/test4.tdb", 1024, TDB_CLEAR_IF_FIRST, - O_CREAT|O_TRUNC|O_RDWR, 0600); + tdb = tdb_open_ex("run-nested-transactions.tdb", + 1024, TDB_CLEAR_IF_FIRST, + O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL); ok1(tdb); /* No nesting by default. */ @@ -48,7 +53,8 @@ int main(int argc, char *argv[]) free(data.dptr); tdb_close(tdb); - tdb = tdb_open("/tmp/test4.tdb", 1024, TDB_ALLOW_NESTING, O_RDWR, 0); + tdb = tdb_open_ex("run-nested-transactions.tdb", + 1024, TDB_ALLOW_NESTING, O_RDWR, 0, &taplogctx, NULL); ok1(tdb); ok1(tdb_transaction_start(tdb) == 0);