common/rc: fix up variable naming

Remove the leading underscore from local variable names, and add a
leading underscore to $err_msg to reflect its status as a global
variable shared by 'check' and 'common/report'.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Eric Biggers
2018-04-06 19:35:30 -07:00
committed by Eryu Guan
parent 1ddae54555
commit 09c5e9bc89
3 changed files with 80 additions and 80 deletions
+7 -7
View File
@@ -38,7 +38,7 @@ randomize=false
export here=`pwd`
xfile=""
brief_test_summary=false
err_msg=""
_err_msg=""
do_report=false
DUMP_OUTPUT=false
@@ -634,7 +634,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
for seq in $list
do
err=false
err_msg=""
_err_msg=""
if [ ! -f $seq ]; then
# Try to get full name in case the user supplied only seq id
# and the test has a name. A bit of hassle to find really
@@ -732,8 +732,8 @@ for section in $HOST_OPTIONS_SECTIONS; do
if [ -f core ]
then
err_msg="[dumped core]"
echo -n " $err_msg"
_err_msg="[dumped core]"
echo -n " $_err_msg"
mv core $RESULT_BASE/$seqnum.core
err=true
fi
@@ -749,8 +749,8 @@ for section in $HOST_OPTIONS_SECTIONS; do
else
if [ $sts -ne 0 ]
then
err_msg="[failed, exit status $sts]"
echo -n " $err_msg"
_err_msg="[failed, exit status $sts]"
echo -n " $_err_msg"
err=true
fi
if [ ! -f $seq.out ]
@@ -785,7 +785,7 @@ for section in $HOST_OPTIONS_SECTIONS; do
" to see the entire diff)"
fi; } | \
sed -e 's/^\(.\)/ \1/'
err_msg="output mismatch (see $diff $seq.out $seqres.out.bad)"
_err_msg="output mismatch (see $diff $seq.out $seqres.out.bad)"
err=true
fi
fi