diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-18 22:30:25 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-19 05:38:05 +0200 |
commit | cab6e116786641e28747de3f70c8cd89ba17673f (patch) | |
tree | e41622bfd16ed94a6bb67a91a409ac970a22c533 /lib/tdb2/test/run-57-die-during-transaction.c | |
parent | 6244f668a34279e6da62213333dfb32c3ccdb17d (diff) | |
download | samba-cab6e116786641e28747de3f70c8cd89ba17673f.tar.gz samba-cab6e116786641e28747de3f70c8cd89ba17673f.tar.bz2 samba-cab6e116786641e28747de3f70c8cd89ba17673f.zip |
TDB2: remove TDB1 compatibility.
This rips out all the TDB1 compatibility from tdb2.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb2/test/run-57-die-during-transaction.c')
-rw-r--r-- | lib/tdb2/test/run-57-die-during-transaction.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/tdb2/test/run-57-die-during-transaction.c b/lib/tdb2/test/run-57-die-during-transaction.c index 595d6ae23b..ee33a896ff 100644 --- a/lib/tdb2/test/run-57-die-during-transaction.c +++ b/lib/tdb2/test/run-57-die-during-transaction.c @@ -151,7 +151,7 @@ static int ftruncate_check(int fd, off_t length) return ret; } -static bool test_death(enum operation op, struct agent *agent, int flags) +static bool test_death(enum operation op, struct agent *agent) { struct tdb_context *tdb = NULL; TDB_DATA key; @@ -161,7 +161,7 @@ static bool test_death(enum operation op, struct agent *agent, int flags) current = target = 0; reset: unlink(TEST_DBNAME); - tdb = tdb_open(TEST_DBNAME, flags|TDB_NOMMAP, + tdb = tdb_open(TEST_DBNAME, TDB_NOMMAP, O_CREAT|O_TRUNC|O_RDWR, 0600, &tap_log_attr); if (!tdb) { diag("Failed opening TDB: %s", strerror(errno)); @@ -273,9 +273,9 @@ int main(int argc, char *argv[]) { enum operation ops[] = { FETCH, STORE, TRANSACTION_START }; struct agent *agent; - int i, flags; + int i; - plan_tests(24); + plan_tests(12); unlock_callback = maybe_die; external_agent_free = free_noleak; @@ -283,11 +283,9 @@ int main(int argc, char *argv[]) if (!agent) err(1, "preparing agent"); - for (flags = TDB_DEFAULT; flags <= TDB_VERSION1; flags += TDB_VERSION1) { - for (i = 0; i < sizeof(ops)/sizeof(ops[0]); i++) { - diag("Testing %s after death", operation_name(ops[i])); - ok1(test_death(ops[i], agent, flags)); - } + for (i = 0; i < sizeof(ops)/sizeof(ops[0]); i++) { + diag("Testing %s after death", operation_name(ops[i])); + ok1(test_death(ops[i], agent)); } free_external_agent(agent); |