linux/linux-5.4.31/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc

13 lines
384 B
Plaintext
Raw Normal View History

2024-01-30 10:43:28 +00:00
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Kprobe dynamic event - busy event check
[ -f kprobe_events ] || exit_unsupported
echo p:myevent _do_fork > kprobe_events
test -d events/kprobes/myevent
echo 1 > events/kprobes/myevent/enable
echo > kprobe_events && exit_fail # this must fail
echo 0 > events/kprobes/myevent/enable
echo > kprobe_events # this must succeed