staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / event / toplevel-enable.tc
blob84d7bda08d2a4c7e7785d77dd04f2445a605a3a3
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: event tracing - enable/disable with top level files
5 do_reset() {
6 echo > set_event
7 clear_trace
10 fail() { #msg
11 echo $1
12 exit_fail
15 if [ ! -f available_events -o ! -f set_event -o ! -d events ]; then
16 echo "event tracing is not supported"
17 exit_unsupported
20 echo '*:*' > set_event
22 yield
24 echo 0 > tracing_on
26 count=`head -n 128 trace | grep -v ^# | wc -l`
27 if [ $count -eq 0 ]; then
28 fail "none of events are recorded"
31 do_reset
33 echo 1 > events/enable
34 echo 1 > tracing_on
36 yield
38 echo 0 > tracing_on
39 count=`head -n 128 trace | grep -v ^# | wc -l`
40 if [ $count -eq 0 ]; then
41 fail "none of events are recorded"
44 do_reset
46 echo 0 > events/enable
48 yield
50 count=`cat trace | grep -v ^# | wc -l`
51 if [ $count -ne 0 ]; then
52 fail "any of events should not be recorded"
55 exit 0