From patchwork Fri Aug 16 09:34:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 11097407 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECDED1398 for ; Fri, 16 Aug 2019 09:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7378289DA for ; Fri, 16 Aug 2019 09:39:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C754A289EF; Fri, 16 Aug 2019 09:39:37 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A285289D7 for ; Fri, 16 Aug 2019 09:39:37 +0000 (UTC) Received: from localhost ([::1]:52518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyYhs-0005ag-9U for patchwork-qemu-devel@patchwork.kernel.org; Fri, 16 Aug 2019 05:39:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59382) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyYdI-0008Gp-L7 for qemu-devel@nongnu.org; Fri, 16 Aug 2019 05:34:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyYdH-0003Yn-F6 for qemu-devel@nongnu.org; Fri, 16 Aug 2019 05:34:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40722) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hyYdD-0003QP-9S; Fri, 16 Aug 2019 05:34:48 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3570B7FDE5; Fri, 16 Aug 2019 09:34:45 +0000 (UTC) Received: from localhost.localdomain.com (dhcp-200-226.str.redhat.com [10.33.200.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 700595C1D6; Fri, 16 Aug 2019 09:34:44 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 16 Aug 2019 11:34:24 +0200 Message-Id: <20190816093439.14262-2-kwolf@redhat.com> In-Reply-To: <20190816093439.14262-1-kwolf@redhat.com> References: <20190816093439.14262-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 16 Aug 2019 09:34:45 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 01/16] iotests/118: Test media change for scsi-cd X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The test covered only floppy and ide-cd. Add scsi-cd as well. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- tests/qemu-iotests/118 | 20 ++++++++++++++++++++ tests/qemu-iotests/118.out | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 index 499c5f0901..3c20d2d61f 100755 --- a/tests/qemu-iotests/118 +++ b/tests/qemu-iotests/118 @@ -33,6 +33,8 @@ def interface_to_device_name(interface): return 'ide-cd' elif interface == 'floppy': return 'floppy' + elif interface == 'scsi': + return 'scsi-cd' else: return None @@ -297,6 +299,8 @@ class TestInitiallyFilled(GeneralChangeTestsBaseClass): qemu_img('create', '-f', iotests.imgfmt, new_img, '1440k') self.vm = iotests.VM() self.vm.add_drive(old_img, 'media=%s' % media, 'none') + if interface == 'scsi': + self.vm.add_device('virtio-scsi-pci') self.vm.add_device('%s,drive=drive0,id=%s' % (interface_to_device_name(interface), self.device_name)) @@ -330,6 +334,8 @@ class TestInitiallyEmpty(GeneralChangeTestsBaseClass): def setUp(self, media, interface): qemu_img('create', '-f', iotests.imgfmt, new_img, '1440k') self.vm = iotests.VM().add_drive(None, 'media=%s' % media, 'none') + if interface == 'scsi': + self.vm.add_device('virtio-scsi-pci') self.vm.add_device('%s,drive=drive0,id=%s' % (interface_to_device_name(interface), self.device_name)) @@ -363,6 +369,20 @@ class TestCDInitiallyEmpty(TestInitiallyEmpty): def setUp(self): self.TestInitiallyEmpty.setUp(self, 'cdrom', 'ide') +class TestSCSICDInitiallyFilled(TestInitiallyFilled): + TestInitiallyFilled = TestInitiallyFilled + has_real_tray = True + + def setUp(self): + self.TestInitiallyFilled.setUp(self, 'cdrom', 'scsi') + +class TestSCSICDInitiallyEmpty(TestInitiallyEmpty): + TestInitiallyEmpty = TestInitiallyEmpty + has_real_tray = True + + def setUp(self): + self.TestInitiallyEmpty.setUp(self, 'cdrom', 'scsi') + class TestFloppyInitiallyFilled(TestInitiallyFilled): TestInitiallyFilled = TestInitiallyFilled has_real_tray = False diff --git a/tests/qemu-iotests/118.out b/tests/qemu-iotests/118.out index 4823c113d5..b4ff997a8c 100644 --- a/tests/qemu-iotests/118.out +++ b/tests/qemu-iotests/118.out @@ -1,5 +1,5 @@ -............................................................... +......................................................................................... ---------------------------------------------------------------------- -Ran 63 tests +Ran 89 tests OK