1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# description: Kprobe dynamic event with arguments
4
5[ -f kprobe_events ] || exit_unsupported # this is configurable
6
7echo 0 > events/enable
8echo > kprobe_events
9echo 'p:testprobe _do_fork $stack $stack0 +0($stack)' > kprobe_events
10grep testprobe kprobe_events
11test -d events/kprobes/testprobe
12echo 1 > events/kprobes/testprobe/enable
13( echo "forked")
14echo 0 > events/kprobes/testprobe/enable
15echo "-:testprobe" >> kprobe_events
16clear_trace
17test -d events/kprobes/testprobe && exit_fail || exit_pass
18
19