lib/tdb: fix test/run-die-during-transaction when HAVE_INCOHERENT_MMAP.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 23 Mar 2012 00:13:48 +0000 (10:43 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 23 Mar 2012 00:13:48 +0000 (10:43 +1030)
Since we force mmap on, we don't intercept writes to the db, so we never
see it in an inconsistent state.  #ifdef over the check that we should have
recovered it at least once.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/tdb/test/run-die-during-transaction.c

index d6502f4ea401adfe2e82d6dabdbfbc7e91459ee0..ae7dafcfac7ede210ca0d6014da7e580326fe22a 100644 (file)
@@ -194,7 +194,12 @@ reset:
                return false;
        }
 
+#ifdef HAVE_INCOHERENT_MMAP
+       /* This means we always mmap, which makes this test a noop. */
+       ok1(1);
+#else
        ok1(needed_recovery);
+#endif
        ok1(locking_errors == 0);
        ok1(forget_locking() == 0);
        locking_errors = 0;