[linux] 09/17: tests: Add post-analysis of selftest output to find real failures

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sat Oct 31 22:18:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository linux.

commit c6b835df092f6c7a85159fca94598e9d1e722207
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Aug 13 14:15:49 2015 +0200

    tests: Add post-analysis of selftest output to find real failures
---
 debian/tests/selftests | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/debian/tests/selftests b/debian/tests/selftests
index 6c2e2fe..b17f883 100644
--- a/debian/tests/selftests
+++ b/debian/tests/selftests
@@ -46,7 +46,21 @@ if [ "$step" -ge 0 ]; then
 	# Enable testing CLONE_USERNS by unprivileged users
 	sysctl kernel.unprivileged_userns_clone=1
 
-	make -C tools/testing/selftests run_tests
+	# Some tests will write to stderr despite being successful,
+	# and the exit code from make will be 0 even if tests failed.
+	# So we have to do some post-analysis...
+	set -o pipefail
+	make -C tools/testing/selftests run_tests 2>&1 | tee $ADTTMP/log
+	set +o pipefail
+	if grep -E '\[(FAIL|UNSUPPORTED)\]|recipe for target .run_tests. failed' $ADTTMP/log | \
+	    grep -q -v \
+		 -e '^selftests: fw_userhelper.sh \[FAIL\]' \
+		 -e 'ftrace - function profiler with function tracing   \[UNSUPPORTED\]' \
+		 -e '^selftests: ftracetest \[FAIL\]' \
+		 -e '|| echo .*\[FAIL\]' \
+		 ; then
+	    echo >&2 "Unexpected failures found"
+	fi
     fi
 fi
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list