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