2 # SPDX-License-Identifier: GPL-2.0
3 # description: event trigger - test snapshot-trigger
10 if [ ! -f set_event
-o ! -d events
/sched
]; then
11 echo "event tracing is not supported"
15 if [ ! -f events
/sched
/sched_process_fork
/trigger
]; then
16 echo "event trigger is not supported"
20 if [ ! -f snapshot
]; then
21 echo "snapshot is not supported"
25 FEATURE
=`grep snapshot events/sched/sched_process_fork/trigger`
26 if [ -z "$FEATURE" ]; then
27 echo "snapshot trigger is not supported"
31 echo "Test snapshot tigger"
33 echo 1 > events
/sched
/sched_process_fork
/enable
35 echo 'snapshot:1' > events
/sched
/sched_process_fork
/trigger
37 grep sched_process_fork snapshot
> /dev
/null || \
38 fail
"snapshot trigger on sched_process_fork did not work"
42 echo 0 > events
/sched
/sched_process_fork
/enable
44 echo "Test snapshot semantic errors"
46 ! echo "snapshot+1" > events
/sched
/sched_process_fork
/trigger
47 echo "snapshot" > events
/sched
/sched_process_fork
/trigger
48 ! echo "snapshot" > events
/sched
/sched_process_fork
/trigger