X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Ftdb2%2Ftest%2Frun-tdb1-nested-transactions.c;h=6a13c13dedfdfa1f512b3fd8d2892717fb52e9d4;hb=a391b2b900bc6d5c0467869a454bdb5c51b5a3be;hp=f9891fe70da3b6d66bfabbf13edbba06b6866aab;hpb=8a47d50d72ea62e378dc92b150c92c1317c73fa3;p=ccan diff --git a/ccan/tdb2/test/run-tdb1-nested-transactions.c b/ccan/tdb2/test/run-tdb1-nested-transactions.c index f9891fe7..6a13c13d 100644 --- a/ccan/tdb2/test/run-tdb1-nested-transactions.c +++ b/ccan/tdb2/test/run-tdb1-nested-transactions.c @@ -15,10 +15,11 @@ int main(int argc, char *argv[]) key.dptr = (void *)"hi"; tdb = tdb1_open_ex("run-nested-transactions.tdb", - 1024, TDB1_CLEAR_IF_FIRST|TDB1_DISALLOW_NESTING, + 1024, TDB_DEFAULT, O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL); ok1(tdb); + /* No nesting by default. */ ok1(tdb1_transaction_start(tdb) == 0); data.dptr = (void *)"world"; data.dsize = strlen("world"); @@ -41,9 +42,8 @@ int main(int argc, char *argv[]) free(data.dptr); tdb1_close(tdb); - /* Allow nesting by default. */ tdb = tdb1_open_ex("run-nested-transactions.tdb", - 1024, TDB1_DEFAULT, O_RDWR, 0, &taplogctx, NULL); + 1024, TDB_ALLOW_NESTING, O_RDWR, 0, &taplogctx, NULL); ok1(tdb); ok1(tdb1_transaction_start(tdb) == 0);