mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 21:04:14 +00:00
test: ftrace: Fix kprobe test for eventfs
kprobe_args_char.tc, kprobe_args_string.tc has validation check for tracefs_create_dir, for eventfs it should be eventfs_create_dir. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ajay Kaher <[email protected]> Co-developed-by: Steven Rostedt (VMware) <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]> Tested-by: Ching-lin Yu <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
27152bceea
commit
7c1130ea5c
@@ -34,14 +34,19 @@ mips*)
|
||||
esac
|
||||
|
||||
: "Test get argument (1)"
|
||||
echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):char" > kprobe_events
|
||||
if grep -q eventfs_add_dir available_filter_functions; then
|
||||
DIR_NAME="eventfs_add_dir"
|
||||
else
|
||||
DIR_NAME="tracefs_create_dir"
|
||||
fi
|
||||
echo "p:testprobe ${DIR_NAME} arg1=+0(${ARG1}):char" > kprobe_events
|
||||
echo 1 > events/kprobes/testprobe/enable
|
||||
echo "p:test $FUNCTION_FORK" >> kprobe_events
|
||||
grep -qe "testprobe.* arg1='t'" trace
|
||||
|
||||
echo 0 > events/kprobes/testprobe/enable
|
||||
: "Test get argument (2)"
|
||||
echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):char arg2=+0(${ARG1}):char[4]" > kprobe_events
|
||||
echo "p:testprobe ${DIR_NAME} arg1=+0(${ARG1}):char arg2=+0(${ARG1}):char[4]" > kprobe_events
|
||||
echo 1 > events/kprobes/testprobe/enable
|
||||
echo "p:test $FUNCTION_FORK" >> kprobe_events
|
||||
grep -qe "testprobe.* arg1='t' arg2={'t','e','s','t'}" trace
|
||||
|
||||
@@ -37,14 +37,19 @@ loongarch*)
|
||||
esac
|
||||
|
||||
: "Test get argument (1)"
|
||||
echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):string" > kprobe_events
|
||||
if grep -q eventfs_add_dir available_filter_functions; then
|
||||
DIR_NAME="eventfs_add_dir"
|
||||
else
|
||||
DIR_NAME="tracefs_create_dir"
|
||||
fi
|
||||
echo "p:testprobe ${DIR_NAME} arg1=+0(${ARG1}):string" > kprobe_events
|
||||
echo 1 > events/kprobes/testprobe/enable
|
||||
echo "p:test $FUNCTION_FORK" >> kprobe_events
|
||||
grep -qe "testprobe.* arg1=\"test\"" trace
|
||||
|
||||
echo 0 > events/kprobes/testprobe/enable
|
||||
: "Test get argument (2)"
|
||||
echo "p:testprobe tracefs_create_dir arg1=+0(${ARG1}):string arg2=+0(${ARG1}):string" > kprobe_events
|
||||
echo "p:testprobe ${DIR_NAME} arg1=+0(${ARG1}):string arg2=+0(${ARG1}):string" > kprobe_events
|
||||
echo 1 > events/kprobes/testprobe/enable
|
||||
echo "p:test $FUNCTION_FORK" >> kprobe_events
|
||||
grep -qe "testprobe.* arg1=\"test\" arg2=\"test\"" trace
|
||||
|
||||
Reference in New Issue
Block a user