X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Ffailtest_helper.c;fp=ccan%2Ftdb2%2Ftest%2Ffailtest_helper.c;h=d24ac4c42b11077693f5126293e095eb2963e4ea;hp=1358a6c6b261d3b296a296d123c36693afe07ff1;hb=1819a36a3e69565bd7b853503fceb846558a45bd;hpb=407057edd6b45cae437d119df80ff080989a2752 diff --git a/ccan/tdb2/test/failtest_helper.c b/ccan/tdb2/test/failtest_helper.c index 1358a6c6..d24ac4c4 100644 --- a/ccan/tdb2/test/failtest_helper.c +++ b/ccan/tdb2/test/failtest_helper.c @@ -3,6 +3,8 @@ #include #include +bool failtest_suppress = false; + /* FIXME: From ccan/str */ static inline bool strends(const char *str, const char *postfix) { @@ -84,6 +86,9 @@ block_repeat_failures(struct failtest_call *history, unsigned num) { const struct failtest_call *i, *last = &history[num-1]; + if (failtest_suppress) + return FAIL_DONT_FAIL; + if (failmatch(last, INITIAL_TDB_MALLOC) || failmatch(last, URANDOM_OPEN) || failmatch(last, URANDOM_READ)) {