]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/ftrace: fix event-no-pid on 1-core machine
authorKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Wed, 23 Jun 2021 13:43:15 +0000 (15:43 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 24 Jun 2021 00:29:26 +0000 (18:29 -0600)
commit07b60713b57a8f952d029a2b6849d003d9c16108
treeb3306eafdba985bf0d7b97fa384552e1918700b3
parent22118ce17eb8dcf2a6ba2f6fb250816ddb59685a
selftests/ftrace: fix event-no-pid on 1-core machine

When running event-no-pid test on 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 recorded.

Fixes: ebed9628f5c2 ("selftests/ftrace: Add test to test new set_event_notrace_pid file")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/ftrace/test.d/event/event-no-pid.tc