WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / dynevent / clear_select_events.tc
blob3a0e2885fff5894bc80f96d210f13b17f56fe13e
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: Generic dynamic event - selective clear (compatibility)
4 # requires: dynamic_events kprobe_events synthetic_events "place: [<module>:]<symbol>":README "place (kretprobe): [<module>:]<symbol>":README "s:[synthetic/]":README
6 echo 0 > events/enable
7 echo > dynamic_events
9 PLACE=$FUNCTION_FORK
11 setup_events() {
12 echo "p:myevent1 $PLACE" >> dynamic_events
13 echo "s:latency1 u64 lat; pid_t pid;" >> dynamic_events
14 echo "r:myevent2 $PLACE" >> dynamic_events
15 echo "s:latency2 u64 lat; pid_t pid;" >> dynamic_events
17 grep -q myevent1 dynamic_events
18 grep -q myevent2 dynamic_events
19 grep -q latency1 dynamic_events
20 grep -q latency2 dynamic_events
23 setup_events
24 echo > synthetic_events
26 grep -q myevent1 dynamic_events
27 grep -q myevent2 dynamic_events
28 ! grep -q latency1 dynamic_events
29 ! grep -q latency2 dynamic_events
31 echo > dynamic_events
33 setup_events
34 echo > kprobe_events
36 ! grep -q myevent1 dynamic_events
37 ! grep -q myevent2 dynamic_events
38 grep -q latency1 dynamic_events
39 grep -q latency2 dynamic_events
41 echo > dynamic_events