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
+
+ # default filter is a simple cat command, caller could provide a
+ # customized filter and pass the name through the first argument, to
+ # filter out intentional WARNINGs or Oopses
+ filter=${1:-cat}
+
+ # 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 | $filter >$seqres.dmesg
+ grep -q -e "kernel BUG at" \
+ -e "WARNING:" \
+ -e "BUG:" \
+ -e "Oops:" \
+ -e "possible recursive locking detected" \
+ -e "Internal error" \
+ $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()
{