aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc
blob: 15c1f70fcaf91a82c2c2b182db1275c9e549d0a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: Kprobe event with comm arguments

[ -f kprobe_events ] || exit_unsupported # this is configurable

grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old

echo 'p:testprobe _do_fork comm=$comm ' > kprobe_events
grep testprobe kprobe_events | grep -q 'comm=$comm'
test -d events/kprobes/testprobe

echo 1 > events/kprobes/testprobe/enable
( echo "forked")
grep testprobe trace | grep -q 'comm=".*"'

exit 0