diff options
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc b/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc new file mode 100644 index 0000000..588fde9 --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc @@ -0,0 +1,14 @@ +#!/bin/sh +# description: Kprobe dynamic event - busy event check + +[ -f kprobe_events ] || exit 1 + +echo 0 > events/enable || exit 1 +echo > kprobe_events || exit 1 +echo p:myevent do_fork > kprobe_events || exit 1 +[ -d events/kprobes/myevent ] || exit 1 +echo 1 > events/kprobes/myevent/enable || exit 1 +echo > kprobe_events && exit 1 # this must fail +echo 0 > events/kprobes/myevent/enable || exit 1 +echo > kprobe_events # this must succeed + |