xref: /linux/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc (revision e58e871becec2d3b04ed91c0c16fe8deac9c9dfa)
1#!/bin/sh
2# description: Kprobe dynamic event - busy event check
3
4[ -f kprobe_events ] || exit_unsupported
5
6echo 0 > events/enable
7echo > kprobe_events
8echo p:myevent _do_fork > kprobe_events
9test -d events/kprobes/myevent
10echo 1 > events/kprobes/myevent/enable
11echo > kprobe_events && exit 1 # this must fail
12echo 0 > events/kprobes/myevent/enable
13echo > kprobe_events # this must succeed
14clear_trace
15