From: Pádraig Brady Date: Thu, 20 Dec 2012 00:09:15 +0000 (+0000) Subject: tests: avoid false positive valgrind failures X-Git-Tag: v8.21~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd44ccef0da458b682bcb6b866aac1460a5b50a1;p=thirdparty%2Fcoreutils.git tests: avoid false positive valgrind failures * init.cfg (require_valgrind_): Check the `true` program, which will check more valgrind failure cases as now detailed in the function comments. --- diff --git a/init.cfg b/init.cfg index e853b0a2f9..ce5a106de3 100644 --- a/init.cfg +++ b/init.cfg @@ -159,10 +159,14 @@ require_strace_() fi } -# Skip the current test if valgrind doesn't work. +# Skip the current test if valgrind doesn't work, +# which could happen if not installed, +# or hasn't support for the built architecture, +# or hasn't appropriate error suppressions installed etc. require_valgrind_() { - valgrind --help >/dev/null || skip_ "requires valgrind" + valgrind --error-exitcode=1 true 2>/dev/null || + skip_ "requires a working valgrind" } require_setfacl_()