xref: /linux/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc (revision e0bf6c5ca2d3281f231c5f0c9bf145e9513644de)
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