WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / kprobe / kretprobe_args.tc
blob197cc2afd4046b3c48fe9321aeac9d508e0079b6
1 #!/bin/sh
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/testprobe2/enable
12 ( echo "forked")
14 cat trace | grep testprobe2 | grep -q "<- $FUNCTION_FORK"
16 echo 0 > events/kprobes/testprobe2/enable
17 echo '-:testprobe2' >> kprobe_events
18 clear_trace
19 test -d events/kprobes/testprobe2 && exit_fail || exit_pass