tracing/selftests: Fix incorrect invocation of exit_fail
PATCH 1/1 tracing/selftests: Fix incorrect invocation of exit_fail
Replace all exit fail and exit_fail; with exit_fail to keep the usage of exit_fail consistent across the ftrace selftests. This also reduces warning messsege such as 'exit: Illegal number: fail' in test logs.
--- .../ftrace/test.d/00basic/ringbuffer_subbuf_size.tc | 6 +++--- .../testing/selftests/ftrace/test.d/00basic/trace_marker.tc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_subbuf_size.tc +3 -3
@@ -60,7 +60,7 @@ test_buffer() { # the size must be greater than or equal to page_size - data_offset page_size=$((page_size-data_offset)) if [ $size -lt $page_size ]; then - exit fail + exit_fail fi # Now add a little more the meta data overhead will overflow
@@ -71,14 +71,14 @@ test_buffer() { new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; exit}' trace` if [ "$new_str" = "$str" ]; then - exit fail; + exit_fail fi # Make sure the entire line can be found new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; }' trace` if [ "$new_str" != "$str" ]; then - exit fail; + exit_fail fi }
tools/testing/selftests/ftrace/test.d/00basic/trace_marker.tc +2 -2
@@ -68,14 +68,14 @@ test_buffer() { new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; exit}' trace` if [ "$new_str" = "$str" ]; then - exit fail; + exit_fail fi # Make sure the entire line can be found new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; }' trace` if [ "$new_str" != "$str" ]; then - exit fail; + exit_fail fi }
Signature · 1 line
2.43.0
Quoted 6 lines · Woradorn Laodhanadhaworn
Replace all
exit failandexit_fail;withexit_failto keep the usage ofexit_failconsistent across the ftrace selftests. This also reduces warning messsege such as 'exit: Illegal number: fail' in test logs.Signed-off-by Woradorn Laodhanadhaworn <[email protected]>
Looks good to me.
Shuah, can you pick this fix via your branch?
Thank you,
Quoted 56 lines
--- .../ftrace/test.d/00basic/ringbuffer_subbuf_size.tc | 6 +++--- .../testing/selftests/ftrace/test.d/00basic/trace_marker.tc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_subbuf_size.tc +3
-3@@ -60,7 +60,7 @@ test_buffer() { # the size must be greater than or equal to page_size - data_offset page_size=$((page_size-data_offset)) if [ $size -lt $page_size ]; then - exit fail + exit_fail fi # Now add a little more the meta data overhead will overflow@@ -71,14 +71,14 @@ test_buffer() { new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; exit}' trace` if [ "$new_str" = "$str" ]; then - exit fail; + exit_fail fi # Make sure the entire line can be found new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; }' trace` if [ "$new_str" != "$str" ]; then - exit fail; + exit_fail fi }tools/testing/selftests/ftrace/test.d/00basic/trace_marker.tc +2
-2@@ -68,14 +68,14 @@ test_buffer() { new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; exit}' trace` if [ "$new_str" = "$str" ]; then - exit fail; + exit_fail fi # Make sure the entire line can be found new_str=`awk ' /tracing_mark_write:/ { sub(/^.*tracing_mark_write: /,"");printf "%s", $0; }' trace` if [ "$new_str" != "$str" ]; then - exit fail; + exit_fail fi }
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
Shuah Khan
maintainerQuoted 6 lines · Masami Hiramatsu (Google)
Quoted 5 lines · Woradorn Laodhanadhaworn
Replace all
exit failandexit_fail;withexit_failto keep the usage ofexit_failconsistent across the ftrace selftests. This also reduces warning messsege such as 'exit: Illegal number: fail' in test logs.
Quoted 9 lines
Quoted 1 line
Signed-off-by Woradorn Laodhanadhaworn <[email protected]>Looks good to me.
Fixes 2f84b39f4847 ("tracing: Update subbuffer with kilobytes not page order")Reviewed-by Masami Hiramatsu (Google) <[email protected]>Shuah, can you pick this fix via your branch?
Thank you. Will apply this patch for 7.4-rc1
thanks,
-- Shuah