UBUNTU: SAUCE: selftests/ftrace: Fix tab expansion in trace_marker snapshot trigger test

When trace lines are passed through echo tabs are being changed
to spaces, causing later string comparisons to fail. Add quotes
around the variables to prevent this.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
This commit is contained in:
Seth Forshee
2019-01-25 12:43:49 -06:00
committed by Paolo Pisati
parent a5b0763ba6
commit 8e83223667
@@ -14,12 +14,12 @@ test_trace() {
x=$2
cat $file | while read line; do
comment=`echo $line | sed -e 's/^#//'`
comment=`echo "$line" | sed -e 's/^#//'`
if [ "$line" != "$comment" ]; then
continue
fi
echo "testing $line for >$x<"
match=`echo $line | sed -e "s/>$x<//"`
match=`echo "$line" | sed -e "s/>$x<//"`
if [ "$line" = "$match" ]; then
fail "$line does not have >$x< in it"
fi