Re: [PATCH v3 13/14] tracing/selftest: Add selftests to test trace_marker histogram triggers
From: Steven Rostedt
Date: Fri May 25 2018 - 17:14:01 EST
On Fri, 25 May 2018 17:12:29 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> #!/bin/sh
Hmm, I think I need to make this #!/bin/bash
> test_trace() {
> file=$1
> x=$2
>
> cat $file | while read line; do
> if [ "$line" != "${line/\#/}" ]; then
> continue
> fi
> echo "testing $line for >$x<"
> if [ "$line" == "${line/>$x</}" ]; then
The ${line/>$x</} is unique to bash I believe.
-- Steve
> fail "$line does not have >$x< in it"
> fi
> let x=$x+2
> done
> }
>