The commit 8017ea524367 ("common/rc: ensure modules are loadable in _have_modules()") introduced a helper function _module_file_exists() which assumes module files have extension ".ko". However, the assumption is not true when module files are compressed. In this case, extensions of modules files have abbreviations of compression algorithm such as ".ko.xz",".ko.gz" or ".ko.zstd". This results in module file existence check failure and unexpected test skips. Fix this by changing module file search condition to cover module file extensions with the compression algorithm abbreviations. Fixes: 8017ea524367 ("common/rc: ensure modules are loadable in _have_modules()") Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> Link: https://github.com/osandov/blktests/issues/101 --- common/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/rc b/common/rc index a764b57..e490041 100644 --- a/common/rc +++ b/common/rc @@ -36,8 +36,8 @@ _module_file_exists() local -i count libpath="/lib/modules/$(uname -r)/kernel" - count=$(find "$libpath" -name "$ko_underscore" -o \ - -name "$ko_hyphen" | wc -l) + count=$(find "$libpath" -name "$ko_underscore*" -o \ + -name "$ko_hyphen*" | wc -l) ((count)) && return 0 return 1 } -- 2.37.1