1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 3 # description: event trigger - test inter-event histogram trigger onchange action 4 # requires: set_event "onchange(var)":README ping:program 5 6 fail() { #msg 7 echo $1 8 exit_fail 9 } 10 11 echo "Test onchange action" 12 13 echo 'hist:keys=comm:newprio=prio:onchange($newprio).save(comm,prio) if comm=="ping"' >> events/sched/sched_waking/trigger 14 15 ping $LOCALHOST -c 3 16 nice -n 1 ping $LOCALHOST -c 3 17 18 if ! grep -q "changed:" events/sched/sched_waking/hist; then 19 fail "Failed to create onchange action inter-event histogram" 20 fi 21 22 exit 0
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.