@@ -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
@@ -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
@@ -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
}
@@ -13,7 +13,7 @@ QUICK=1
requires() {
_have_blktrace
- _have_scsi_debug
+ _have_driver scsi_debug
}
test() {
@@ -20,7 +20,7 @@ CAN_BE_ZONED=1
requires() {
_have_cgroup2_controller io
- _have_scsi_debug
+ _have_driver scsi_debug
_have_fio
}
@@ -19,7 +19,7 @@ QUICK=1
requires() {
_have_cgroup2_controller io
- _have_scsi_debug
+ _have_driver scsi_debug
}
scsi_debug_rebind() {
@@ -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() {
@@ -11,7 +11,6 @@ DESCRIPTION="test SCSI device blacklisting"
QUICK=1
requires() {
- _have_scsi_debug
_have_module_param scsi_debug inq_vendor
}
- _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@fujitsu.com> --- 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(-)