tracing/kprobes: Add selftest scripts testing kprobe-tracer as startup test
[sfrench/cifs-2.6.git] / tools / testing / selftests / ftrace / test.d / kprobe / kretprobe_args.tc
1 #!/bin/sh
2 # description: Kretprobe dynamic event with arguments
3
4 [ -f kprobe_events ] || exit_unsupported # this is configurable
5
6 echo 0 > events/enable
7 echo > kprobe_events
8 echo 'r:testprobe2 do_fork $retval' > kprobe_events
9 grep testprobe2 kprobe_events
10 test -d events/kprobes/testprobe2
11 echo 1 > events/kprobes/testprobe2/enable
12 ( echo "forked")
13 echo 0 > events/kprobes/testprobe2/enable
14 echo '-:testprobe2' >> kprobe_events
15 test -d events/kprobes/testprobe2 && exit 1 || exit 0