From nobody Fri May 3 12:25:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505294148683984.2843385087837; Wed, 13 Sep 2017 02:15:48 -0700 (PDT) Received: from localhost ([::1]:41108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3lr-0003gt-U2 for importer@patchew.org; Wed, 13 Sep 2017 05:15:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3h6-0006qD-Bm for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds3h5-0003sg-5N for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:10:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53852) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds3h2-0003oQ-0s; Wed, 13 Sep 2017 05:10:48 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2EB7A81DF6; Wed, 13 Sep 2017 09:10:47 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CC8F60C16; Wed, 13 Sep 2017 09:10:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2EB7A81DF6 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com From: Cornelia Huck To: kwolf@redhat.com, mreitz@redhat.com Date: Wed, 13 Sep 2017 11:10:36 +0200 Message-Id: <20170913091038.2900-2-cohuck@redhat.com> In-Reply-To: <20170913091038.2900-1-cohuck@redhat.com> References: <20170913091038.2900-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 13 Sep 2017 09:10:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 1/3] iotests: use -ccw on s390x for 040, 139, and 182 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, haoqf@linux.vnet.ibm.com, qemu-block@nongnu.org, david@redhat.com, Cornelia Huck , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The default cpu model on s390x does not provide zPCI, which is not yet wired up on tcg. Moreover, virtio-ccw is the standard on s390x, so use the -ccw instead of the -pci versions of virtio devices on s390x. Reviewed-by: Kevin Wolf Signed-off-by: Cornelia Huck Reviewed-by: QingFeng Hao --- tests/qemu-iotests/040 | 6 +++++- tests/qemu-iotests/139 | 12 ++++++++++-- tests/qemu-iotests/182 | 13 +++++++++++-- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index 95b7510571..c284d08796 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -82,7 +82,11 @@ class TestSingleDrive(ImageCommitTestCase): qemu_io('-f', 'raw', '-c', 'write -P 0xab 0 524288', backing_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xef 524288 524288',= mid_img) self.vm =3D iotests.VM().add_drive(test_img, "node-name=3Dtop,back= ing.node-name=3Dmid,backing.backing.node-name=3Dbase", interface=3D"none") - self.vm.add_device("virtio-scsi-pci") + if iotests.qemu_default_machine =3D=3D 's390-ccw-virtio': + self.vm.add_device("virtio-scsi-ccw") + else: + self.vm.add_device("virtio-scsi-pci") + self.vm.add_device("scsi-hd,id=3Dscsi0,drive=3Ddrive0") self.vm.launch() =20 diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139 index 50cf40fbd5..f8f02808a9 100644 --- a/tests/qemu-iotests/139 +++ b/tests/qemu-iotests/139 @@ -25,13 +25,21 @@ import time =20 base_img =3D os.path.join(iotests.test_dir, 'base.img') new_img =3D os.path.join(iotests.test_dir, 'new.img') +if iotests.qemu_default_machine =3D=3D 's390-ccw-virtio': + default_virtio_blk =3D 'virtio-blk-ccw' +else: + default_virtio_blk =3D 'virtio-blk-pci' =20 class TestBlockdevDel(iotests.QMPTestCase): =20 def setUp(self): iotests.qemu_img('create', '-f', iotests.imgfmt, base_img, '1M') self.vm =3D iotests.VM() - self.vm.add_device("virtio-scsi-pci,id=3Dvirtio-scsi") + if iotests.qemu_default_machine =3D=3D 's390-ccw-virtio': + self.vm.add_device("virtio-scsi-ccw,id=3Dvirtio-scsi") + else: + self.vm.add_device("virtio-scsi-pci,id=3Dvirtio-scsi") + self.vm.launch() =20 def tearDown(self): @@ -87,7 +95,7 @@ class TestBlockdevDel(iotests.QMPTestCase): self.checkBlockDriverState(node, expect_error) =20 # Add a device model - def addDeviceModel(self, device, backend, driver =3D 'virtio-blk-pci'): + def addDeviceModel(self, device, backend, driver =3D default_virtio_bl= k): result =3D self.vm.qmp('device_add', id =3D device, driver =3D driver, drive =3D backend) self.assert_qmp(result, 'return', {}) diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 7ecbb22604..2e078ceed8 100755 --- a/tests/qemu-iotests/182 +++ b/tests/qemu-iotests/182 @@ -45,17 +45,26 @@ _supported_os Linux =20 size=3D32M =20 +case "$QEMU_DEFAULT_MACHINE" in + s390-ccw-virtio) + virtioblk=3Dvirtio-blk-ccw + ;; + *) + virtioblk=3Dvirtio-blk-pci + ;; +esac + _make_test_img $size =20 echo "Starting QEMU" _launch_qemu -drive file=3D$TEST_IMG,if=3Dnone,id=3Ddrive0,file.locking=3D= on \ - -device virtio-blk-pci,drive=3Ddrive0 + -device $virtioblk,drive=3Ddrive0 =20 echo echo "Starting a second QEMU using the same image should fail" echo 'quit' | $QEMU -monitor stdio \ -drive file=3D$TEST_IMG,if=3Dnone,id=3Ddrive0,file.locking=3Don \ - -device virtio-blk-pci,drive=3Ddrive0 2>&1 | _filter_testdir 2>&1 | + -device $virtioblk,drive=3Ddrive0 2>&1 | _filter_testdir 2>&1 | _filter_qemu | sed -e '/falling back to POSIX file/d' \ -e '/locks can be lost unexpectedly/d' --=20 2.13.5 From nobody Fri May 3 12:25:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505294207952682.9342988319663; Wed, 13 Sep 2017 02:16:47 -0700 (PDT) Received: from localhost ([::1]:41111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3mp-0004Wa-4F for importer@patchew.org; Wed, 13 Sep 2017 05:16:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3hI-00072A-1c for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:11:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds3hD-0003zX-Op for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:11:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53984) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds3h6-0003tA-AM; Wed, 13 Sep 2017 05:10:52 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 680CE81E0E; Wed, 13 Sep 2017 09:10:51 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BBA84FA23; Wed, 13 Sep 2017 09:10:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 680CE81E0E Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com From: Cornelia Huck To: kwolf@redhat.com, mreitz@redhat.com Date: Wed, 13 Sep 2017 11:10:37 +0200 Message-Id: <20170913091038.2900-3-cohuck@redhat.com> In-Reply-To: <20170913091038.2900-1-cohuck@redhat.com> References: <20170913091038.2900-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 13 Sep 2017 09:10:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 2/3] iotests: use -ccw on s390x for 051 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, haoqf@linux.vnet.ibm.com, qemu-block@nongnu.org, david@redhat.com, Cornelia Huck , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The default cpu model on s390x does not provide zPCI, which is not yet wired up on tcg. Moreover, virtio-ccw is the standard on s390x, so use the -ccw instead of the -pci versions of virtio devices on s390x. Signed-off-by: Cornelia Huck Reviewed-by: David Hildenbrand Reviewed-by: QingFeng Hao Reviewed-by: Thomas Huth --- tests/qemu-iotests/051 | 12 +++++++++++- tests/qemu-iotests/051.out | 2 +- tests/qemu-iotests/051.pc.out | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index c8cfc764bc..dba8816c9f 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -103,7 +103,17 @@ echo echo =3D=3D=3D Device without drive =3D=3D=3D echo =20 -run_qemu -device virtio-scsi-pci -device scsi-hd +case "$QEMU_DEFAULT_MACHINE" in + s390-ccw-virtio) + virtio_scsi=3Dvirtio-scsi-ccw + ;; + *) + virtio_scsi=3Dvirtio-scsi-pci + ;; +esac + +run_qemu -device $virtio_scsi -device scsi-hd | + sed -e "s/$virtio_scsi/VIRTIO_SCSI/" =20 echo echo =3D=3D=3D Overriding backing file =3D=3D=3D diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index 4d3b1ff316..e3c6eaba57 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -49,7 +49,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,driver=3Dqcow2,= format=3Dqcow2: Cannot specif =20 =3D=3D=3D Device without drive =3D=3D=3D =20 -Testing: -device virtio-scsi-pci -device scsi-hd +Testing: -device VIRTIO_SCSI -device scsi-hd QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device scsi-hd: drive property not set =20 diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index 76d7205460..ae7801b44b 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -49,7 +49,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,driver=3Dqcow2,= format=3Dqcow2: Cannot specif =20 =3D=3D=3D Device without drive =3D=3D=3D =20 -Testing: -device virtio-scsi-pci -device scsi-hd +Testing: -device VIRTIO_SCSI -device scsi-hd QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device scsi-hd: drive property not set =20 --=20 2.13.5 From nobody Fri May 3 12:25:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505294433204108.60726859548743; Wed, 13 Sep 2017 02:20:33 -0700 (PDT) Received: from localhost ([::1]:41126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3qS-0007jQ-Ee for importer@patchew.org; Wed, 13 Sep 2017 05:20:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds3hM-000768-3V for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:11:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds3hI-000442-3t for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:11:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45084) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds3h8-0003uz-7V; Wed, 13 Sep 2017 05:10:54 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 532F1C057FA7; Wed, 13 Sep 2017 09:10:53 +0000 (UTC) Received: from localhost (dhcp-192-215.str.redhat.com [10.33.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F08035D976; Wed, 13 Sep 2017 09:10:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 532F1C057FA7 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=cohuck@redhat.com From: Cornelia Huck To: kwolf@redhat.com, mreitz@redhat.com Date: Wed, 13 Sep 2017 11:10:38 +0200 Message-Id: <20170913091038.2900-4-cohuck@redhat.com> In-Reply-To: <20170913091038.2900-1-cohuck@redhat.com> References: <20170913091038.2900-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 13 Sep 2017 09:10:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 3/3] iotests: use virtio aliases for 067 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, haoqf@linux.vnet.ibm.com, qemu-block@nongnu.org, david@redhat.com, Cornelia Huck , qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The default cpu model on s390x does not provide zPCI, which is not yet wired up on tcg. Moreover, virtio-ccw is the standard on s390x. Using virtio-scsi will implicitly pick the right device, so just switch to that for simplicity. Signed-off-by: Cornelia Huck Reviewed-by: David Hildenbrand Reviewed-by: QingFeng Hao Reviewed-by: Thomas Huth --- tests/qemu-iotests/067 | 3 ++- tests/qemu-iotests/067.out | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/067 b/tests/qemu-iotests/067 index 5d4ca4bc61..cbb3da286a 100755 --- a/tests/qemu-iotests/067 +++ b/tests/qemu-iotests/067 @@ -141,7 +141,7 @@ echo echo =3D=3D=3D Empty drive with -device and device_del =3D=3D=3D echo =20 -run_qemu -device virtio-scsi-pci -device scsi-cd,id=3Dcd0 <