check: filter lockdep bugs when scanning dmesg
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 17 Apr 2019 01:19:26 +0000 (18:19 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 21 Apr 2019 15:37:19 +0000 (23:37 +0800)
Ignore lockdep complaining about its own bugginess when scanning dmesg
output, because we shouldn't be failing filesystem tests on account of
lockdep.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc

index 8b503eb6340f05da6a4bdb5d5f0978d6e2056765..cbd3c59a39e53231806c4e01616015dec91f6b99 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -3497,6 +3497,16 @@ _check_dmesg_for()
        _dmesg_since_test_start | egrep -q "$1"
 }
 
+# Default filter for dmesg scanning.
+# Ignore lockdep complaining about its own bugginess when scanning dmesg
+# output, because we shouldn't be failing filesystem tests on account of
+# lockdep.
+_check_dmesg_filter()
+{
+       egrep -v -e "BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low" \
+               -e "BUG: MAX_STACK_TRACE_ENTRIES too low"
+}
+
 # check dmesg log for WARNING/Oops/etc.
 _check_dmesg()
 {
@@ -3508,7 +3518,7 @@ _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:-cat}
+       local filter=${1:-_check_dmesg_filter}
 
        _dmesg_since_test_start | $filter >$seqres.dmesg
        egrep -q -e "kernel BUG at" \