fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: [PATCH 1/2] fstests: Always dump dmesg for failed test cases
Date: Mon, 20 Jan 2020 15:09:37 +0800	[thread overview]
Message-ID: <20200120070938.30247-1-wqu@suse.com> (raw)

When hard-to-hit bugs happened, we really want every piece of info to
help us debugging.

Although we already have KEEP_DMESG config, not everyone is utilizing
it, thus when hard-to-hit bugs happened, one could only set it and retry
until next hit.

This patch will change the behavior by always dumping the dmesg for
failed tests, so that developers can always get extra info from any
failure.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 check | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/check b/check
index 2e148e5776e5..e580b2249f06 100755
--- a/check
+++ b/check
@@ -840,6 +840,9 @@ for section in $HOST_OPTIONS_SECTIONS; do
 
 	# make sure we record the status of the last test we ran.
 	if $err ; then
+		if [ ! -f $seqres.dmesg ]; then
+			_dmesg_since_test_start >$seqres.dmesg
+		fi
 		bad="$bad $seqnum"
 		n_bad=`expr $n_bad + 1`
 		tc_status="fail"
-- 
2.24.1


             reply	other threads:[~2020-01-20  7:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  7:09 Qu Wenruo [this message]
2020-01-20  7:09 ` [PATCH 2/2] fstests: btrfs: Fix a bug where test case can't grab the 2nd device when glob is used Qu Wenruo
2020-02-09 15:52   ` Eryu Guan
2020-02-10  0:30     ` Qu Wenruo
2020-02-09 15:48 ` [PATCH 1/2] fstests: Always dump dmesg for failed test cases Eryu Guan
2020-02-10  0:29   ` Qu Wenruo

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=20200120070938.30247-1-wqu@suse.com \
    --to=wqu@suse.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).