Thread (12 messages) flat view 12 messages, 3 authors, 2023-05-23
STALE1201d REVIEWED: 1 (1M)

Revision v2 of 2 in this series; 1 review trailer.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH blktests v2 1/6] common/rc: skip module file check if modules path does not exist

From: Shin'ichiro Kawasaki <hidden>
Date: 2023-04-25 11:48:20
Also in: linux-scsi
Subsystem: the rest · Maintainer: Linus Torvalds

From: Shin'ichiro Kawasaki <redacted>

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 <redacted>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.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.40.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help