[PATCH blktests v2 6/6] block/{001,002,027}: allow to run with built-in scsi_debug and sd_mod

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>

To allow the test cases run with build-in scsi_debug, replace
'_have_module scsi_debug' with _have_scsi_debug, and replace
_init_scsi_debug with _configure_scsi_debug.

Also to allow block/001 run with built-in sd_mod, replace
'_have_module sd_mod' with '_have_kernel_option BLK_DEV_SD'. When sd_mod
driver is built-in, /sys/module/sd_mod directory is not created. Then
_have_driver() can not detect availability of the driver. Instead, refer
the kernel config to check availability of the driver.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
---
 tests/block/001 | 6 +++---
 tests/block/002 | 4 ++--
 tests/block/027 | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/block/001 b/tests/block/001
index 2ea3754..32dd22f 100755
--- a/tests/block/001
+++ b/tests/block/001
@@ -13,13 +13,13 @@ DESCRIPTION="stress device hotplugging"
 TIMED=1
 
 requires() {
-	_have_module scsi_debug
-	_have_driver sd_mod
+	_have_scsi_debug
+	_have_kernel_option BLK_DEV_SD
 	_have_driver sr_mod
 }
 
 stress_scsi_debug() {
-	if ! _init_scsi_debug "$@"; then
+	if ! _configure_scsi_debug "$@"; then
 		return
 	fi
 
diff --git a/tests/block/002 b/tests/block/002
index a5f3ee5..b16d014 100755
--- a/tests/block/002
+++ b/tests/block/002
@@ -13,13 +13,13 @@ QUICK=1
 
 requires() {
 	_have_blktrace
-	_have_module scsi_debug
+	_have_scsi_debug
 }
 
 test() {
 	echo "Running ${TEST_NAME}"
 
-	if ! _init_scsi_debug delay=0; then
+	if ! _configure_scsi_debug delay=0; then
 		return 1
 	fi
 
diff --git a/tests/block/027 b/tests/block/027
index ab6369b..a79a115 100755
--- a/tests/block/027
+++ b/tests/block/027
@@ -20,12 +20,12 @@ CAN_BE_ZONED=1
 
 requires() {
 	_have_cgroup2_controller io
-	_have_module scsi_debug
+	_have_scsi_debug
 	_have_fio
 }
 
 scsi_debug_stress_remove() {
-	if ! _init_scsi_debug "$@"; then
+	if ! _configure_scsi_debug "$@"; then
 		return
 	fi
 
-- 
2.40.0




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux