2 # SPDX-License-Identifier: GPL-2.0
3 # description: event trigger - test traceon/off 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 echo "Test traceoff trigger"
22 echo 'traceoff' > events
/sched
/sched_process_fork
/trigger
24 if [ `cat tracing_on` -ne 0 ]; then
25 fail
"traceoff trigger on sched_process_fork did not work"
30 echo "Test traceon trigger"
32 echo 'traceon' > events
/sched
/sched_process_fork
/trigger
34 if [ `cat tracing_on` -ne 1 ]; then
35 fail
"traceoff trigger on sched_process_fork did not work"
40 echo "Test semantic error for traceoff/on trigger"
41 ! echo 'traceoff:badparam' > events
/sched
/sched_process_fork
/trigger
42 ! echo 'traceoff+0' > events
/sched
/sched_process_fork
/trigger
43 echo 'traceon' > events
/sched
/sched_process_fork
/trigger
44 ! echo 'traceon' > events
/sched
/sched_process_fork
/trigger
45 ! echo 'traceoff' > events
/sched
/sched_process_fork
/trigger