xref: /openbmc/linux/tools/testing/selftests/ftrace/test.d/kprobe/busy_check.tc (revision ea47eed33a3fe3d919e6e3cf4e4eb5507b817188)
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 0 > events/enable
8echo > kprobe_events
9echo p:myevent _do_fork > kprobe_events
10test -d events/kprobes/myevent
11echo 1 > events/kprobes/myevent/enable
12echo > kprobe_events && exit_fail # this must fail
13echo 0 > events/kprobes/myevent/enable
14echo > kprobe_events # this must succeed
15clear_trace
16