From patchwork Fri Jun 23 08:14:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 9805907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 44D6E6086C for ; Fri, 23 Jun 2017 08:15:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3966E20373 for ; Fri, 23 Jun 2017 08:15:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BE9728714; Fri, 23 Jun 2017 08:15:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B761D20373 for ; Fri, 23 Jun 2017 08:15:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753891AbdFWIPA (ORCPT ); Fri, 23 Jun 2017 04:15:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:35638 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753551AbdFWIPA (ORCPT ); Fri, 23 Jun 2017 04:15:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9C82DAC05; Fri, 23 Jun 2017 08:14:58 +0000 (UTC) From: Johannes Thumshirn To: Omar Sandoval Cc: Linux Block Layer Mailinglist , Johannes Thumshirn Subject: [PATCH blktests] sg/001: don't require scsi_debug Date: Fri, 23 Jun 2017 10:14:48 +0200 Message-Id: <20170623081448.8121-1-jthumshirn@suse.de> X-Mailer: git-send-email 2.12.3 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Don't require scsi_debug but check if TEST_DEV is a SCSI device and use it instead. Signed-off-by: Johannes Thumshirn --- 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" }