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" 7 echo 'p:testprobe dput name=$arg1:%pd' > kprobe_events 8 echo 1 > events/kprobes/testprobe/enable 9 grep -q "1" events/kprobes/testprobe/enable 10 echo 0 > events/kprobes/testprobe/enable 11 grep "dput" trace | grep -q "enable" 12 echo "" > kprobe_events 13 echo "" > trace 14 15 : "Test argument %pd without name" 16 echo 'p:testprobe dput $arg1:%pd' > kprobe_events 17 echo 1 > events/kprobes/testprobe/enable 18 grep -q "1" events/kprobes/testprobe/enable 19 echo 0 > events/kprobes/testprobe/enable 20 grep "dput" trace | grep -q "enable" 21 echo "" > kprobe_events 22 echo "" > trace 23 24 : "Test argument %pD with name" 25 echo 'p:testprobe vfs_read name=$arg1:%pD' > kprobe_events 26 echo 1 > events/kprobes/testprobe/enable 27 grep -q "1" events/kprobes/testprobe/enable 28 echo 0 > events/kprobes/testprobe/enable 29 grep "vfs_read" trace | grep -q "enable" 30 echo "" > kprobe_events 31 echo "" > trace 32 33 : "Test argument %pD without name" 34 echo 'p:testprobe vfs_read $arg1:%pD' > kprobe_events 35 echo 1 > events/kprobes/testprobe/enable 36 grep -q "1" events/kprobes/testprobe/enable 37 echo 0 > events/kprobes/testprobe/enable 38 grep "vfs_read" trace | grep -q "enable" 39 echo "" > kprobe_events 40 echo "" > trace
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.