diff mbox series

[blktests] common/rc: Uniform the style of skip reasons

Message ID 20241029051551.68260-1-lizhijian@fujitsu.com (mailing list archive)
State New, archived
Headers show
Series [blktests] common/rc: Uniform the style of skip reasons | expand

Commit Message

Zhijian Li (Fujitsu) Oct. 29, 2024, 5:15 a.m. UTC
Before:
srp/***                                                      [not run]
    driver scsi_dh_alua is not available
    driver scsi_dh_emc is not available
    driver scsi_dh_rdac is not available
    dm_multipath module is not available
    dm_queue_length module is not available
    dm_service_time module is not available
    ib_srpt module is not available
    ib_umad module is not available
    null_blk module is not available
    scsi_debug module is not available
    target_core_iblock module is not available
    sg_reset is not available

After:
srp/***                                                      [not run]
    driver scsi_dh_alua is not available
    driver scsi_dh_emc is not available
    driver scsi_dh_rdac is not available
    module dm_multipath is not available
    module dm_queue_length is not available
    module dm_service_time is not available
    module ib_srpt is not available
    module ib_umad is not available
    module null_blk is not available
    module scsi_debug is not available
    module target_core_iblock is not available
    command sg_reset is not available

Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
 common/rc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Chaitanya Kulkarni Oct. 30, 2024, 8:09 a.m. UTC | #1
On 10/28/24 22:15, Li Zhijian wrote:
> Before:
> srp/***                                                      [not run]
>      driver scsi_dh_alua is not available
>      driver scsi_dh_emc is not available
>      driver scsi_dh_rdac is not available
>      dm_multipath module is not available
>      dm_queue_length module is not available
>      dm_service_time module is not available
>      ib_srpt module is not available
>      ib_umad module is not available
>      null_blk module is not available
>      scsi_debug module is not available
>      target_core_iblock module is not available
>      sg_reset is not available
>
> After:
> srp/***                                                      [not run]
>      driver scsi_dh_alua is not available
>      driver scsi_dh_emc is not available
>      driver scsi_dh_rdac is not available
>      module dm_multipath is not available
>      module dm_queue_length is not available
>      module dm_service_time is not available
>      module ib_srpt is not available
>      module ib_umad is not available
>      module null_blk is not available
>      module scsi_debug is not available
>      module target_core_iblock is not available
>      command sg_reset is not available
>
> Signed-off-by: Li Zhijian<lizhijian@fujitsu.com>


Much easier to read this way, looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
Shinichiro Kawasaki Nov. 1, 2024, 12:48 p.m. UTC | #2
On Oct 29, 2024 / 13:15, Li Zhijian wrote:
> Before:
> srp/***                                                      [not run]
>     driver scsi_dh_alua is not available
>     driver scsi_dh_emc is not available
>     driver scsi_dh_rdac is not available
>     dm_multipath module is not available
>     dm_queue_length module is not available
>     dm_service_time module is not available
>     ib_srpt module is not available
>     ib_umad module is not available
>     null_blk module is not available
>     scsi_debug module is not available
>     target_core_iblock module is not available
>     sg_reset is not available
> 
> After:
> srp/***                                                      [not run]
>     driver scsi_dh_alua is not available
>     driver scsi_dh_emc is not available
>     driver scsi_dh_rdac is not available
>     module dm_multipath is not available
>     module dm_queue_length is not available
>     module dm_service_time is not available
>     module ib_srpt is not available
>     module ib_umad is not available
>     module null_blk is not available
>     module scsi_debug is not available
>     module target_core_iblock is not available
>     command sg_reset is not available
> 
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>

Applied, thanks!
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 6a9a26c..b2e68b2 100644
--- a/common/rc
+++ b/common/rc
@@ -70,7 +70,7 @@  _have_driver()
 # built-in the kernel.
 _have_module() {
 	if ! _module_file_exists "${1}"; then
-		SKIP_REASONS+=("${1} module is not available")
+		SKIP_REASONS+=("module ${1} is not available")
 		return 1
 	fi
 	return 0
@@ -84,7 +84,7 @@  _have_module_param() {
 	fi
 
 	if ! modinfo -F parm -0 "$1" | grep -q -z "^$2:"; then
-		SKIP_REASONS+=("$1 module does not have parameter $2")
+		SKIP_REASONS+=("module $1 does not have parameter $2")
 		return 1
 	fi
 	return 0
@@ -106,7 +106,7 @@  _have_module_param_value() {
 
 	value=$(cat "/sys/module/$modname/parameters/$param")
 	if [[ "${value}" != "$expected_value" ]]; then
-		SKIP_REASONS+=("$modname module parameter $param must be set to $expected_value")
+		SKIP_REASONS+=("module $modname parameter $param must be set to $expected_value")
 		return 1
 	fi
 
@@ -117,7 +117,7 @@  _have_program() {
 	if command -v "$1" >/dev/null 2>&1; then
 		return 0
 	fi
-	SKIP_REASONS+=("$1 is not available")
+	SKIP_REASONS+=("command $1 is not available")
 	return 1
 }