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