[PATCH] tracing/selftests: Fix incorrect invocation of exit_fail

Woradorn Laodhanadhaworn posted 1 patch 6 days, 17 hours ago
.../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(-)
[PATCH] tracing/selftests: Fix incorrect invocation of exit_fail
Posted by Woradorn Laodhanadhaworn 6 days, 17 hours ago
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.

Signed-off-by: Woradorn Laodhanadhaworn <woradorn.laon@gmail.com>
---
 .../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(-)

diff --git a/tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_subbuf_size.tc b/tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_subbuf_size.tc
index d44d09a33a74..8cfe59d32b1f 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_subbuf_size.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/ringbuffer_subbuf_size.tc
@@ -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
 }
 
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker.tc b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker.tc
index 9aa0db2b84fc..1986c1bf1606 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker.tc
@@ -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
 }
 
-- 
2.43.0