Add ":README" suffix support for the requires list, so that the testcase can list up the required string for README file to the requires list. Note that the required string is treated as a fixed string, instead of regular expression. Also, the testcase can specify a string containing spaces with quotes. E.g. # requires: "place: [<module>:]<symbol>":README Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Reviewed-by: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
30 lines
817 B
Bash
30 lines
817 B
Bash
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# description: event trigger - test inter-event histogram trigger snapshot action
|
|
# requires: set_event snapshot events/sched/sched_process_fork/hist "onchange(var)":README "snapshot()":README
|
|
|
|
fail() { #msg
|
|
echo $1
|
|
exit_fail
|
|
}
|
|
|
|
echo "Test snapshot action"
|
|
|
|
echo 1 > events/sched/enable
|
|
|
|
echo 'hist:keys=comm:newprio=prio:onchange($newprio).save(comm,prio):onchange($newprio).snapshot() if comm=="ping"' >> events/sched/sched_waking/trigger
|
|
|
|
ping $LOCALHOST -c 3
|
|
nice -n 1 ping $LOCALHOST -c 3
|
|
|
|
echo 0 > tracing_on
|
|
|
|
if ! grep -q "changed:" events/sched/sched_waking/hist; then
|
|
fail "Failed to create onchange action inter-event histogram"
|
|
fi
|
|
|
|
if ! grep -q "comm=ping" snapshot; then
|
|
fail "Failed to create snapshot action inter-event histogram"
|
|
fi
|
|
|
|
exit 0
|