summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d/kprobe/profile.tc
blob: c4093fc1a77336b228c70d64a31fe5e03263a6ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Kprobe dynamic event - adding and removing
# requires: kprobe_events

! grep -q 'myevent' kprobe_profile
echo p:myevent kernel_clone > 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