* [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests
@ 2024-02-26 3:18 Yuanhe Shu
2024-02-26 6:09 ` Masami Hiramatsu
0 siblings, 1 reply; 4+ messages in thread
From: Yuanhe Shu @ 2024-02-26 3:18 UTC (permalink / raw)
To: rostedt, mhiramat, mathieu.desnoyers, shuah
Cc: linux-kernel, linux-trace-kernel, linux-kselftest, xiangzao,
stable
While sched* events being traced and sched* events continuously happen,
"[xx] event tracing - enable/disable with subsystem level files" would
not stop as on some slower systems it seems to take forever.
Select the first 100 lines of output would be enough to judge whether
there are more than 3 types of sched events.
Fixes: 815b18ea66d6 ("ftracetest: Add basic event tracing test cases")
Cc: stable@vger.kernel.org
Signed-off-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
---
.../selftests/ftrace/test.d/event/subsystem-enable.tc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
index b1ede6249866..b7c8f29c09a9 100644
--- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
@@ -18,7 +18,7 @@ echo 'sched:*' > set_event
yield
-count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
+count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
if [ $count -lt 3 ]; then
fail "at least fork, exec and exit events should be recorded"
fi
@@ -29,7 +29,7 @@ echo 1 > events/sched/enable
yield
-count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
+count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
if [ $count -lt 3 ]; then
fail "at least fork, exec and exit events should be recorded"
fi
@@ -40,7 +40,7 @@ echo 0 > events/sched/enable
yield
-count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
+count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
if [ $count -ne 0 ]; then
fail "any of scheduler events should not be recorded"
fi
--
2.39.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests
2024-02-26 3:18 [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests Yuanhe Shu
@ 2024-02-26 6:09 ` Masami Hiramatsu
2024-02-26 16:59 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Masami Hiramatsu @ 2024-02-26 6:09 UTC (permalink / raw)
To: Yuanhe Shu, Shuah Khan
Cc: rostedt, mathieu.desnoyers, shuah, linux-kernel,
linux-trace-kernel, linux-kselftest, stable
On Mon, 26 Feb 2024 11:18:16 +0800
Yuanhe Shu <xiangzao@linux.alibaba.com> wrote:
> While sched* events being traced and sched* events continuously happen,
> "[xx] event tracing - enable/disable with subsystem level files" would
> not stop as on some slower systems it seems to take forever.
> Select the first 100 lines of output would be enough to judge whether
> there are more than 3 types of sched events.
Looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Hi Shuah, can you pick this as a fix?
Thank you,
>
> Fixes: 815b18ea66d6 ("ftracetest: Add basic event tracing test cases")
> Cc: stable@vger.kernel.org
> Signed-off-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
> ---
> .../selftests/ftrace/test.d/event/subsystem-enable.tc | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> index b1ede6249866..b7c8f29c09a9 100644
> --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
> @@ -18,7 +18,7 @@ echo 'sched:*' > set_event
>
> yield
>
> -count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
> +count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
> if [ $count -lt 3 ]; then
> fail "at least fork, exec and exit events should be recorded"
> fi
> @@ -29,7 +29,7 @@ echo 1 > events/sched/enable
>
> yield
>
> -count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
> +count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
> if [ $count -lt 3 ]; then
> fail "at least fork, exec and exit events should be recorded"
> fi
> @@ -40,7 +40,7 @@ echo 0 > events/sched/enable
>
> yield
>
> -count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
> +count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
> if [ $count -ne 0 ]; then
> fail "any of scheduler events should not be recorded"
> fi
> --
> 2.39.3
>
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests
2024-02-26 6:09 ` Masami Hiramatsu
@ 2024-02-26 16:59 ` Steven Rostedt
2024-04-04 16:29 ` Shuah Khan
0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2024-02-26 16:59 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: Yuanhe Shu, Shuah Khan, mathieu.desnoyers, linux-kernel,
linux-trace-kernel, linux-kselftest, stable, Shuah Khan
On Mon, 26 Feb 2024 15:09:38 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> On Mon, 26 Feb 2024 11:18:16 +0800
> Yuanhe Shu <xiangzao@linux.alibaba.com> wrote:
>
> > While sched* events being traced and sched* events continuously happen,
> > "[xx] event tracing - enable/disable with subsystem level files" would
> > not stop as on some slower systems it seems to take forever.
> > Select the first 100 lines of output would be enough to judge whether
> > there are more than 3 types of sched events.
>
> Looks good to me.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
> Hi Shuah, can you pick this as a fix?
>
Yes please.
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests
2024-02-26 16:59 ` Steven Rostedt
@ 2024-04-04 16:29 ` Shuah Khan
0 siblings, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2024-04-04 16:29 UTC (permalink / raw)
To: Steven Rostedt, Masami Hiramatsu (Google)
Cc: Yuanhe Shu, Shuah Khan, mathieu.desnoyers, linux-kernel,
linux-trace-kernel, linux-kselftest, stable, Shuah Khan
On 2/26/24 09:59, Steven Rostedt wrote:
> On Mon, 26 Feb 2024 15:09:38 +0900
> Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
>
>> On Mon, 26 Feb 2024 11:18:16 +0800
>> Yuanhe Shu <xiangzao@linux.alibaba.com> wrote:
>>
>>> While sched* events being traced and sched* events continuously happen,
>>> "[xx] event tracing - enable/disable with subsystem level files" would
>>> not stop as on some slower systems it seems to take forever.
>>> Select the first 100 lines of output would be enough to judge whether
>>> there are more than 3 types of sched events.
>>
>> Looks good to me.
>>
>> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>>
>> Hi Shuah, can you pick this as a fix?
>>
>
> Yes please.
>
> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>
> -- Steve
Sorry for the delay on this. Applied to linux-kselftest fixes branch
for next rc.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-04 16:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-26 3:18 [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests Yuanhe Shu
2024-02-26 6:09 ` Masami Hiramatsu
2024-02-26 16:59 ` Steven Rostedt
2024-04-04 16:29 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox