]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb/test/run-open-during-transaction.c
tdb: new test for dying during a transaction.
[ccan] / ccan / tdb / test / run-open-during-transaction.c
index 5119004b97fb6d2af561f83ced86fc9c4afa3af8..27356e785f6b00c59539887b5e82ae1a641c77a6 100644 (file)
@@ -19,6 +19,7 @@ static int ftruncate_check(int fd, off_t length);
 #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>
@@ -80,7 +81,7 @@ static void check_for_agent(int fd, bool block)
        if (!external_agent_operation_check(agent, block, &res))
                return;
 
-       if (res != 0)
+       if (res != 1)
                err(1, "Agent failed open");
        agent_pending = false;