[PATCH blktests v2 5/6] scsi/{004,005}: allow to run with built-in scsi_debug

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

 



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

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

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
---
 tests/scsi/004 | 4 ++--
 tests/scsi/005 | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/scsi/004 b/tests/scsi/004
index f0845c1..7d0af54 100755
--- a/tests/scsi/004
+++ b/tests/scsi/004
@@ -18,13 +18,13 @@ DESCRIPTION="ensure repeated TASK SET FULL results in EIO on timing out command"
 CAN_BE_ZONED=1
 
 requires() {
-	_have_module scsi_debug
+	_have_scsi_debug
 }
 
 test() {
 	echo "Running ${TEST_NAME}"
 
-	if ! _init_scsi_debug add_host=1 max_luns=1 statistics=1 every_nth=1; then
+	if ! _configure_scsi_debug max_luns=1 statistics=1 every_nth=1; then
 	    return 1
 	fi
 	echo 5 > "/sys/block/${SCSI_DEBUG_DEVICES[0]}/device/timeout"
diff --git a/tests/scsi/005 b/tests/scsi/005
index efd3d82..bfa1014 100755
--- a/tests/scsi/005
+++ b/tests/scsi/005
@@ -11,7 +11,7 @@ DESCRIPTION="test SCSI device blacklisting"
 QUICK=1
 
 requires() {
-	_have_module scsi_debug
+	_have_scsi_debug
 	_have_module_param scsi_debug inq_vendor
 }
 
@@ -33,7 +33,7 @@ test() {
 	for inq in "${inqs[@]}"; do
 		vendor="${inq:0:8}"
 		model="${inq:8:16}"
-		if ! _init_scsi_debug inq_vendor="$vendor" inq_product="$model"; then
+		if ! _configure_scsi_debug inq_vendor="$vendor" inq_product="$model"; then
 			continue
 		fi
 		vendor="$(cat "/sys/block/${SCSI_DEBUG_DEVICES[0]}/device/vendor")"
-- 
2.40.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux