2020-05-01 13:41:50

by Masami Hiramatsu

[permalink] [raw]
Subject: [PATCH 0/3] selftests/ftrace: Fix ftracetest testcases for dash, etc.

Hi,

Here are some patches to update ftracetest to fix some issues.
- [1/3] Fix coloring of XFAIL
- [2/3] Fix a testcase not to expect just one event entry
- [3/3] Do not use built-in echo because the behavior is different
on dash and bash. (Thanks Liu for reporting!)

Thank you,

---

Masami Hiramatsu (3):
selftests/ftrace: Make XFAIL green color
selftests/ftrace: Pick only the first kprobe event to test
selftests/ftrace: Use /bin/echo instead of built-in echo


tools/testing/selftests/ftrace/ftracetest | 2 +-
tools/testing/selftests/ftrace/test.d/functions | 3 +++
.../ftrace/test.d/kprobe/kprobe_args_type.tc | 2 +-
.../test.d/trigger/trigger-trace-marker-hist.tc | 2 +-
.../trigger-trace-marker-synthetic-kernel.tc | 4 ++++
.../trigger/trigger-trace-marker-synthetic.tc | 4 ++--
6 files changed, 12 insertions(+), 5 deletions(-)

--
Masami Hiramatsu (Linaro) <[email protected]>


2020-05-01 13:56:35

by Masami Hiramatsu

[permalink] [raw]
Subject: [PATCH 1/3] selftests/ftrace: Make XFAIL green color

Since XFAIL (Expected Failure) is expected to fail the test, which
means that test case works as we expected. IOW, XFAIL is same as
PASS. So make it green.

Signed-off-by: Masami Hiramatsu <[email protected]>
---
tools/testing/selftests/ftrace/ftracetest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
index 063ecb290a5a..72e837d0dfc1 100755
--- a/tools/testing/selftests/ftrace/ftracetest
+++ b/tools/testing/selftests/ftrace/ftracetest
@@ -273,7 +273,7 @@ eval_result() { # sigval
return $UNSUPPORTED_RESULT # depends on use case
;;
$XFAIL)
- prlog " [${color_red}XFAIL${color_reset}]"
+ prlog " [${color_green}XFAIL${color_reset}]"
XFAILED_CASES="$XFAILED_CASES $CASENO"
return 0
;;

2020-05-01 14:18:04

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH 1/3] selftests/ftrace: Make XFAIL green color

On Fri, 1 May 2020 22:37:41 +0900
Masami Hiramatsu <[email protected]> wrote:

> Since XFAIL (Expected Failure) is expected to fail the test, which
> means that test case works as we expected. IOW, XFAIL is same as
> PASS. So make it green.

THANK YOU!!!! That's been annoying me for some time ;-)

BIG Acked-by: Steven Rostedt (VMware) <[email protected]>

-- Steve

>
> Signed-off-by: Masami Hiramatsu <[email protected]>
> ---
> tools/testing/selftests/ftrace/ftracetest | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
> index 063ecb290a5a..72e837d0dfc1 100755
> --- a/tools/testing/selftests/ftrace/ftracetest
> +++ b/tools/testing/selftests/ftrace/ftracetest
> @@ -273,7 +273,7 @@ eval_result() { # sigval
> return $UNSUPPORTED_RESULT # depends on use case
> ;;
> $XFAIL)
> - prlog " [${color_red}XFAIL${color_reset}]"
> + prlog " [${color_green}XFAIL${color_reset}]"
> XFAILED_CASES="$XFAILED_CASES $CASENO"
> return 0
> ;;

2020-05-01 14:24:31

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH 0/3] selftests/ftrace: Fix ftracetest testcases for dash, etc.


[ FYI, Shuah responds better from her linuxfoundation.org email ]

Shuah,

Feel free to take the first two patches of this series (I acked one, and
reviewed the other).

The last patch I had some issues with, and is still under discussion.

Thanks!

-- Steve



On Fri, 1 May 2020 22:37:31 +0900
Masami Hiramatsu <[email protected]> wrote:

> Hi,
>
> Here are some patches to update ftracetest to fix some issues.
> - [1/3] Fix coloring of XFAIL
> - [2/3] Fix a testcase not to expect just one event entry
> - [3/3] Do not use built-in echo because the behavior is different
> on dash and bash. (Thanks Liu for reporting!)
>
> Thank you,
>
> ---
>
> Masami Hiramatsu (3):
> selftests/ftrace: Make XFAIL green color
> selftests/ftrace: Pick only the first kprobe event to test
> selftests/ftrace: Use /bin/echo instead of built-in echo
>
>
> tools/testing/selftests/ftrace/ftracetest | 2 +-
> tools/testing/selftests/ftrace/test.d/functions | 3 +++
> .../ftrace/test.d/kprobe/kprobe_args_type.tc | 2 +-
> .../test.d/trigger/trigger-trace-marker-hist.tc | 2 +-
> .../trigger-trace-marker-synthetic-kernel.tc | 4 ++++
> .../trigger/trigger-trace-marker-synthetic.tc | 4 ++--
> 6 files changed, 12 insertions(+), 5 deletions(-)
>
> --
> Masami Hiramatsu (Linaro) <[email protected]>

2020-05-01 14:30:31

by Shuah Khan

[permalink] [raw]
Subject: Re: [PATCH 0/3] selftests/ftrace: Fix ftracetest testcases for dash, etc.

On 5/1/20 8:21 AM, Steven Rostedt wrote:
>
> [ FYI, Shuah responds better from her linuxfoundation.org email ]
>
> Shuah,
>
> Feel free to take the first two patches of this series (I acked one, and
> reviewed the other).
>
> The last patch I had some issues with, and is still under discussion.
>
> Thanks!
>
> -- Steve
>

Will apply the first two.

thanks,
-- Shuah