From: Christoph Hellwig <hch@lst.de>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: linux-block@vger.kernel.org
Subject: [PATCH blktests 7/7] nvme: don't require the nvme drivers to be built in
Date: Wed, 1 Jun 2022 08:48:37 +0200 [thread overview]
Message-ID: <20220601064837.3473709-8-hch@lst.de> (raw)
In-Reply-To: <20220601064837.3473709-1-hch@lst.de>
Use _have_driver instead of _have_modules to check for the availability
of the nvme drivers, and don't bother checking at all for drivers that
are pulled in as dependencies.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
tests/nvme/rc | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/tests/nvme/rc b/tests/nvme/rc
index ccdccf9..998b181 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -16,21 +16,23 @@ _nvme_requires() {
_have_program nvme
case ${nvme_trtype} in
loop)
- _have_modules nvmet nvme-core nvme-loop
+ _have_driver nvme-loop
_have_configfs
;;
pci)
- _have_modules nvme nvme-core
+ _have_driver nvme
;;
tcp)
- _have_modules nvmet nvme-core nvme-tcp nvmet-tcp
+ _have_driver nvme-tcp
+ _have_driver nvmet-tcp
_have_configfs
;;
rdma)
- _have_modules nvmet nvme-core nvme-rdma nvmet-rdma
+ _have_driver nvme-rdma
+ _have_driver nvmet-rdma
_have_configfs
_have_program rdma
- _have_modules rdma_rxe || _have_modules siw
+ _have_driver rdma_rxe || _have_driver siw
;;
*)
SKIP_REASON="unsupported nvme_trtype=${nvme_trtype}"
@@ -125,11 +127,11 @@ _cleanup_nvmet() {
shopt -u nullglob
trap SIGINT
- modprobe -r nvme-"${nvme_trtype}" 2>/dev/null
+ modprobe -rq nvme-"${nvme_trtype}" 2>/dev/null
if [[ "${nvme_trtype}" != "loop" ]]; then
- modprobe -r nvmet-"${nvme_trtype}" 2>/dev/null
+ modprobe -rq nvmet-"${nvme_trtype}" 2>/dev/null
fi
- modprobe -r nvmet 2>/dev/null
+ modprobe -rq nvmet 2>/dev/null
if [[ "${nvme_trtype}" == "rdma" ]]; then
stop_soft_rdma
fi
@@ -137,11 +139,11 @@ _cleanup_nvmet() {
_setup_nvmet() {
_register_test_cleanup _cleanup_nvmet
- modprobe nvmet
+ modprobe -q nvmet
if [[ "${nvme_trtype}" != "loop" ]]; then
- modprobe nvmet-"${nvme_trtype}"
+ modprobe -q nvmet-"${nvme_trtype}"
fi
- modprobe nvme-"${nvme_trtype}"
+ modprobe -q nvme-"${nvme_trtype}"
if [[ "${nvme_trtype}" == "rdma" ]]; then
start_soft_rdma
for i in $(rdma_network_interfaces)
--
2.30.2
next prev parent reply other threads:[~2022-06-01 6:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 6:48 reduce the dependency on modules v2 Christoph Hellwig
2022-06-01 6:48 ` [PATCH blktests 1/7] nvme: use _have_loop instead of _have_modules loop Christoph Hellwig
2022-06-01 6:48 ` [PATCH blktests 2/7] common: add a helper if a driver is available Christoph Hellwig
2022-06-01 6:48 ` [PATCH blktests 3/7] common: fix _have_module_param_value to work with built-in drivers Christoph Hellwig
2022-06-01 6:48 ` [PATCH blktests 4/7] common: do not require loop support to be modular Christoph Hellwig
2022-06-01 6:48 ` [PATCH blktests 5/7] nbd: do not require nbd " Christoph Hellwig
2022-06-01 6:48 ` [PATCH blktests 6/7] scsi: don't require sg to be built in Christoph Hellwig
2022-06-01 6:48 ` Christoph Hellwig [this message]
2022-06-03 1:23 ` reduce the dependency on modules v2 Shinichiro Kawasaki
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=20220601064837.3473709-8-hch@lst.de \
--to=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.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 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.