1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: event trigger - test traceon/off trigger 4 # requires: set_event events/sched/sched_process_fork/trigger 5 6 fail() { #msg 7 echo $1 8 exit_fail 9 } 10 11 echo "Test traceoff trigger" 12 echo 1 > tracing_on 13 echo 'traceoff' > events/sched/sched_process_fork/trigger 14 ( echo "forked") 15 if [ `cat tracing_on` -ne 0 ]; then 16 fail "traceoff trigger on sched_process_fork did not work" 17 fi 18 19 reset_trigger 20 21 echo "Test traceon trigger" 22 echo 0 > tracing_on 23 echo 'traceon' > events/sched/sched_process_fork/trigger 24 ( echo "forked") 25 if [ `cat tracing_on` -ne 1 ]; then 26 fail "traceoff trigger on sched_process_fork did not work" 27 fi 28 29 reset_trigger 30 31 echo "Test semantic error for traceoff/on trigger" 32 ! echo 'traceoff:badparam' > events/sched/sched_process_fork/trigger 33 ! echo 'traceoff+0' > events/sched/sched_process_fork/trigger 34 echo 'traceon' > events/sched/sched_process_fork/trigger 35 ! echo 'traceon' > events/sched/sched_process_fork/trigger 36 ! echo 'traceoff' > events/sched/sched_process_fork/trigger 37 38 exit 0
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.