From: SeongJae Park Date: Mon, 2 Dec 2019 11:42:20 +0000 (+0100) Subject: kselftest/runner: Print new line in print of timeout log X-Git-Tag: v5.4.11~106 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=277df4ca18da0ab0e2e83c476dde2c8f74177c41;p=thirdparty%2Fkernel%2Fstable.git kselftest/runner: Print new line in print of timeout log [ Upstream commit d187801d1a46519d2a322f879f7c8f85c685372e ] If a timeout failure occurs, kselftest kills the test process and prints the timeout log. If the test process has killed while printing a log that ends with new line, the timeout log can be printed in middle of the test process output so that it can be seems like a comment, as below: # test_process_log not ok 3 selftests: timers: nsleep-lat # TIMEOUT This commit avoids such problem by printing one more line before the TIMEOUT failure log. Signed-off-by: SeongJae Park Acked-by: Kees Cook Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh index 84de7bc74f2cf..a8d20cbb711cf 100644 --- a/tools/testing/selftests/kselftest/runner.sh +++ b/tools/testing/selftests/kselftest/runner.sh @@ -79,6 +79,7 @@ run_one() if [ $rc -eq $skip_rc ]; then \ echo "not ok $test_num $TEST_HDR_MSG # SKIP" elif [ $rc -eq $timeout_rc ]; then \ + echo "#" echo "not ok $test_num $TEST_HDR_MSG # TIMEOUT" else echo "not ok $test_num $TEST_HDR_MSG # exit=$rc"