fi
}
-_check_dmesg()
-{
- if [ ! -f ${RESULT_DIR}/check_dmesg ]; then
- return
- fi
- rm -f ${RESULT_DIR}/check_dmesg
-
- # search the dmesg log of last run of $seqnum for possible failures
- # use sed \cregexpc address type, since $seqnum contains "/"
- dmesg | tac | sed -ne "0,\#run fstests $seqnum at $date_time#p" | \
- tac >$seqres.dmesg
- grep -q -e "kernel BUG at" \
- -e "WARNING:" \
- -e "BUG:" \
- -e "Oops:" \
- -e "possible recursive locking detected" \
- $seqres.dmesg
- if [ $? -eq 0 ]; then
- echo "_check_dmesg: something found in dmesg (see $seqres.dmesg)"
- err=true
- else
- rm -f $seqres.dmesg
- fi
-}
-
-
_prepare_test_list
if $OPTIONS_HAVE_SECTIONS; then
# the filename for the test and the name output are different.
# we don't include the tests/ directory in the name output.
- seqnum=`echo $seq | sed -e "s;$SRC_DIR/;;"`
+ export seqnum=`echo $seq | sed -e "s;$SRC_DIR/;;"`
# Similarly, the result directory needs to replace the tests/
# part of the test location.
[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
$LOGGER_PROG "run xfstest $seqnum"
if [ -w /dev/kmsg ]; then
- date_time=`date +"%F %T"`
+ export date_time=`date +"%F %T"`
echo "run fstests $seqnum at $date_time" > /dev/kmsg
# _check_dmesg depends on this log in dmesg
touch ${RESULT_DIR}/check_dmesg
try="$try $seqnum"
n_try=`expr $n_try + 1`
_check_filesystems
- _check_dmesg
+ _check_dmesg || err=true
fi
fi
grep `_short_dev $1` /proc/partitions | awk '{print $3}'
}
+# check dmesg log for WARNING/Oops/etc.
+_check_dmesg()
+{
+ if [ ! -f ${RESULT_DIR}/check_dmesg ]; then
+ return 0
+ fi
+ rm -f ${RESULT_DIR}/check_dmesg
+
+ # search the dmesg log of last run of $seqnum for possible failures
+ # use sed \cregexpc address type, since $seqnum contains "/"
+ dmesg | tac | sed -ne "0,\#run fstests $seqnum at $date_time#p" | \
+ tac >$seqres.dmesg
+ grep -q -e "kernel BUG at" \
+ -e "WARNING:" \
+ -e "BUG:" \
+ -e "Oops:" \
+ -e "possible recursive locking detected" \
+ $seqres.dmesg
+ if [ $? -eq 0 ]; then
+ echo "_check_dmesg: something found in dmesg (see $seqres.dmesg)"
+ return 1
+ else
+ rm -f $seqres.dmesg
+ return 0
+ fi
+}
+
# don't check dmesg log after test
_disable_dmesg_check()
{