2 # SPDX-License-Identifier: GPL-2.0
3 # description: trace_marker trigger - test snapshot trigger
11 if [ ! -f set_event
]; then
12 echo "event tracing is not supported"
16 if [ ! -f snapshot
]; then
17 echo "snapshot is not supported"
21 if [ ! -d events
/ftrace
/print
]; then
22 echo "event trace_marker is not supported"
26 if [ ! -f events
/ftrace
/print
/trigger
]; then
27 echo "event trigger is not supported"
35 cat $file |
while read line
; do
36 comment
=`echo $line | sed -e 's/^#//'`
37 if [ "$line" != "$comment" ]; then
40 echo "testing $line for >$x<"
41 match
=`echo $line | sed -e "s/>$x<//"`
42 if [ "$line" = "$match" ]; then
43 fail
"$line does not have >$x< in it"
49 echo "Test snapshot trace_marker tigger"
51 echo 'snapshot' > events
/ftrace
/print
/trigger
53 # make sure the snapshot is allocated
55 grep -q 'Snapshot is allocated' snapshot
57 for i
in `seq 1 10` ; do echo "hello >$i<" > trace_marker
; done