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
7 : "Test argument %pd with name for fprobe"
8 echo 'f:testprobe dput name=$arg1:%pd' > dynamic_events
9 echo 1 > events
/fprobes
/testprobe
/enable
10 grep -q "1" events
/fprobes
/testprobe
/enable
11 echo 0 > events
/fprobes
/testprobe
/enable
12 grep "dput" trace |
grep -q "enable"
13 echo "" > dynamic_events
16 : "Test argument %pd without name for fprobe"
17 echo 'f:testprobe dput $arg1:%pd' > dynamic_events
18 echo 1 > events
/fprobes
/testprobe
/enable
19 grep -q "1" events
/fprobes
/testprobe
/enable
20 echo 0 > events
/fprobes
/testprobe
/enable
21 grep "dput" trace |
grep -q "enable"
22 echo "" > dynamic_events
25 : "Test argument %pD with name for fprobe"
26 echo 'f:testprobe vfs_read name=$arg1:%pD' > dynamic_events
27 echo 1 > events
/fprobes
/testprobe
/enable
28 grep -q "1" events
/fprobes
/testprobe
/enable
29 echo 0 > events
/fprobes
/testprobe
/enable
30 grep "vfs_read" trace |
grep -q "enable"
31 echo "" > dynamic_events
34 : "Test argument %pD without name for fprobe"
35 echo 'f:testprobe vfs_read $arg1:%pD' > dynamic_events
36 echo 1 > events
/fprobes
/testprobe
/enable
37 grep -q "1" events
/fprobes
/testprobe
/enable
38 echo 0 > events
/fprobes
/testprobe
/enable
39 grep "vfs_read" trace |
grep -q "enable"
40 echo "" > dynamic_events