drm/panel-edp: Add STA 116QHD024002
[drm/drm-misc.git] / tools / testing / selftests / ftrace / test.d / kprobe / kprobe_ftrace.tc
blob5556292601a48186087d5d7e834396de7b0aff78
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: Kprobe dynamic event with function tracer
4 # requires: kprobe_events stack_trace_filter function:tracer
6 # prepare
7 echo nop > current_tracer
8 echo $FUNCTION_FORK > set_ftrace_filter
9 echo "p:testprobe $FUNCTION_FORK" > kprobe_events
11 # kprobe on / ftrace off
12 echo 1 > events/kprobes/testprobe/enable
13 echo > trace
14 ( echo "forked")
15 grep testprobe trace
16 ! grep "$FUNCTION_FORK <-" trace
18 # kprobe on / ftrace on
19 echo function > current_tracer
20 echo > trace
21 ( echo "forked")
22 grep testprobe trace
23 grep "$FUNCTION_FORK <-" trace
25 # kprobe off / ftrace on
26 echo 0 > events/kprobes/testprobe/enable
27 echo > trace
28 ( echo "forked")
29 ! grep testprobe trace
30 grep "$FUNCTION_FORK <-" trace
32 # kprobe on / ftrace on
33 echo 1 > events/kprobes/testprobe/enable
34 echo function > current_tracer
35 echo > trace
36 ( echo "forked")
37 grep testprobe trace
38 grep "$FUNCTION_FORK <-" trace
40 # kprobe on / ftrace off
41 echo nop > current_tracer
42 echo > trace
43 ( echo "forked")
44 grep testprobe trace
45 ! grep "$FUNCTION_FORK <-" trace