Commit c28628b8 authored by Ben Hutchings's avatar Ben Hutchings Committed by Shuah Khan

selftests: kprobe: Choose an always-defined function to probe

do_fork() is no longer defined on x86, so probe _do_fork() instead.

Fixes: 3033f14a ("clone: support passing tls argument via C ...")
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 55f4d731
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
echo 0 > events/enable echo 0 > events/enable
echo > kprobe_events echo > kprobe_events
echo p:myevent do_fork > kprobe_events echo p:myevent _do_fork > kprobe_events
grep myevent kprobe_events grep myevent kprobe_events
test -d events/kprobes/myevent test -d events/kprobes/myevent
echo > kprobe_events echo > kprobe_events
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
echo 0 > events/enable echo 0 > events/enable
echo > kprobe_events echo > kprobe_events
echo p:myevent do_fork > kprobe_events echo p:myevent _do_fork > kprobe_events
test -d events/kprobes/myevent test -d events/kprobes/myevent
echo 1 > events/kprobes/myevent/enable echo 1 > events/kprobes/myevent/enable
echo > kprobe_events && exit 1 # this must fail echo > kprobe_events && exit 1 # this must fail
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
echo 0 > events/enable echo 0 > events/enable
echo > kprobe_events echo > kprobe_events
echo 'p:testprobe do_fork $stack $stack0 +0($stack)' > kprobe_events echo 'p:testprobe _do_fork $stack $stack0 +0($stack)' > kprobe_events
grep testprobe kprobe_events grep testprobe kprobe_events
test -d events/kprobes/testprobe test -d events/kprobes/testprobe
echo 1 > events/kprobes/testprobe/enable echo 1 > events/kprobes/testprobe/enable
......
...@@ -6,31 +6,31 @@ grep function available_tracers || exit_unsupported # this is configurable ...@@ -6,31 +6,31 @@ grep function available_tracers || exit_unsupported # this is configurable
# prepare # prepare
echo nop > current_tracer echo nop > current_tracer
echo do_fork > set_ftrace_filter echo _do_fork > set_ftrace_filter
echo 0 > events/enable echo 0 > events/enable
echo > kprobe_events echo > kprobe_events
echo 'p:testprobe do_fork' > kprobe_events echo 'p:testprobe _do_fork' > kprobe_events
# kprobe on / ftrace off # kprobe on / ftrace off
echo 1 > events/kprobes/testprobe/enable echo 1 > events/kprobes/testprobe/enable
echo > trace echo > trace
( echo "forked") ( echo "forked")
grep testprobe trace grep testprobe trace
! grep 'do_fork <-' trace ! grep '_do_fork <-' trace
# kprobe on / ftrace on # kprobe on / ftrace on
echo function > current_tracer echo function > current_tracer
echo > trace echo > trace
( echo "forked") ( echo "forked")
grep testprobe trace grep testprobe trace
grep 'do_fork <-' trace grep '_do_fork <-' trace
# kprobe off / ftrace on # kprobe off / ftrace on
echo 0 > events/kprobes/testprobe/enable echo 0 > events/kprobes/testprobe/enable
echo > trace echo > trace
( echo "forked") ( echo "forked")
! grep testprobe trace ! grep testprobe trace
grep 'do_fork <-' trace grep '_do_fork <-' trace
# kprobe on / ftrace on # kprobe on / ftrace on
echo 1 > events/kprobes/testprobe/enable echo 1 > events/kprobes/testprobe/enable
...@@ -38,14 +38,14 @@ echo function > current_tracer ...@@ -38,14 +38,14 @@ echo function > current_tracer
echo > trace echo > trace
( echo "forked") ( echo "forked")
grep testprobe trace grep testprobe trace
grep 'do_fork <-' trace grep '_do_fork <-' trace
# kprobe on / ftrace off # kprobe on / ftrace off
echo nop > current_tracer echo nop > current_tracer
echo > trace echo > trace
( echo "forked") ( echo "forked")
grep testprobe trace grep testprobe trace
! grep 'do_fork <-' trace ! grep '_do_fork <-' trace
# cleanup # cleanup
echo nop > current_tracer echo nop > current_tracer
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
echo 0 > events/enable echo 0 > events/enable
echo > kprobe_events echo > kprobe_events
echo 'r:testprobe2 do_fork $retval' > kprobe_events echo 'r:testprobe2 _do_fork $retval' > kprobe_events
grep testprobe2 kprobe_events grep testprobe2 kprobe_events
test -d events/kprobes/testprobe2 test -d events/kprobes/testprobe2
echo 1 > events/kprobes/testprobe2/enable echo 1 > events/kprobes/testprobe2/enable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment