summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc
blob: b55c840035879e5a43687c5cd65b71a3e3145967 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# description: Kprobe dynamic event - busy event check

[ -f kprobe_events ] || exit_unsupported

echo 0 > events/enable
echo > kprobe_events
echo p:myevent do_fork > kprobe_events
test -d events/kprobes/myevent
echo 1 > events/kprobes/myevent/enable
echo > kprobe_events && exit 1 # this must fail
echo 0 > events/kprobes/myevent/enable
echo > kprobe_events # this must succeed