| .. | .. |
|---|
| 1 | 1 | #!/bin/sh |
|---|
| 2 | +# SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | 3 | # description: event trigger - test synthetic event create remove |
|---|
| 3 | | -do_reset() { |
|---|
| 4 | | - reset_trigger |
|---|
| 5 | | - echo > set_event |
|---|
| 6 | | - clear_trace |
|---|
| 7 | | -} |
|---|
| 4 | +# requires: set_event synthetic_events |
|---|
| 8 | 5 | |
|---|
| 9 | 6 | fail() { #msg |
|---|
| 10 | | - do_reset |
|---|
| 11 | 7 | echo $1 |
|---|
| 12 | 8 | exit_fail |
|---|
| 13 | 9 | } |
|---|
| 14 | | - |
|---|
| 15 | | -if [ ! -f set_event ]; then |
|---|
| 16 | | - echo "event tracing is not supported" |
|---|
| 17 | | - exit_unsupported |
|---|
| 18 | | -fi |
|---|
| 19 | | - |
|---|
| 20 | | -if [ ! -f synthetic_events ]; then |
|---|
| 21 | | - echo "synthetic event is not supported" |
|---|
| 22 | | - exit_unsupported |
|---|
| 23 | | -fi |
|---|
| 24 | | - |
|---|
| 25 | | -clear_synthetic_events |
|---|
| 26 | | -reset_tracer |
|---|
| 27 | | -do_reset |
|---|
| 28 | 10 | |
|---|
| 29 | 11 | echo "Test create synthetic event" |
|---|
| 30 | 12 | |
|---|
| .. | .. |
|---|
| 48 | 30 | if [ -d events/synthetic/wakeup_latency ]; then |
|---|
| 49 | 31 | fail "Created wakeup_latency synthetic event with an invalid format" |
|---|
| 50 | 32 | fi |
|---|
| 51 | | - |
|---|
| 52 | | -do_reset |
|---|
| 53 | 33 | |
|---|
| 54 | 34 | exit 0 |
|---|