1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3# description: Kprobe event VFS type argument 4# requires: kprobe_events "%pd/%pD":README 5 6: "Test argument %pd with name" 7echo 'p:testprobe dput name=$arg1:%pd' > kprobe_events 8echo 1 > events/kprobes/testprobe/enable 9grep -q "1" events/kprobes/testprobe/enable 10echo 0 > events/kprobes/testprobe/enable 11grep "dput" trace | grep -q "enable" 12echo "" > kprobe_events 13echo "" > trace 14 15: "Test argument %pd without name" 16echo 'p:testprobe dput $arg1:%pd' > kprobe_events 17echo 1 > events/kprobes/testprobe/enable 18grep -q "1" events/kprobes/testprobe/enable 19echo 0 > events/kprobes/testprobe/enable 20grep "dput" trace | grep -q "enable" 21echo "" > kprobe_events 22echo "" > trace 23 24: "Test argument %pD with name" 25echo 'p:testprobe vfs_read name=$arg1:%pD' > kprobe_events 26echo 1 > events/kprobes/testprobe/enable 27grep -q "1" events/kprobes/testprobe/enable 28echo 0 > events/kprobes/testprobe/enable 29grep "vfs_read" trace | grep -q "enable" 30echo "" > kprobe_events 31echo "" > trace 32 33: "Test argument %pD without name" 34echo 'p:testprobe vfs_read $arg1:%pD' > kprobe_events 35echo 1 > events/kprobes/testprobe/enable 36grep -q "1" events/kprobes/testprobe/enable 37echo 0 > events/kprobes/testprobe/enable 38grep "vfs_read" trace | grep -q "enable" 39echo "" > kprobe_events 40echo "" > trace 41