- _have_scsi_debug is same with _have_driver scsi_debug, it seems there is no a strong opinion to keep it. - In addition, '_have_module_param scsi_debug' will test _have_driver first, that means it's safe to remove its former _have_driver in requires() Signed-off-by: Li Zhijian <lizhijian@xxxxxxxxxxx> --- common/scsi_debug | 4 ---- new | 2 +- tests/block/001 | 2 +- tests/block/002 | 2 +- tests/block/027 | 2 +- tests/block/037 | 2 +- tests/scsi/004 | 2 +- tests/scsi/005 | 1 - 8 files changed, 6 insertions(+), 11 deletions(-) diff --git a/common/scsi_debug b/common/scsi_debug index 594883c95713..9997afa0154c 100644 --- a/common/scsi_debug +++ b/common/scsi_debug @@ -4,10 +4,6 @@ # # scsi_debug helper functions. -_have_scsi_debug() { - _have_driver scsi_debug -} - SD_PARAM_PATH=/sys/module/scsi_debug/parameters SD_PSEUDO_PATH=/sys/bus/pseudo/drivers/scsi_debug diff --git a/new b/new index d84f01d62e30..fe2cb6a12242 100755 --- a/new +++ b/new @@ -261,7 +261,7 @@ test() { # E.g., TEST_NAME and GROUPS. Variables local to the test are lowercase # with underscores. # - Functions defined by the testing framework or group scripts, including -# helpers, have a leading underscore. E.g., _have_scsi_debug. Functions local +# helpers, have a leading underscore. E.g., _have_driver. Functions local # to the test should not have a leading underscore. # - Both [[ ]] form and [ ] form are fine for tests. [[ ]] is preferred. # - Always quote variable expansions unless the variable is a number or inside of diff --git a/tests/block/001 b/tests/block/001 index 32dd22f8481a..3f576fa0e1b5 100755 --- a/tests/block/001 +++ b/tests/block/001 @@ -13,7 +13,7 @@ DESCRIPTION="stress device hotplugging" TIMED=1 requires() { - _have_scsi_debug + _have_driver scsi_debug _have_kernel_option BLK_DEV_SD _have_driver sr_mod } diff --git a/tests/block/002 b/tests/block/002 index 65b0fbdd9800..c57e27dee30d 100755 --- a/tests/block/002 +++ b/tests/block/002 @@ -13,7 +13,7 @@ QUICK=1 requires() { _have_blktrace - _have_scsi_debug + _have_driver scsi_debug } test() { diff --git a/tests/block/027 b/tests/block/027 index f59dad2f231c..317c06db0fa9 100755 --- a/tests/block/027 +++ b/tests/block/027 @@ -20,7 +20,7 @@ CAN_BE_ZONED=1 requires() { _have_cgroup2_controller io - _have_scsi_debug + _have_driver scsi_debug _have_fio } diff --git a/tests/block/037 b/tests/block/037 index 6ecbe3731194..bdffcae13a9a 100755 --- a/tests/block/037 +++ b/tests/block/037 @@ -19,7 +19,7 @@ QUICK=1 requires() { _have_cgroup2_controller io - _have_scsi_debug + _have_driver scsi_debug } scsi_debug_rebind() { diff --git a/tests/scsi/004 b/tests/scsi/004 index 7d0af54415de..4fe48182425a 100755 --- a/tests/scsi/004 +++ b/tests/scsi/004 @@ -18,7 +18,7 @@ DESCRIPTION="ensure repeated TASK SET FULL results in EIO on timing out command" CAN_BE_ZONED=1 requires() { - _have_scsi_debug + _have_driver scsi_debug } test() { diff --git a/tests/scsi/005 b/tests/scsi/005 index bfa1014d4ea3..f8d9b30c6894 100755 --- a/tests/scsi/005 +++ b/tests/scsi/005 @@ -11,7 +11,6 @@ DESCRIPTION="test SCSI device blacklisting" QUICK=1 requires() { - _have_scsi_debug _have_module_param scsi_debug inq_vendor } -- 2.47.0