timer: handle time going backwards.
[ccan] / ccan / failtest / test / run-locking.c
index b25cfab9a29b36793359cda9c991f772b6a2c22c..da0ee70facf9a5d0fc188b677246601762fc80a4 100644 (file)
@@ -1,18 +1,18 @@
+/* Include the C files directly. */
+#include <ccan/failtest/failtest.c>
 #include <stdlib.h>
 #include <setjmp.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <assert.h>
 #include <ccan/tap/tap.h>
-/* Include the C files directly. */
-#include <ccan/failtest/failtest.c>
 
 #define SIZE 8
 
 /* We don't want to fork and fail; we're just testing lock recording. */
-static bool dont_fail(struct failtest_call *history, unsigned num)
+static enum failtest_result dont_fail(struct tlist_calls *history)
 {
-       return false;
+       return FAIL_DONT_FAIL;
 }
 
 static bool place_lock(int fd, char lockarr[], unsigned pos, unsigned size,
@@ -95,6 +95,7 @@ int main(void)
        unsigned int isize;
 
        plan_tests(5835);
+       failtest_init(0, NULL);
        failtest_hook = dont_fail;
 
        fd = open("run-locking-scratch", O_RDWR|O_CREAT, 0600);