busy_check.tc 440 字节
Newer Older
1
#!/bin/sh
2
# SPDX-License-Identifier: GPL-2.0
3 4
# description: Kprobe dynamic event - busy event check

5
[ -f kprobe_events ] || exit_unsupported
6

7 8
echo 0 > events/enable
echo > kprobe_events
9
echo p:myevent _do_fork > kprobe_events
10 11
test -d events/kprobes/myevent
echo 1 > events/kprobes/myevent/enable
12
echo > kprobe_events && exit_fail # this must fail
13
echo 0 > events/kprobes/myevent/enable
14
echo > kprobe_events # this must succeed
15
clear_trace