summaryrefslogtreecommitdiff
path: root/lib/tdb2
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-12-05 17:04:30 +1030
committerRusty Russell <rusty@rustcorp.com.au>2011-12-05 17:04:30 +1030
commit6e3c40500c9c786a5b20a02420fcf48ec0b9b5c4 (patch)
tree5167aba2bea9459a4f924ce5e59a3617fdd7dc2e /lib/tdb2
parentbb09b32910f6da647f5409f974eb056169ab9cdb (diff)
downloadsamba-6e3c40500c9c786a5b20a02420fcf48ec0b9b5c4.tar.gz
samba-6e3c40500c9c786a5b20a02420fcf48ec0b9b5c4.tar.bz2
samba-6e3c40500c9c786a5b20a02420fcf48ec0b9b5c4.zip
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. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit fbae37ba91ec230e34be564084099726cc3a9d47)
Diffstat (limited to 'lib/tdb2')
-rw-r--r--lib/tdb2/test/failtest_helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tdb2/test/failtest_helper.c b/lib/tdb2/test/failtest_helper.c
index f094a5974e..3172e3ad6e 100644
--- a/lib/tdb2/test/failtest_helper.c
+++ b/lib/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;