fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
To: fstests@vger.kernel.org
Cc: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
Subject: [PATCH] generic/310: slightly improve check for dmesg error
Date: Mon, 16 Mar 2020 22:54:39 -0300	[thread overview]
Message-ID: <20200317015439.7406-1-pc@cjr.nz> (raw)

The 'grep -c "error"' check was causing false positive results for
cifs.ko when running it with 'echo 1 > /proc/fs/cifs/cifsFYI'.

That is, the test would fail when cifs.ko prints out a non-error
message like this:

  [ 2320.903987] fs/cifs/smb2maperror.c: Mapping SMB2 status code
  0x80000006 to POSIX err -61

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
---
 tests/generic/310 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/generic/310 b/tests/generic/310
index 1fcd517e4e6f..504f7c44c177 100755
--- a/tests/generic/310
+++ b/tests/generic/310
@@ -49,7 +49,7 @@ _require_command "$KILLALL_PROG" killall
 dmesg -c > /dev/null
 
 nr_bug=`dmesg | grep -c "kernel BUG"`
-nr_error=`dmesg | grep -c "error"`
+nr_error=`dmesg | grep -c "EXT[234]-fs 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"`
@@ -58,7 +58,7 @@ nr_lockdep=`dmesg | grep -c "possible recursive locking detected"`
 check_kernel_bug()
 {
 	new_bug=`dmesg | grep -c "kernel BUG"`
-	new_error=`dmesg | grep -c "error"`
+	new_error=`dmesg | grep -c "EXT[234]-fs 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"`
-- 
2.25.1


             reply	other threads:[~2020-03-17  2:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  1:54 Paulo Alcantara (SUSE) [this message]
2020-03-17 10:55 ` [PATCH] generic/310: slightly improve check for dmesg error Zorro Lang
2020-03-17 15:23   ` Paulo Alcantara
2020-03-18  2:10     ` Eryu Guan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200317015439.7406-1-pc@cjr.nz \
    --to=pc@cjr.nz \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).