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