All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: allow to run most tests with built-in null_blk
Date: Mon, 6 Jun 2022 11:44:38 +0000	[thread overview]
Message-ID: <20220606114438.ia2q2bnlpkmrgcqk@shindev> (raw)
In-Reply-To: <20220603045558.466760-1-hch@lst.de>

On Jun 03, 2022 / 06:55, Christoph Hellwig wrote:
> Hi Shin'ichiro,
> 
> this series updates most tests that use null_blk so that they can
> work with a built-in null_blk driver.  The onces that require
> shared_tags or failure injection, which currently can only be
> controlled through module parameters still require a module until
> the kernel is updated (which I plan to look into).

Hi Christoph,

Thanks for the series. I ran tests with this series in my test system and found
two problems.  Could you revise the series to address them?


1) null_blk built-in: some test cases fail with modprobe message

With the series and null_blk driver built-in, I still observe a number of test
cases with null_blk fail. The error message was follows:

    +modprobe: FATAL: Module null_blk is builtin.

I found the modprobe -r command in _exit_null_blk() reports the message. With
the additional hank below, the message goes away and I observe many passes.

diff --git a/common/null_blk b/common/null_blk
index c82327d..a435147 100644
--- a/common/null_blk
+++ b/common/null_blk
@@ -54,5 +54,5 @@ _configure_null_blk() {
 _exit_null_blk() {
        _remove_null_blk_devices
        udevadm settle
-       modprobe -r null_blk
+       modprobe -qr null_blk
 }

I guess the hank was just slipped out from one of your patches. 2nd patch,
probably.


2) null_blk module: block/023 and other test cases with CAN_BE_ZONED=1 fail

The test cases fail with this message:

mkdir: cannot create directory ‘/sys/kernel/config/nullb/nullb1’: No such file or directory

If null_blk is a module, _configure_null_blk assumes that the module is already
loaded. This is true for most of the test cases since _have_null_blk called in
requires() loads the module. But it is not true for block/023 since this test
case repeats _configure_null_blk and _exit_null_blk in a loop. At the 2nd and
later repetition of the loop, _exit_null_blk unloaded null_blk module and the
assumption is broken. Hence the error.

Also, when RUN_ZONED_TESTS=1 is set in config, test cases with CAN_BE_ZONED=1,
(block/{006,016,017,020,021,023}), repeats the test case twice, once for regular
null_blk and 2nd for zoned null_blk. The 2nd run with zoned_null_blk fails with
the symptom above.

I suggest to add one more commit as follows. It makes _configure_null_blk check
that null_blk module is loaded. If not, loades the module.

diff --git a/common/null_blk b/common/null_blk
index a435147..6be1081 100644
--- a/common/null_blk
+++ b/common/null_blk
@@ -36,6 +36,8 @@ _init_null_blk() {
 _configure_null_blk() {
        local nullb=/sys/kernel/config/nullb/$1 param val

+       [[ ! -d /sys/module/null_blk ]] && modprobe -q null_blk
+
        shift
        mkdir "$nullb" || return $?


On top of the two problems above, I made comments on the last patch. Other than
that, the series looks good to me. Thanks!

-- 
Shin'ichiro Kawasaki

      parent reply	other threads:[~2022-06-06 11:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03  4:55 allow to run most tests with built-in null_blk Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 01/13] common/null_blk: remove explicit queue_mode=2 parameters Christoph Hellwig
2022-06-07  1:47   ` Chaitanya Kulkarni
2022-06-03  4:55 ` [PATCH blktests 02/13] common/null_blk: allow _configure_null_blk with built-in null_blk Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 03/13] common/null_blk: respect RUN_FOR_ZONED in _configure_null_blk Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 04/13] block/029: don't require modular null_blk Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 05/13] block/006: convert to use _configure_null_blk Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 06/13] block/016: " Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 07/13] block/017: " Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 08/13] block/018: " Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 09/13] block/020: " Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 10/13] block/021: " Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 11/13] block/023: " Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 12/13] block/024: " Christoph Hellwig
2022-06-03  4:55 ` [PATCH blktests 13/13] zbd: allow falling back to builtin null_blk Christoph Hellwig
2022-06-06 10:41   ` Shinichiro Kawasaki
2022-06-06 11:44 ` 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=20220606114438.ia2q2bnlpkmrgcqk@shindev \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=hch@lst.de \
    --cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.