2 # SPDX-License-Identifier: GPL-2.0
3 # description: trace_marker trigger - test snapshot trigger
19 if [ ! -f set_event ]; then
20 echo "event tracing is not supported"
24 if [ ! -f snapshot ]; then
25 echo "snapshot is not supported"
29 if [ ! -d events/ftrace/print ]; then
30 echo "event trace_marker is not supported"
34 if [ ! -f events/ftrace/print/trigger ]; then
35 echo "event trigger is not supported"
43 cat $file | while read line; do
44 comment=`echo $line | sed -e 's/^#//'`
45 if [ "$line" != "$comment" ]; then
48 echo "testing $line for >$x<"
49 match=`echo $line | sed -e "s/>$x<//"`
50 if [ "$line" == "$match" ]; then
51 fail "$line does not have >$x< in it"
59 echo "Test snapshot trace_marker tigger"
61 echo 'snapshot' > events/ftrace/print/trigger
63 # make sure the snapshot is allocated
65 grep -q 'Snapshot is allocated' snapshot
67 for i in `seq 1 10` ; do echo "hello >$i<" > trace_marker; done