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