staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / kprobe / kprobe_ftrace.tc
blob7650a82db3f571d1ae9355e7edd6deb2812688cc
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: Kprobe dynamic event with function tracer
5 [ -f kprobe_events ] || exit_unsupported # this is configurable
6 grep "function" available_tracers || exit_unsupported # this is configurable
8 # prepare
9 echo nop > current_tracer
10 echo _do_fork > set_ftrace_filter
11 echo 'p:testprobe _do_fork' > kprobe_events
13 # kprobe on / ftrace off
14 echo 1 > events/kprobes/testprobe/enable
15 echo > trace
16 ( echo "forked")
17 grep testprobe trace
18 ! grep '_do_fork <-' trace
20 # kprobe on / ftrace on
21 echo function > current_tracer
22 echo > trace
23 ( echo "forked")
24 grep testprobe trace
25 grep '_do_fork <-' trace
27 # kprobe off / ftrace on
28 echo 0 > events/kprobes/testprobe/enable
29 echo > trace
30 ( echo "forked")
31 ! grep testprobe trace
32 grep '_do_fork <-' trace
34 # kprobe on / ftrace on
35 echo 1 > events/kprobes/testprobe/enable
36 echo function > current_tracer
37 echo > trace
38 ( echo "forked")
39 grep testprobe trace
40 grep '_do_fork <-' trace
42 # kprobe on / ftrace off
43 echo nop > current_tracer
44 echo > trace
45 ( echo "forked")
46 grep testprobe trace
47 ! grep '_do_fork <-' trace