1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: Kretprobe dynamic event with maxactive 4 # requires: kprobe_events 'r[maxactive]':README 5 6 # Test if we successfully reject unknown messages 7 if echo 'a:myprobeaccept inet_csk_accept' > kprobe_events; then false; else true; fi 8 9 # Test if we successfully reject too big maxactive 10 if echo 'r1000000:myprobeaccept inet_csk_accept' > kprobe_events; then false; else true; fi 11 12 # Test if we successfully reject unparsable numbers for maxactive 13 if echo 'r10fuzz:myprobeaccept inet_csk_accept' > kprobe_events; then false; else true; fi 14 15 # Test for kretprobe with event name without maxactive 16 echo 'r:myprobeaccept inet_csk_accept' > kprobe_events 17 grep myprobeaccept kprobe_events 18 test -d events/kprobes/myprobeaccept 19 echo '-:myprobeaccept' >> kprobe_events 20 21 # Test for kretprobe with event name with a small maxactive 22 echo 'r10:myprobeaccept inet_csk_accept' > kprobe_events 23 grep myprobeaccept kprobe_events 24 test -d events/kprobes/myprobeaccept 25 echo '-:myprobeaccept' >> kprobe_events 26 27 # Test for kretprobe without event name without maxactive 28 echo 'r inet_csk_accept' > kprobe_events 29 grep inet_csk_accept kprobe_events 30 echo > kprobe_events 31 32 # Test for kretprobe without event name with a small maxactive 33 echo 'r10 inet_csk_accept' > kprobe_events 34 grep inet_csk_accept kprobe_events 35 echo > kprobe_events
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.