xref: /linux/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_comm.tc (revision ec8a42e7343234802b9054874fe01810880289ce)
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# description: Kprobe event with comm arguments
4# requires: kprobe_events
5
6grep -A1 "fetcharg:" README | grep -q "\$comm" || exit_unsupported # this is too old
7
8echo "p:testprobe $FUNCTION_FORK comm=\$comm " > kprobe_events
9grep testprobe kprobe_events | grep -q 'comm=$comm'
10test -d events/kprobes/testprobe
11
12echo 1 > events/kprobes/testprobe/enable
13( echo "forked")
14grep testprobe trace | grep -q 'comm=".*"'
15
16exit 0
17