summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d/trigger/trigger-trace-marker-hist.tc
blob: 68f3af9d99102649b6191fae008f9573d0d4028b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# description: trace_marker trigger - test histogram trigger
# requires: set_event events/ftrace/print/trigger events/ftrace/print/hist
# flags: instance

fail() { #msg
    echo $1
    exit_fail
}

echo "Test histogram trace_marker trigger"

echo 'hist:keys=common_pid' > events/ftrace/print/trigger
for i in `seq 1 10` ; do echo "hello" > trace_marker; done
grep 'hitcount: *10$' events/ftrace/print/hist > /dev/null || \
    fail "hist trigger did not trigger correct times on trace_marker"

exit 0