WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / trigger / inter-event / trigger-synthetic-event-createremove.tc
bloba152b558b40ae41830bea1acfe4d34ac5258e3ae
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: event trigger - test synthetic event create remove
4 # requires: set_event synthetic_events
6 fail() { #msg
7 echo $1
8 exit_fail
11 echo "Test create synthetic event"
13 echo 'wakeup_latency u64 lat pid_t pid char comm[16]' > synthetic_events
14 if [ ! -d events/synthetic/wakeup_latency ]; then
15 fail "Failed to create wakeup_latency synthetic event"
18 reset_trigger
20 echo "Test remove synthetic event"
21 echo '!wakeup_latency u64 lat pid_t pid char comm[16]' >> synthetic_events
22 if [ -d events/synthetic/wakeup_latency ]; then
23 fail "Failed to delete wakeup_latency synthetic event"
26 reset_trigger
28 echo "Test create synthetic event with an error"
29 echo 'wakeup_latency u64 lat pid_t pid char' > synthetic_events > /dev/null
30 if [ -d events/synthetic/wakeup_latency ]; then
31 fail "Created wakeup_latency synthetic event with an invalid format"
34 exit 0