1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: event trigger - test stacktrace-trigger 4 # requires: set_event events/sched/sched_process_fork/trigger 5 6 fail() { #msg 7 echo $1 8 exit_fail 9 } 10 11 FEATURE=`grep stacktrace events/sched/sched_process_fork/trigger` 12 if [ -z "$FEATURE" ]; then 13 echo "stacktrace trigger is not supported" 14 exit_unsupported 15 fi 16 17 echo "Test stacktrace trigger" 18 echo 0 > trace 19 echo 0 > options/stacktrace 20 echo 'stacktrace' > events/sched/sched_process_fork/trigger 21 ( echo "forked") 22 grep "<stack trace>" trace > /dev/null || \ 23 fail "stacktrace trigger on sched_process_fork did not work" 24 25 reset_trigger 26 27 echo "Test stacktrace semantic errors" 28 29 ! echo "stacktrace:foo" > events/sched/sched_process_fork/trigger 30 echo "stacktrace" > events/sched/sched_process_fork/trigger 31 ! echo "stacktrace" > events/sched/sched_process_fork/trigger 32 33 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.