1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0
3# description: event trigger - test inter-event histogram trigger expected fail actions
4
5fail() { #msg
6    echo $1
7    exit_fail
8}
9
10if [ ! -f set_event ]; then
11    echo "event tracing is not supported"
12    exit_unsupported
13fi
14
15if [ ! -f snapshot ]; then
16    echo "snapshot is not supported"
17    exit_unsupported
18fi
19
20grep -q "snapshot()" README || exit_unsupported # version issue
21
22echo "Test expected snapshot action failure"
23
24echo 'hist:keys=comm:onmatch(sched.sched_wakeup).snapshot()' >> events/sched/sched_waking/trigger && exit_fail
25
26echo "Test expected save action failure"
27
28echo 'hist:keys=comm:onmatch(sched.sched_wakeup).save(comm,prio)' >> events/sched/sched_waking/trigger && exit_fail
29
30exit_xfail
31