[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: [PATCH] tests: fix false-failure on systems without valgrind
From: |
Jim Meyering |
Subject: |
FYI: [PATCH] tests: fix false-failure on systems without valgrind |
Date: |
Mon, 24 Jan 2022 17:34:54 +0100 |
I noticed that diffutils' sole valgrind-requiring test, tests/strip-trailing-cr,
would fail on systems without valgrind. The require_valgrind_ function
had a bug that would mask the subshell failure. This fixes it.
tests: fix false-failure on systems without valgrind
* tests/init.cfg (require_valgrind_): Use exit status of subshell,
not that of the "local" declaration.
---
tests/init.cfg | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/init.cfg b/tests/init.cfg
index 7c4ef92..c75b4a7 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -61,7 +61,7 @@ sanitize_path_()
require_valgrind_()
{
- local errout=$(
+ local errout; errout=$(
LC_ALL=C valgrind --error-exitcode=1 diff /dev/null /dev/null 2>&1
) ||
skip_ "requires a working valgrind"
--
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: [PATCH] tests: fix false-failure on systems without valgrind,
Jim Meyering <=