* [PATCH] selftests/ftrace: fix event-no-pid on 1-core machine
@ 2021-06-23 7:04 Krzysztof Kozlowski
2021-06-23 12:52 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-23 7:04 UTC (permalink / raw)
To: Steven Rostedt, Ingo Molnar, Shuah Khan, Krzysztof Kozlowski,
linux-kselftest, linux-kernel
When running event-no-pid test on a small machines (e.g. cloud 1-core
instance), other events might not happen:
+ cat trace
+ cnt=0
+ [ 0 -eq 0 ]
+ fail No other events were recorded
[15] event tracing - restricts events based on pid notrace filtering [FAIL]
Schedule a simple sleep task to be sure that some other process events
get recorder.
Fixes: ebed9628f5c2 ("selftests/ftrace: Add test to test new set_event_notrace_pid file")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
.../testing/selftests/ftrace/test.d/event/event-no-pid.tc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc b/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc
index e6eb78f0b954..9933ed24f901 100644
--- a/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc
@@ -57,6 +57,10 @@ enable_events() {
echo 1 > tracing_on
}
+other_task() {
+ sleep .001 || usleep 1 || sleep 1
+}
+
echo 0 > options/event-fork
do_reset
@@ -94,6 +98,9 @@ child=$!
echo "child = $child"
wait $child
+# Be sure some other events will happen for small systems (e.g. 1 core)
+other_task
+
echo 0 > tracing_on
cnt=`count_pid $mypid`
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/ftrace: fix event-no-pid on 1-core machine
2021-06-23 7:04 [PATCH] selftests/ftrace: fix event-no-pid on 1-core machine Krzysztof Kozlowski
@ 2021-06-23 12:52 ` Steven Rostedt
2021-06-23 13:36 ` Krzysztof Kozlowski
0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2021-06-23 12:52 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Ingo Molnar, Shuah Khan, linux-kselftest, linux-kernel
On Wed, 23 Jun 2021 09:04:31 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:
> When running event-no-pid test on a small machines (e.g. cloud 1-core
> instance), other events might not happen:
>
> + cat trace
> + cnt=0
> + [ 0 -eq 0 ]
> + fail No other events were recorded
> [15] event tracing - restricts events based on pid notrace filtering [FAIL]
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Shua, do you want to take this?
-- Steve
>
> Schedule a simple sleep task to be sure that some other process events
> get recorder.
>
> Fixes: ebed9628f5c2 ("selftests/ftrace: Add test to test new set_event_notrace_pid file")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
> .../testing/selftests/ftrace/test.d/event/event-no-pid.tc | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc b/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc
> index e6eb78f0b954..9933ed24f901 100644
> --- a/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc
> +++ b/tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc
> @@ -57,6 +57,10 @@ enable_events() {
> echo 1 > tracing_on
> }
>
> +other_task() {
> + sleep .001 || usleep 1 || sleep 1
> +}
> +
> echo 0 > options/event-fork
>
> do_reset
> @@ -94,6 +98,9 @@ child=$!
> echo "child = $child"
> wait $child
>
> +# Be sure some other events will happen for small systems (e.g. 1 core)
> +other_task
> +
> echo 0 > tracing_on
>
> cnt=`count_pid $mypid`
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/ftrace: fix event-no-pid on 1-core machine
2021-06-23 12:52 ` Steven Rostedt
@ 2021-06-23 13:36 ` Krzysztof Kozlowski
2021-06-23 13:39 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2021-06-23 13:36 UTC (permalink / raw)
To: Steven Rostedt; +Cc: Ingo Molnar, Shuah Khan, linux-kselftest, linux-kernel
On 23/06/2021 14:52, Steven Rostedt wrote:
> On Wed, 23 Jun 2021 09:04:31 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:
>
>> When running event-no-pid test on a small machines (e.g. cloud 1-core
If someone would be so kind to fix my grammar as well when applying:
s/on a small machines/on small machines/
>> instance), other events might not happen:
>>
>> + cat trace
>> + cnt=0
>> + [ 0 -eq 0 ]
>> + fail No other events were recorded
>> [15] event tracing - restricts events based on pid notrace filtering [FAIL]
>
> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
>
> Shua, do you want to take this?
>
> -- Steve
>
>>
>> Schedule a simple sleep task to be sure that some other process events
>> get recorder.
s/recorder/recorded/
I can also send a v2 with fixed msg.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/ftrace: fix event-no-pid on 1-core machine
2021-06-23 13:36 ` Krzysztof Kozlowski
@ 2021-06-23 13:39 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-06-23 13:39 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Ingo Molnar, Shuah Khan, linux-kselftest, linux-kernel
On Wed, 23 Jun 2021 15:36:20 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> wrote:
> s/recorder/recorded/
>
> I can also send a v2 with fixed msg.
Yes, please send a v2, and include my Acked-by (exactly as I wrote it).
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-23 13:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 7:04 [PATCH] selftests/ftrace: fix event-no-pid on 1-core machine Krzysztof Kozlowski
2021-06-23 12:52 ` Steven Rostedt
2021-06-23 13:36 ` Krzysztof Kozlowski
2021-06-23 13:39 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.