From mboxrd@z Thu Jan 1 00:00:00 1970 From: logang@deltatee.com (Logan Gunthorpe) Date: Fri, 12 Jul 2019 17:57:41 -0600 Subject: [PATCH blktests 11/12] common: Use sysfs instead of modinfo for _have_module_param() In-Reply-To: <20190712235742.22646-1-logang@deltatee.com> References: <20190712235742.22646-1-logang@deltatee.com> Message-ID: <20190712235742.22646-12-logang@deltatee.com> Using modinfo fails if the given module is built-in. Instead, just check for the parameter's existence in sysfs. Signed-off-by: Logan Gunthorpe --- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 49050c71dabf..d48f73c5bf3d 100644 --- a/common/rc +++ b/common/rc @@ -48,7 +48,7 @@ _have_modules() { } _have_module_param() { - if ! modinfo -F parm -0 "$1" | grep -q -z "^$2:"; then + if ! [ -e "/sys/module/$1/parameters/$2" ]; then SKIP_REASON="$1 module does not have parameter $2" return 1 fi -- 2.17.1