busy_check.tc 389 字节
Newer Older
1 2 3
#!/bin/sh
# description: Kprobe dynamic event - busy event check

4
[ -f kprobe_events ] || exit_unsupported
5

6 7 8 9 10
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
11
echo > kprobe_events && exit 1 # this must fail
12
echo 0 > events/kprobes/myevent/enable
13
echo > kprobe_events # this must succeed