189c5497dSMasami Hiramatsu#!/bin/sh 2b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 389c5497dSMasami Hiramatsu# description: Kprobe dynamic event with arguments 43591e90fSMasami Hiramatsu# requires: kprobe_events 589c5497dSMasami Hiramatsu 6*dc6bf4daSSteven Rostedt (VMware)echo "p:testprobe $FUNCTION_FORK \$stack \$stack0 +0(\$stack)" > kprobe_events 7e42e5c46SMasami Hiramatsugrep testprobe kprobe_events | grep -q 'arg1=\$stack arg2=\$stack0 arg3=+0(\$stack)' 889c5497dSMasami Hiramatsutest -d events/kprobes/testprobe 9e42e5c46SMasami Hiramatsu 1089c5497dSMasami Hiramatsuecho 1 > events/kprobes/testprobe/enable 1189c5497dSMasami Hiramatsu( echo "forked") 12*dc6bf4daSSteven Rostedt (VMware)grep testprobe trace | grep "$FUNCTION_FORK" | \ 13e42e5c46SMasami Hiramatsu grep -q 'arg1=0x[[:xdigit:]]* arg2=0x[[:xdigit:]]* arg3=0x[[:xdigit:]]*$' 14e42e5c46SMasami Hiramatsu 1589c5497dSMasami Hiramatsuecho 0 > events/kprobes/testprobe/enable 1689c5497dSMasami Hiramatsuecho "-:testprobe" >> kprobe_events 17ce1ac64bSNamhyung Kimclear_trace 1842534b1fSMasami Hiramatsutest -d events/kprobes/testprobe && exit_fail || exit_pass 1989c5497dSMasami Hiramatsu 20