WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / dynevent / add_remove_kprobe.tc
blobb4da41d126d583d9dc92a777ffc88406d6040bb5
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: Generic dynamic event - add/remove kprobe events
4 # requires: dynamic_events "place: [<module>:]<symbol>":README "place (kretprobe): [<module>:]<symbol>":README
6 echo 0 > events/enable
7 echo > dynamic_events
9 PLACE=$FUNCTION_FORK
11 echo "p:myevent1 $PLACE" >> dynamic_events
12 echo "r:myevent2 $PLACE" >> dynamic_events
14 grep -q myevent1 dynamic_events
15 grep -q myevent2 dynamic_events
16 test -d events/kprobes/myevent1
17 test -d events/kprobes/myevent2
19 echo "-:myevent2" >> dynamic_events
21 grep -q myevent1 dynamic_events
22 ! grep -q myevent2 dynamic_events
24 echo > dynamic_events
26 clear_trace