kselftest/runner: Print new line in print of timeout log
PATCH 1/2 kselftest/runner: Print new line in print of timeout log
From: SeongJae Park <[email protected]>
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.
--- tools/testing/selftests/kselftest/runner.sh | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/kselftest/runner.sh +1 -0
@@ -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"
Signature · 1 line
2.17.1
PATCH 2/2 kselftest: Support old perl versions
From: SeongJae Park <[email protected]>
On an old perl such as v5.10.1, kselftest/prefix.pl gives below error message:
Can't locate object method "autoflush" via package "IO::Handle" at kselftest/prefix.pl line 10.
This commit fixes the error by explicitly specifying the use of the IO::Handle package.
--- tools/testing/selftests/kselftest/prefix.pl | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/kselftest/prefix.pl +1 -0
@@ -3,6 +3,7 @@ # Prefix all lines with "# ", unbuffered. Command being piped in may need # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd". use strict; +use IO::Handle; binmode STDIN; binmode STDOUT;
Signature · 1 line
2.17.1
Re: [PATCH 2/2] kselftest: Support old perl versions
Quoted 11 lines · SeongJae Park
From: SeongJae Park <[email protected]>
On an old perl such as v5.10.1,
kselftest/prefix.plgives below error message:Can't locate object method "autoflush" via package "
IO::Handle" atkselftest/prefix.plline 10.This commit fixes the error by explicitly specifying the use of the
IO::Handlepackage.Signed-off-by SeongJae Park <[email protected]>
Good catch!
-Kees
Quoted 19 lines
--- tools/testing/selftests/kselftest/prefix.pl | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/kselftest/prefix.pl +1
-0@@ -3,6 +3,7 @@ # Prefix all lines with "# ", unbuffered. Command being piped in may need # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd". use strict; +use IO::Handle; binmode STDIN; binmode STDOUT;Signature · 1 line
2.17.1
Signature · 1 line
Kees Cook
shuah
maintainerRe: [PATCH 2/2] kselftest: Support old perl versions
Quoted 33 lines · Kees Cook
Quoted 11 lines · SeongJae Park
From: SeongJae Park <[email protected]>
On an old perl such as v5.10.1,
kselftest/prefix.plgives below error message:Can't locate object method "autoflush" via package "
IO::Handle" atkselftest/prefix.plline 10.This commit fixes the error by explicitly specifying the use of the
IO::Handlepackage.Signed-off-by SeongJae Park <[email protected]>Good catch!
Acked-by Kees Cook <[email protected]>-Kees
Quoted 14 lines
--- tools/testing/selftests/kselftest/prefix.pl | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/kselftest/prefix.pl +1
-0@@ -3,6 +3,7 @@ # Prefix all lines with "# ", unbuffered. Command being piped in may need # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd". use strict; +use IO::Handle;
Quoted 6 lines
Quoted 5 lines
tools/testing/selftests/kselftest/prefix.pl +0
-0binmode STDIN; binmode STDOUT;Signature · 1 line
2.17.1
Applying to fixes for next 5.5-rc
thanks,
-- Shuah
Hello Shuah,
May I ask your comments?
Thanks,
SeongJae Park
Quoted 33 lines · SeongJae Park
From: SeongJae Park <[email protected]>
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 # TIMEOUTThis commit avoids such problem by printing one more line before the TIMEOUT failure log.
Signed-off-by SeongJae Park <[email protected]>--- tools/testing/selftests/kselftest/runner.sh | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/kselftest/runner.sh +1
-1@@ -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" --2.17.1
Quoted 7 lines · SeongJae Park
From: SeongJae Park <[email protected]>
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:
Quoted 6 lines
#
test_process_lognot ok 3 selftests: timers: nsleep-lat # TIMEOUTThis commit avoids such problem by printing one more line before the TIMEOUT failure log.
Signed-off-by SeongJae Park <[email protected]>
Cool, yeah, this looks fine to me. Nice idea!
-Kees
Quoted 19 lines
--- tools/testing/selftests/kselftest/runner.sh | 1 + 1 file changed, 1 insertion(+)tools/testing/selftests/kselftest/runner.sh +1
-0@@ -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"Signature · 1 line
2.17.1
Signature · 1 line
Kees Cook
shuah
maintainerQuoted 25 lines · Kees Cook
Quoted 7 lines · SeongJae Park
From: SeongJae Park <[email protected]>
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:
Quoted 6 lines
#
test_process_lognot ok 3 selftests: timers: nsleep-lat # TIMEOUTThis commit avoids such problem by printing one more line before the TIMEOUT failure log.
Signed-off-by SeongJae Park <[email protected]>Acked-by Kees Cook <[email protected]>Cool, yeah, this looks fine to me. Nice idea!
-Kees
Quoted 4 lines
--- tools/testing/selftests/kselftest/runner.sh | 1 + 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 15 lines
tools/testing/selftests/kselftest/runner.sh +1
-0@@ -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"Signature · 1 line
2.17.1
Thanks. Applying to fixes for the next 5.5-rc
-- Shuah