From: Liu Bo <bo.li.liu@oracle.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, Filipe Manana <fdmanana@gmail.com>,
Eryu Guan <eguan@redhat.com>
Subject: [PATCH 2/6] fstests: add _get_current_dmesg
Date: Tue, 9 May 2017 11:56:07 -0600 [thread overview]
Message-ID: <1494352571-17199-3-git-send-email-bo.li.liu@oracle.com> (raw)
In-Reply-To: <1494352571-17199-1-git-send-email-bo.li.liu@oracle.com>
_get_current_dmesg can be used to grep customized pattern.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
common/rc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/common/rc b/common/rc
index 78a2101..111ed69 100644
--- a/common/rc
+++ b/common/rc
@@ -3215,6 +3215,12 @@ _get_device_size()
grep `_short_dev $1` /proc/partitions | awk '{print $3}'
}
+# get current dmesg log
+_get_current_dmesg()
+{
+ dmesg | tac | sed -ne "0,\#run fstests $seqnum at $date_time#p" | tac
+}
+
# check dmesg log for WARNING/Oops/etc.
_check_dmesg()
{
@@ -3230,8 +3236,7 @@ _check_dmesg()
# 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
+ _get_current_dmesg | $filter >$seqres.dmesg
grep -q -e "kernel BUG at" \
-e "WARNING:" \
-e "BUG:" \
--
2.5.0
next prev parent reply other threads:[~2017-05-09 18:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 17:56 [PATCH 0/6] Regression test for btrfs read repair Liu Bo
2017-05-09 17:56 ` [PATCH 1/6] fstests: add _filter_filefrag Liu Bo
2017-05-09 17:56 ` Liu Bo [this message]
2017-05-10 10:40 ` [PATCH 2/6] fstests: add _get_current_dmesg Eryu Guan
2017-05-09 17:56 ` [PATCH 3/6] fstests: regression test for btrfs dio read repair Liu Bo
2017-05-10 10:53 ` Eryu Guan
2017-05-09 17:56 ` [PATCH 4/6] fstests: regression test for btrfs buffered read's repair Liu Bo
2017-05-09 17:56 ` [PATCH 5/6] fstests: regression test for nocsum dio " Liu Bo
2017-05-09 17:56 ` [PATCH 6/6] fstests: regression test for nocsum buffered " Liu Bo
2017-05-10 10:56 ` 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=1494352571-17199-3-git-send-email-bo.li.liu@oracle.com \
--to=bo.li.liu@oracle.com \
--cc=eguan@redhat.com \
--cc=fdmanana@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@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).