From: Tahsin Erdogan <tahsin@google.com>
To: fstests@vger.kernel.org
Cc: Zhao Hongjiang <zhaohongjiang@huawei.com>,
Theodore Ts'o <tytso@mit.edu>, Tahsin Erdogan <tahsin@google.com>
Subject: [PATCH] generic/310: make ext[2-4] error patterns more specific
Date: Wed, 11 Nov 2015 16:36:30 -0800 [thread overview]
Message-ID: <1447288590-31937-1-git-send-email-tahsin@google.com> (raw)
This test watches for ext[2-4] filesystem errors in kernel messages but it
incorrectly identifies unrelated messages that contain string "error" as
a failure condition.
Make grep pattern more specific to catch only relevant messages.
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
---
tests/generic/310 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/generic/310 b/tests/generic/310
index c0a8645..9173fb9 100755
--- a/tests/generic/310
+++ b/tests/generic/310
@@ -62,7 +62,7 @@ _require_test
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"`
@@ -71,7 +71,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.6.0.rc2.230.g3dd15c0
next reply other threads:[~2015-11-12 0:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 0:36 Tahsin Erdogan [this message]
2015-11-12 16:15 ` [PATCH] generic/310: make ext[2-4] error patterns more specific Theodore Ts'o
2015-11-12 20:28 ` Dave Chinner
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=1447288590-31937-1-git-send-email-tahsin@google.com \
--to=tahsin@google.com \
--cc=fstests@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=zhaohongjiang@huawei.com \
/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