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