Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/ftrace: Add wakeup tracer testcase

Add a testcase for wakeup tracer.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

authored by

Masami Hiramatsu and committed by
Shuah Khan (Samsung OSG)
c1edd060 91ae08a2

+26
+1
tools/testing/selftests/ftrace/config
··· 4 4 CONFIG_TRACER_SNAPSHOT=y 5 5 CONFIG_STACK_TRACER=y 6 6 CONFIG_HIST_TRIGGERS=y 7 + CONFIG_SCHED_TRACER=y 7 8 CONFIG_PREEMPT_TRACER=y 8 9 CONFIG_IRQSOFF_TRACER=y 9 10 CONFIG_PREEMPTIRQ_DELAY_TEST=m
+25
tools/testing/selftests/ftrace/test.d/tracer/wakeup.tc
··· 1 + #!/bin/sh 2 + # SPDX-License-Identifier: GPL2.0 3 + # description: Test wakeup tracer 4 + 5 + if ! which chrt ; then 6 + echo "chrt is not found. This test requires nice command." 7 + exit_unresolved 8 + fi 9 + 10 + if ! grep -wq "wakeup" available_tracers ; then 11 + echo "wakeup tracer is not supported" 12 + exit_unsupported 13 + fi 14 + 15 + echo wakeup > current_tracer 16 + echo 1 > tracing_on 17 + echo 0 > tracing_max_latency 18 + 19 + : "Wakeup higher priority task" 20 + chrt -f 5 sleep 1 21 + 22 + echo 0 > tracing_on 23 + grep '+ \[[[:digit:]]*\]' trace 24 + grep '==> \[[[:digit:]]*\]' trace 25 +