kretprobe_args.tc (573B)
1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3# description: Kretprobe dynamic event with arguments 4# requires: kprobe_events 5 6# Add new kretprobe event 7echo "r:testprobe2 $FUNCTION_FORK \$retval" > kprobe_events 8grep testprobe2 kprobe_events | grep -q 'arg1=\$retval' 9test -d events/kprobes/testprobe2 10 11echo 1 > events/kprobes/testprobe2/enable 12( echo "forked") 13 14cat trace | grep testprobe2 | grep -q "<- $FUNCTION_FORK" 15 16echo 0 > events/kprobes/testprobe2/enable 17echo '-:testprobe2' >> kprobe_events 18clear_trace 19test -d events/kprobes/testprobe2 && exit_fail || exit_pass