staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / event / subsystem-enable.tc
blob83a8c571e93af40425d2c2d80fb60c44b05277ca
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: event tracing - enable/disable with subsystem level files
4 # flags: instance
6 do_reset() {
7 echo > set_event
8 clear_trace
11 fail() { #msg
12 echo $1
13 exit_fail
16 if [ ! -f set_event -o ! -d events/sched ]; then
17 echo "event tracing is not supported"
18 exit_unsupported
21 echo 'sched:*' > set_event
23 yield
25 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
26 if [ $count -lt 3 ]; then
27 fail "at least fork, exec and exit events should be recorded"
30 do_reset
32 echo 1 > events/sched/enable
34 yield
36 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
37 if [ $count -lt 3 ]; then
38 fail "at least fork, exec and exit events should be recorded"
41 do_reset
43 echo 0 > events/sched/enable
45 yield
47 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
48 if [ $count -ne 0 ]; then
49 fail "any of scheduler events should not be recorded"
52 exit 0