@@ -4591,6 +4591,7 @@ _check_dmesg_filter()
grep -E -v -e "BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low" \
-e "BUG: MAX_STACK_TRACE_ENTRIES too low" \
+ -e "WARNING: Reset corrupted AGFL" \
$extra_filter
}
@@ -4613,18 +4614,18 @@ _check_dmesg()
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
- local filter=${1:-_check_dmesg_filter}
+ # we always filter dmesg for global things that should not cause
+ # test failures. Custom filters are then applied afterwards.
+ _dmesg_since_test_start | _check_dmesg_filter > $seqres.dmesg
+ if [ -n "$1" ]; then
+ cat $seqres.dmesg | $1 > $seqres.dmesg
+ fi
- _dmesg_since_test_start | $filter >$seqres.dmesg
grep -E -q -e "kernel BUG at" \
-e "WARNING:" \
-e "\bBUG:" \
-e "Oops:" \
-e "possible recursive locking detected" \
- -e "Internal error" \
-e "(INFO|ERR): suspicious RCU usage" \
-e "INFO: possible circular locking dependency detected" \
-e "general protection fault:" \
@@ -46,7 +46,6 @@ _require_test
dmesg -c > /dev/null
nr_bug=`dmesg | grep -c "kernel BUG"`
-nr_error=`dmesg | grep -wc "error"`
nr_null=`dmesg | grep -c "kernel NULL pointer dereference"`
nr_warning=`dmesg | grep -c "^WARNING"`
nr_lockdep=`dmesg | grep -c "possible recursive locking detected"`
@@ -55,20 +54,18 @@ nr_lockdep=`dmesg | grep -c "possible recursive locking detected"`
check_kernel_bug()
{
new_bug=`dmesg | grep -c "kernel BUG"`
- new_error=`dmesg | grep -wc "error"`
new_null=`dmesg | grep -c "kernel NULL pointer dereference"`
new_warning=`dmesg | grep -c "^WARNING"`
new_lockdep=`dmesg | grep -c "possible recursive locking detected"`
# no kernel bug is detected
- if [ $new_bug -eq $nr_bug -a $new_error -eq $nr_error -a \
+ if [ $new_bug -eq $nr_bug -a \
$new_null -eq $nr_null -a $new_warning -eq $nr_warning -a \
$new_lockdep -eq $nr_lockdep ]; then
return 0
fi
nr_bug=$new_bug
- nr_error=$new_error
nr_null=$new_null
nr_warning=$new_warning
nr_lockdep=$new_lockdep
@@ -45,7 +45,7 @@ _try_scratch_mount "-o logbsize=64k"
# The mount may not fail on v4 filesystems. Check for CRC mismatch warning
# messages to detect failure in this case.
-dmesg -c | grep XFS | grep CRC
+_dmesg_since_test_start | grep "XFS $(_short_dev $SCRATCH_DEV)" | grep CRC
# success, all done
status=0