staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / trigger / trigger-traceonoff.tc
blobd5d2dcbc9cab04b4f017195258e89957cbd0333f
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: event trigger - test traceon/off 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 echo "Test traceoff trigger"
21 echo 1 > tracing_on
22 echo 'traceoff' > events/sched/sched_process_fork/trigger
23 ( echo "forked")
24 if [ `cat tracing_on` -ne 0 ]; then
25 fail "traceoff trigger on sched_process_fork did not work"
28 reset_trigger
30 echo "Test traceon trigger"
31 echo 0 > tracing_on
32 echo 'traceon' > events/sched/sched_process_fork/trigger
33 ( echo "forked")
34 if [ `cat tracing_on` -ne 1 ]; then
35 fail "traceoff trigger on sched_process_fork did not work"
38 reset_trigger
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
47 exit 0