From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Sun Ke <sunke32@huawei.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"hch@infradead.org" <hch@infradead.org>
Subject: Re: [PATCH blktests v2] nbd: add a module load and device connect test
Date: Fri, 22 Jul 2022 00:43:37 +0000 [thread overview]
Message-ID: <20220722004337.zldwcmtigttaaawl@shindev> (raw)
In-Reply-To: <06a95726-8811-eca2-2039-e0686d87fb87@huawei.com>
On Jul 19, 2022 / 14:47, Sun Ke wrote:
>
>
> 在 2022/7/7 20:49, Shinichiro Kawasaki 写道:
> > On Jul 07, 2022 / 11:56, Sun Ke wrote:
> > > This is a regression test for commit 06c4da89c24e
> > > nbd: call genl_unregister_family() first in nbd_cleanup()
> >
> > Hello Sun, thanks for the patch.
> >
> > I reverted the commit 06c4da89c24e from the kernel v5.19-rc5 and observed this
> > test case passes. I checked dmesg and saw kernel message below. Kernel did not
> > report the BUG which was noted in the commit 06c4da89c24e. Instead, nbd driver
> > printed out an error "couldn't allocate config".
> >
> > Jul 07 20:47:01 redsun45q unknown: run blktests nbd/004 at 2022-07-07 20:47:01
> > Jul 07 20:47:01 redsun45q kernel: couldn't allocate config
> > Jul 07 20:47:01 redsun45q kernel: couldn't allocate config
> > Jul 07 20:47:01 redsun45q kernel: couldn't allocate config
> > Jul 07 20:47:01 redsun45q kernel: sysfs: cannot create duplicate filename '/devices/virtual/block/nbd0'
> > Jul 07 20:47:01 redsun45q kernel: CPU: 0 PID: 1043 Comm: modprobe Not tainted 5.19.0-rc5+ #2
> > Jul 07 20:47:01 redsun45q kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
> > Jul 07 20:47:01 redsun45q kernel: Call Trace:
> > Jul 07 20:47:01 redsun45q kernel: <TASK>
> > Jul 07 20:47:01 redsun45q kernel: dump_stack_lvl+0x5b/0x74
> > Jul 07 20:47:01 redsun45q kernel: sysfs_warn_dup.cold+0x17/0x23
> > ...
> >
> > or sysfs printed out an warning:
> >
> > [ 366.098479] run blktests nbd/004 at 2022-07-07 21:17:22
> > [ 366.747180] sysfs: cannot create duplicate filename '/devices/virtual/block/nbd0'
> > [ 366.749653] CPU: 0 PID: 1508 Comm: modprobe Not tainted 5.19.0-rc5+ #2
> > [ 366.751680] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebui
> > lt.qemu.org 04/01/2014
> > [ 366.755169] Call Trace:
> > [ 366.755991] <TASK>
> > [ 366.756722] dump_stack_lvl+0x5b/0x74
> > [ 366.757909] sysfs_warn_dup.cold+0x17/0x23
> > ...
> >
> I retry it on commit 98d40e76652e, it can reproduce the Bug.
I see, then some conditions in my environment are hiding the Bug.
>
> > It would be the better to catch these error and warning message in the test
> > case. For example, following hunk will catch it.
> >
> > diff --git a/tests/nbd/004 b/tests/nbd/004
> > index 6b2c5ff..9277c10 100755
> > --- a/tests/nbd/004
> > +++ b/tests/nbd/004
> > @@ -47,6 +47,12 @@ test() {
> > } 2>/dev/null
> >
> > _stop_nbd_server_netlink
> > +
> > + if _dmesg_since_test_start | grep -q -e "couldn't allocate config" \
> > + -e "cannot create duplicate filename"; then
> > + echo "Fail"
> > + fi
> > +
> > echo "Test complete"
> > }
Still I think the hunk above adds value to the new test case, since it can catch
the Bug as well as the unexpected kernel messages. I saw you added the hunk to
v3. Thanks.
--
Shin'ichiro Kawasaki
prev parent reply other threads:[~2022-07-22 0:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 3:56 [PATCH blktests v2] nbd: add a module load and device connect test Sun Ke
2022-07-07 12:49 ` Shinichiro Kawasaki
2022-07-19 6:22 ` Sun Ke
2022-07-19 6:47 ` Sun Ke
2022-07-22 0:43 ` Shinichiro Kawasaki [this message]
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=20220722004337.zldwcmtigttaaawl@shindev \
--to=shinichiro.kawasaki@wdc.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=sunke32@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