* [PATCH] selftests/ftrace: Fix check of return value in fgraph-retval.tc test
@ 2024-10-11 17:20 Steven Rostedt
2024-10-11 22:47 ` Shuah Khan
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:20 UTC (permalink / raw)
To: LKML, Linux Trace Kernel, linux-kselftest
Cc: Masami Hiramatsu, Mathieu Desnoyers, Shuah Khan, Donglin Peng
From: Steven Rostedt <rostedt@goodmis.org>
The addition of recording both the function name and return address to the
function graph tracer updated the selftest to check for "=-5" from "= -5".
But this causes the test to fail on certain configs, as "= -5" is still a
value that can be returned if function addresses are not enabled (older kernels).
Check for both "=-5" and " -5" as a success value.
Fixes: 21e92806d39c6 ("function_graph: Support recording and printing the function return address")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
Shuah, this update is only for changes in my tree, so you do not need to add it.
tools/testing/selftests/ftrace/test.d/ftrace/fgraph-retval.tc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-retval.tc b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-retval.tc
index e8e46378b88d..4307d4eef417 100644
--- a/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-retval.tc
+++ b/tools/testing/selftests/ftrace/test.d/ftrace/fgraph-retval.tc
@@ -29,7 +29,7 @@ set -e
: "Test printing the error code in signed decimal format"
echo 0 > options/funcgraph-retval-hex
-count=`cat trace | grep 'proc_reg_write' | grep '=-5' | wc -l`
+count=`cat trace | grep 'proc_reg_write' | grep -e '=-5 ' -e '= -5 ' | wc -l`
if [ $count -eq 0 ]; then
fail "Return value can not be printed in signed decimal format"
fi
--
2.45.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/ftrace: Fix check of return value in fgraph-retval.tc test
2024-10-11 17:20 [PATCH] selftests/ftrace: Fix check of return value in fgraph-retval.tc test Steven Rostedt
@ 2024-10-11 22:47 ` Shuah Khan
0 siblings, 0 replies; 2+ messages in thread
From: Shuah Khan @ 2024-10-11 22:47 UTC (permalink / raw)
To: Steven Rostedt, LKML, Linux Trace Kernel, linux-kselftest
Cc: Masami Hiramatsu, Mathieu Desnoyers, Shuah Khan, Donglin Peng,
Shuah Khan
On 10/11/24 11:20, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> The addition of recording both the function name and return address to the
> function graph tracer updated the selftest to check for "=-5" from "= -5".
> But this causes the test to fail on certain configs, as "= -5" is still a
> value that can be returned if function addresses are not enabled (older kernels).
>
> Check for both "=-5" and " -5" as a success value.
>
> Fixes: 21e92806d39c6 ("function_graph: Support recording and printing the function return address")
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>
> Shuah, this update is only for changes in my tree, so you do not need to add it.
Noted. Thank you.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-11 22:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-11 17:20 [PATCH] selftests/ftrace: Fix check of return value in fgraph-retval.tc test Steven Rostedt
2024-10-11 22:47 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox