From 86ccd72e589105b5277cf81f9e8dc1e208d25f45 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 6 Sep 2023 13:52:15 +0200 Subject: tests/shell: move taint check to "test-wrapper.sh" We will run tests in parallel. That means, we have multiple tests data and results in fly. That becomes simpler, if we move more result data to the test-wrapper and out of "run-tests.sh". Signed-off-by: Thomas Haller Signed-off-by: Florian Westphal --- tests/shell/run-tests.sh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'tests/shell/run-tests.sh') diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh index f52df85b..92c63e35 100755 --- a/tests/shell/run-tests.sh +++ b/tests/shell/run-tests.sh @@ -351,15 +351,6 @@ echo "" ok=0 skipped=0 failed=0 -taint=0 - -check_taint() -{ - read taint_now < /proc/sys/kernel/tainted - if [ $taint -ne $taint_now ] ; then - msg_warn "[FAILED] kernel is tainted: $taint -> $taint_now" - fi -} kmem_runs=0 kmemleak_found=0 @@ -401,7 +392,10 @@ check_kmemleak() fi } -check_taint +read kernel_tainted < /proc/sys/kernel/tainted +if [ "$kernel_tainted" -ne 0 ] ; then + msg_warn "[FAILED] kernel is tainted" +fi print_test_header() { local msglevel="$1" @@ -463,7 +457,6 @@ print_test_result() { TESTIDX=0 for testfile in "${TESTS[@]}" ; do - read taint < /proc/sys/kernel/tainted kernel_cleanup ((TESTIDX++)) @@ -481,7 +474,6 @@ for testfile in "${TESTS[@]}" ; do print_test_result "$NFT_TEST_TESTTMPDIR" "$testfile" "$rc_got" - check_taint check_kmemleak done -- cgit v1.2.3