2 # SPDX-License-Identifier: GPL-2.0
3 # description: Kretprobe dynamic event with arguments
4 # requires: kprobe_events
6 # Add new kretprobe event
7 echo "r:testprobe2 $FUNCTION_FORK \$retval" > kprobe_events
8 grep testprobe2 kprobe_events |
grep -q 'arg1=\$retval'
9 test -d events
/kprobes
/testprobe2
11 echo 1 > events
/kprobes
/testprobe
2/enable
14 cat trace |
grep testprobe2 |
grep -q "<- $FUNCTION_FORK"
16 echo 0 > events
/kprobes
/testprobe
2/enable
17 echo '-:testprobe2' >> kprobe_events
19 test -d events
/kprobes
/testprobe2
&& exit_fail || exit_pass