2 # description: event trigger - test event enable/disable trigger
16 if [ ! -f set_event
-o ! -d events
/sched
]; then
17 echo "event tracing is not supported"
21 if [ ! -f events
/sched
/sched_process_fork
/trigger
]; then
22 echo "event trigger is not supported"
29 FEATURE
=`grep enable_event events/sched/sched_process_fork/trigger`
30 if [ -z "$FEATURE" ]; then
31 echo "event enable/disable trigger is not supported"
35 echo "Test enable_event trigger"
36 echo 0 > events
/sched
/sched_switch
/enable
37 echo 'enable_event:sched:sched_switch' > events
/sched
/sched_process_fork
/trigger
39 if [ `cat events/sched/sched_switch/enable` != '1*' ]; then
40 fail
"enable_event trigger on sched_process_fork did not work"
45 echo "Test disable_event trigger"
46 echo 1 > events
/sched
/sched_switch
/enable
47 echo 'disable_event:sched:sched_switch' > events
/sched
/sched_process_fork
/trigger
49 if [ `cat events/sched/sched_switch/enable` != '0*' ]; then
50 fail
"disable_event trigger on sched_process_fork did not work"
55 echo "Test semantic error for event enable/disable trigger"
56 ! echo 'enable_event:nogroup:noevent' > events
/sched
/sched_process_fork
/trigger
57 ! echo 'disable_event+1' > events
/sched
/sched_process_fork
/trigger
58 echo 'enable_event:sched:sched_switch' > events
/sched
/sched_process_fork
/trigger
59 ! echo 'enable_event:sched:sched_switch' > events
/sched
/sched_process_fork
/trigger
60 ! echo 'disable_event:sched:sched_switch' > events
/sched
/sched_process_fork
/trigger