Re: [PATCH blktests] sg/001: don't require scsi_debug
From: Omar Sandoval <osandov@osandov.com>
Date: 2017-06-26 20:19:48
On Fri, Jun 23, 2017 at 10:14:48AM +0200, Johannes Thumshirn wrote:
quoted hunk ↗ jump to hunk
Don't require scsi_debug but check if TEST_DEV is a SCSI device and use it instead. Signed-off-by: Johannes Thumshirn <redacted> --- 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
Since we already check this in tests/sg/group, we don't need this bit. Got rid of it and applied, thanks, Johannes!
quoted hunk ↗ jump to hunk
@@ -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