WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / kprobe / kretprobe_maxactive.tc
blob4f0b268c12332a52148b005f081c502f0f5af88a
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: Kretprobe dynamic event with maxactive
4 # requires: kprobe_events 'r[maxactive]':README
6 # Test if we successfully reject unknown messages
7 if echo 'a:myprobeaccept inet_csk_accept' > kprobe_events; then false; else true; fi
9 # Test if we successfully reject too big maxactive
10 if echo 'r1000000:myprobeaccept inet_csk_accept' > kprobe_events; then false; else true; fi
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
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
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
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
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