staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / ftrace / test.d / trigger / inter-event / trigger-snapshot-action-hist.tc
blob18fff69fc433346f59e7ea3b3fe1d2ded727b605
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
3 # description: event trigger - test inter-event histogram trigger snapshot action
5 fail() { #msg
6 echo $1
7 exit_fail
10 if [ ! -f set_event ]; then
11 echo "event tracing is not supported"
12 exit_unsupported
15 if [ ! -f snapshot ]; then
16 echo "snapshot is not supported"
17 exit_unsupported
20 grep -q "onchange(var)" README || exit_unsupported # version issue
22 grep -q "snapshot()" README || exit_unsupported # version issue
24 echo "Test snapshot action"
26 echo 1 > /sys/kernel/debug/tracing/events/sched/enable
28 echo 'hist:keys=comm:newprio=prio:onchange($newprio).save(comm,prio):onchange($newprio).snapshot() if comm=="ping"' >> /sys/kernel/debug/tracing/events/sched/sched_waking/trigger
30 ping $LOCALHOST -c 3
31 nice -n 1 ping $LOCALHOST -c 3
33 echo 0 > tracing_on
35 if ! grep -q "changed:" events/sched/sched_waking/hist; then
36 fail "Failed to create onchange action inter-event histogram"
39 if ! grep -q "comm=ping" snapshot; then
40 fail "Failed to create snapshot action inter-event histogram"
43 exit 0