tests: Add post-analysis of selftest output to find real failures
This commit is contained in:
parent
0e4901e231
commit
c6b835df09
|
@ -46,7 +46,21 @@ if [ "$step" -ge 0 ]; then
|
||||||
# Enable testing CLONE_USERNS by unprivileged users
|
# Enable testing CLONE_USERNS by unprivileged users
|
||||||
sysctl kernel.unprivileged_userns_clone=1
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue