staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / trigger / trigger-stacktrace.tc
blob398c05c4d2a7ef198356706aafe3e45c63dde61f
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: event trigger - test stacktrace-trigger
5 fail() { #msg
6 echo $1
7 exit_fail
10 if [ ! -f set_event -o ! -d events/sched ]; then
11 echo "event tracing is not supported"
12 exit_unsupported
15 if [ ! -f events/sched/sched_process_fork/trigger ]; then
16 echo "event trigger is not supported"
17 exit_unsupported
20 FEATURE=`grep stacktrace events/sched/sched_process_fork/trigger`
21 if [ -z "$FEATURE" ]; then
22 echo "stacktrace trigger is not supported"
23 exit_unsupported
26 echo "Test stacktrace tigger"
27 echo 0 > trace
28 echo 0 > options/stacktrace
29 echo 'stacktrace' > events/sched/sched_process_fork/trigger
30 ( echo "forked")
31 grep "<stack trace>" trace > /dev/null || \
32 fail "stacktrace trigger on sched_process_fork did not work"
34 reset_trigger
36 echo "Test stacktrace semantic errors"
38 ! echo "stacktrace:foo" > events/sched/sched_process_fork/trigger
39 echo "stacktrace" > events/sched/sched_process_fork/trigger
40 ! echo "stacktrace" > events/sched/sched_process_fork/trigger
42 exit 0