From: Rusty Russell Date: Tue, 29 Nov 2011 22:43:11 +0000 (+1030) Subject: tdb2: suppress failtest more than once on mmap. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=fbae37ba91ec230e34be564084099726cc3a9d47;ds=sidebyside tdb2: suppress failtest more than once on mmap. Now we test failing mmap, ccanlint -v time has increased from 200 to 330 seconds. Worse, tests no time out on my laptop. Fix this, by preventing us from going down that particular rabbit hole. ccanlint -v now takes 201 seconds again. --- diff --git a/ccan/tdb2/test/failtest_helper.c b/ccan/tdb2/test/failtest_helper.c index f094a597..3172e3ad 100644 --- a/ccan/tdb2/test/failtest_helper.c +++ b/ccan/tdb2/test/failtest_helper.c @@ -83,6 +83,11 @@ block_repeat_failures(struct tlist_calls *history) return FAIL_PROBE; } + /* We handle mmap failing, by falling back to read/write, so + * don't try all possible paths. */ + if (last->type == FAILTEST_MMAP) + return FAIL_PROBE; + /* Unlock or non-blocking lock is fail-once. */ if (is_unlock(last) || is_nonblocking_lock(last)) return FAIL_PROBE;