.. | .. |
---|
1 | 1 | #!/bin/sh |
---|
2 | 2 | # SPDX-License-Identifier: GPL-2.0 |
---|
3 | 3 | # description: event trigger - test snapshot-trigger |
---|
4 | | - |
---|
5 | | -do_reset() { |
---|
6 | | - reset_trigger |
---|
7 | | - echo > set_event |
---|
8 | | - clear_trace |
---|
9 | | -} |
---|
| 4 | +# requires: set_event events/sched/sched_process_fork/trigger snapshot |
---|
10 | 5 | |
---|
11 | 6 | fail() { #msg |
---|
12 | | - do_reset |
---|
13 | 7 | echo $1 |
---|
14 | 8 | exit_fail |
---|
15 | 9 | } |
---|
16 | | - |
---|
17 | | -if [ ! -f set_event -o ! -d events/sched ]; then |
---|
18 | | - echo "event tracing is not supported" |
---|
19 | | - exit_unsupported |
---|
20 | | -fi |
---|
21 | | - |
---|
22 | | -if [ ! -f events/sched/sched_process_fork/trigger ]; then |
---|
23 | | - echo "event trigger is not supported" |
---|
24 | | - exit_unsupported |
---|
25 | | -fi |
---|
26 | | - |
---|
27 | | -if [ ! -f snapshot ]; then |
---|
28 | | - echo "snapshot is not supported" |
---|
29 | | - exit_unsupported |
---|
30 | | -fi |
---|
31 | | - |
---|
32 | | -reset_tracer |
---|
33 | | -do_reset |
---|
34 | 10 | |
---|
35 | 11 | FEATURE=`grep snapshot events/sched/sched_process_fork/trigger` |
---|
36 | 12 | if [ -z "$FEATURE" ]; then |
---|
.. | .. |
---|
38 | 14 | exit_unsupported |
---|
39 | 15 | fi |
---|
40 | 16 | |
---|
41 | | -echo "Test snapshot tigger" |
---|
| 17 | +echo "Test snapshot trigger" |
---|
42 | 18 | echo 0 > snapshot |
---|
43 | 19 | echo 1 > events/sched/sched_process_fork/enable |
---|
44 | 20 | ( echo "forked") |
---|
.. | .. |
---|
56 | 32 | ! echo "snapshot+1" > events/sched/sched_process_fork/trigger |
---|
57 | 33 | echo "snapshot" > events/sched/sched_process_fork/trigger |
---|
58 | 34 | ! echo "snapshot" > events/sched/sched_process_fork/trigger |
---|
59 | | - |
---|
60 | | -do_reset |
---|
61 | 35 | |
---|
62 | 36 | exit 0 |
---|