From: Shin'ichiro Kawasaki <shinichiro@fastmail.com>
To: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: Shin'ichiro Kawasaki <shinichiro@fastmail.com>,
Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: [PATCH blktests 1/9] common/rc: skip module file check if modules path does not exist
Date: Mon, 17 Apr 2023 21:47:20 +0900 [thread overview]
Message-ID: <20230417124728.458630-2-shinichiro@fastmail.com> (raw)
In-Reply-To: <20230417124728.458630-1-shinichiro@fastmail.com>
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
When all of the kernel modules are built-in, /lib/modules/*/kernel path
may not exist. In this case, check for the path results in failure. Skip
the check when the path does not exist.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
common/rc | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/rc b/common/rc
index af4c0b1..f67b434 100644
--- a/common/rc
+++ b/common/rc
@@ -36,6 +36,7 @@ _module_file_exists()
local -i count
libpath="/lib/modules/$(uname -r)/kernel"
+ [[ ! -d $libpath ]] && return 1
count=$(find "$libpath" -name "$ko_underscore*" -o \
-name "$ko_hyphen*" | wc -l)
((count)) && return 0
--
2.39.2
next prev parent reply other threads:[~2023-04-17 12:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 12:47 [PATCH blktests 0/9] support built-in scsi_debug Shin'ichiro Kawasaki
2023-04-17 12:47 ` Shin'ichiro Kawasaki [this message]
2023-04-18 20:09 ` [PATCH blktests 1/9] common/rc: skip module file check if modules path does not exist Chaitanya Kulkarni
2023-04-17 12:47 ` [PATCH blktests 2/9] common/scsi_debug, tests/*: re-define _have_scsi_debug Shin'ichiro Kawasaki
2023-04-18 20:10 ` Chaitanya Kulkarni
2023-04-17 12:47 ` [PATCH blktests 3/9] common/scsi_debug: factor out _setup_scsi_debug_vars Shin'ichiro Kawasaki
2023-04-18 20:11 ` Chaitanya Kulkarni
2023-04-17 12:47 ` [PATCH blktests 4/9] common/scsi_debug: introduce _configure_scsi_debug Shin'ichiro Kawasaki
2023-04-18 20:15 ` Chaitanya Kulkarni
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=20230417124728.458630-2-shinichiro@fastmail.com \
--to=shinichiro@fastmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@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 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).