[PATCH blktests] sg/001: don't require scsi_debug

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

 



Don't require scsi_debug but check if TEST_DEV is a SCSI device and use it
instead.

Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
---
 tests/sg/001 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/sg/001 b/tests/sg/001
index a4cfabe25ba0..fc883ebd1c8a 100755
--- a/tests/sg/001
+++ b/tests/sg/001
@@ -24,13 +24,13 @@ DESCRIPTION="try triggering a kernel GPF with 0 byte SG reads"
 QUICK=1
 
 requires() {
-	_have_src_program sg/syzkaller1 && _have_scsi_debug
+	_have_src_program sg/syzkaller1
 }
 
-test() {
+test_device() {
 	echo "Running ${TEST_NAME}"
 
-	if ! _get_scsi_debug_dev; then
+	if ! _test_dev_is_scsi; then
 		return 1
 	fi
 
@@ -38,7 +38,5 @@ test() {
 	cd "$TMPDIR" || return 1
 	timeout -s INT 10s "$SRCDIR/sg/syzkaller1" "$SG_DEV"
 
-	_put_scsi_debug_dev
-
 	echo "Test complete"
 }
-- 
2.12.3




[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