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