]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
kselftest/runner: Print new line in print of timeout log
authorSeongJae Park <sjpark@amazon.de>
Mon, 2 Dec 2019 11:42:20 +0000 (12:42 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:22:49 +0000 (16:22 +0100)
BugLink: https://bugs.launchpad.net/bugs/1860130
[ 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 <sjpark@amazon.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
tools/testing/selftests/kselftest/runner.sh

index 84de7bc74f2cf1f5272a8bd3b0f81ecd00a296a6..a8d20cbb711cf658ab93e4b8bfe97b04865d0845 100644 (file)
@@ -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"