diff options
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/kprobe/profile.tc')
-rw-r--r-- | tools/testing/selftests/ftrace/test.d/kprobe/profile.tc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/profile.tc b/tools/testing/selftests/ftrace/test.d/kprobe/profile.tc new file mode 100644 index 000000000..34fb89b0c --- /dev/null +++ b/tools/testing/selftests/ftrace/test.d/kprobe/profile.tc @@ -0,0 +1,14 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# description: Kprobe profile +# requires: kprobe_events + +! grep -q 'myevent' kprobe_profile +echo "p:myevent $FUNCTION_FORK" > kprobe_events +grep -q 'myevent[[:space:]]*0[[:space:]]*0$' kprobe_profile +echo 1 > events/kprobes/myevent/enable +( echo "forked" ) +grep -q 'myevent[[:space:]]*[[:digit:]]*[[:space:]]*0$' kprobe_profile +echo 0 > events/kprobes/myevent/enable +echo > kprobe_events +! grep -q 'myevent' kprobe_profile |