X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Ftest%2Frun-nested-transactions.c;h=f8fd05497de6cc264b84d468b13e647b54206ca1;hp=b39833638b416e1d4bedde3f29f4ae30d6b8e726;hb=655ef777da34bae1ec992503d754e607d6cebf8c;hpb=735980539f488d6f6299ec710f4045abbb104d46 diff --git a/ccan/tdb/test/run-nested-transactions.c b/ccan/tdb/test/run-nested-transactions.c index b3983363..f8fd0549 100644 --- a/ccan/tdb/test/run-nested-transactions.c +++ b/ccan/tdb/test/run-nested-transactions.c @@ -13,6 +13,8 @@ #include #include #include +#include "logging.h" + int main(int argc, char *argv[]) { struct tdb_context *tdb; @@ -22,8 +24,9 @@ int main(int argc, char *argv[]) key.dsize = strlen("hi"); key.dptr = (void *)"hi"; - tdb = tdb_open("run-nested-transactions.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. */ @@ -49,7 +52,8 @@ int main(int argc, char *argv[]) free(data.dptr); tdb_close(tdb); - tdb = tdb_open("run-nested-transactions.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);