Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15
DORMANTno replies

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v1 current

[PATCH 3/4] tests: notice valgrind error in test_must_fail

From: Thomas Rast <hidden>
Date: 2016-06-15 22:56:35
Subsystem: the rest · Maintainer: Linus Torvalds

We tell valgrind to return 126 if it notices that something is wrong,
but we did not actually handle this in test_must_fail, leading to
false negatives.  Catch and report it.

Signed-off-by: Thomas Rast <redacted>
---

Just noticed this issue when tracking down the failure in t7612.  It
might still be a bit too fragile; when running the entire suite under
valgrind, I usually just

  cd test-results
  egrep '^==[0-9]+==' *.out| less -S


 t/test-lib-functions.sh | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index fa62d01..6766553 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -536,6 +536,9 @@ test_must_fail () {
 	elif test $exit_code = 127; then
 		echo >&2 "test_must_fail: command not found: $*"
 		return 1
+	elif test $exit_code = 126; then
+		echo >&2 "test_must_fail: valgrind error: $*"
+		return 1
 	fi
 	return 0
 }
-- 
1.8.2.467.gedf93a5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help