From: Johannes Thumshirn Date: Fri, 23 Jun 2017 08:14:48 +0000 (+0200) Subject: sg/001: don't require scsi_debug X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b9c5ed3b576a376458a09790ce5ccabb0cf91c36;p=users%2Fsagi%2Fblktests.git sg/001: don't require scsi_debug Don't require scsi_debug but check if TEST_DEV is a SCSI device and use it instead. Signed-off-by: Johannes Thumshirn --- diff --git a/tests/sg/001 b/tests/sg/001 index a4cfabe..b5a14ac 100755 --- a/tests/sg/001 +++ b/tests/sg/001 @@ -24,21 +24,15 @@ 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 - return 1 - fi - SG_DEV="/dev/$(_get_sg_from_blockdev "$SCSI_DEBUG_NAME")" cd "$TMPDIR" || return 1 timeout -s INT 10s "$SRCDIR/sg/syzkaller1" "$SG_DEV" - _put_scsi_debug_dev - echo "Test complete" }