From nobody Fri Dec 19 17:39:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588766955; cv=none; d=zohomail.com; s=zohoarc; b=bsxejsAheg91XdTXFCy6VqbolNKiVv6Tb/Un1e3MY921piZfhDqcEs7P0DYtYsFNs37KXN8+KRLFzy1W4S10Hk8/77mmnUmpC4JQy9z9r6c14sFRQbrF5VO1M+3TjnKTMcYiYEDp+u26nI2zMjcnvm/K3nsb2lmfDzR1dXBX4K8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588766955; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=reamrTGLdRPD9RIPuTRrDYoWLQdBQ0Wrje4erzlzqCc=; b=Cdqqb0KIwAaVnj59XYmeLNT49QounJ7rlUdvMB6GjUTBKYRXTbJk0GApx25LdgaSHKfDKLfEwkCiEFMKM3E4vWwXL0DL/yW1gioNUYaLSMIiaZ3xK+qrYLaXRJN0GffEdHLr2P7ZgsByy50t4v/+Zl1yUKC8/1gDGpjBfKqFvPo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1588766955609637.2036064068218; Wed, 6 May 2020 05:09:15 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-33-sCqSqKIzNOG9KptZljElKQ-1; Wed, 06 May 2020 08:09:12 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id E481E835B4A; Wed, 6 May 2020 12:09:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B962E5C1D4; Wed, 6 May 2020 12:09:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6A32F54D02; Wed, 6 May 2020 12:09:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 046C8xEq029721 for ; Wed, 6 May 2020 08:08:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id C82A75C1D4; Wed, 6 May 2020 12:08:59 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 396885C1BD for ; Wed, 6 May 2020 12:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588766954; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=reamrTGLdRPD9RIPuTRrDYoWLQdBQ0Wrje4erzlzqCc=; b=Rg7lY+5FghPgxFqpYNf7OvkGwwlOApiy5/NtbMnjz80RVCYs13il8FNBxoCvFvvLCIZFcu gAXayQw523iOJE1nT9NETEZPTUoJvKveSTHV9YCkQrmt7uZgfYY73DzZeuJY/8oFr7cICq I6nTkMps5QQm5cokZfQVdC3GivdebUc= X-MC-Unique: sCqSqKIzNOG9KptZljElKQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 15/20] tests: Add tests for a virtio and sd disk in a single machine Date: Wed, 6 May 2020 14:08:30 +0200 Message-Id: <678766037d32d611b8f4cfc6394ff88fa1ff8d32.1588766791.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The 'vexpress-a9' ARM board supports the native 'sd' bus as well as virtio. Add a test case for proving that upcoming changes to handling of 'sd' work. This config was also tested with real qemu and the qemu process starts correctly. Signed-off-by: Peter Krempa --- .../disk-arm-virtio-sd.aarch64-4.0.0.args | 39 ++++++++++++++++++ .../disk-arm-virtio-sd.aarch64-latest.args | 40 ++++++++++++++++++ tests/qemuxml2argvdata/disk-arm-virtio-sd.xml | 36 ++++++++++++++++ tests/qemuxml2argvtest.c | 3 ++ .../disk-arm-virtio-sd.aarch64-latest.xml | 41 +++++++++++++++++++ tests/qemuxml2xmltest.c | 2 + 6 files changed, 161 insertions(+) create mode 100644 tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-4.0.0= .args create mode 100644 tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-lates= t.args create mode 100644 tests/qemuxml2argvdata/disk-arm-virtio-sd.xml create mode 100644 tests/qemuxml2xmloutdata/disk-arm-virtio-sd.aarch64-lat= est.xml diff --git a/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-4.0.0.args b= /tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-4.0.0.args new file mode 100644 index 0000000000..3c2a7cf240 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-4.0.0.args @@ -0,0 +1,39 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-armtest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-armtest/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-armtest/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-armtest/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-arm \ +-name guest=3Darmtest,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-armtest/master-key.aes \ +-machine vexpress-a9,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 1024 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e6a \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-kernel /arm.kernel \ +-initrd /arm.initrd \ +-append 'console=3DttyAMA0,\ +115200n8 rw root=3D/dev/vda3 rootwait physmap.enabled=3D0' \ +-dtb /arm.dtb \ +-usb \ +-drive file=3D/arm-sd.qcow2,format=3Dqcow2,if=3Dsd,index=3D0 \ +-drive file=3D/arm-virtio.qcow2,format=3Dqcow2,if=3Dnone,id=3Ddrive-virtio= -disk0 \ +-device virtio-blk-device,scsi=3Doff,drive=3Ddrive-virtio-disk0,id=3Dvirti= o-disk0 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args = b/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args new file mode 100644 index 0000000000..7147dfee76 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-arm-virtio-sd.aarch64-latest.args @@ -0,0 +1,40 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-armtest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-armtest/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-armtest/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-armtest/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-arm \ +-name guest=3Darmtest,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-armtest/master-key.aes \ +-machine vexpress-a9,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu cortex-a9 \ +-m 1024 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e6a \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-kernel /arm.kernel \ +-initrd /arm.initrd \ +-append 'console=3DttyAMA0,\ +115200n8 rw root=3D/dev/vda3 rootwait physmap.enabled=3D0' \ +-dtb /arm.dtb \ +-usb \ +-drive file=3D/arm-sd.qcow2,format=3Dqcow2,if=3Dsd,index=3D0 \ +-drive file=3D/arm-virtio.qcow2,format=3Dqcow2,if=3Dnone,id=3Ddrive-virtio= -disk0 \ +-device virtio-blk-device,scsi=3Doff,drive=3Ddrive-virtio-disk0,id=3Dvirti= o-disk0 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-arm-virtio-sd.xml b/tests/qemuxml2= argvdata/disk-arm-virtio-sd.xml new file mode 100644 index 0000000000..0a6482fd4a --- /dev/null +++ b/tests/qemuxml2argvdata/disk-arm-virtio-sd.xml @@ -0,0 +1,36 @@ + + armtest + 496d7ea8-9739-544b-4ebd-ef08be936e6a + 1048576 + 1048576 + 1 + + hvm + /arm.kernel + /arm.initrd + /arm.dtb + console=3DttyAMA0,115200n8 rw root=3D/dev/vda3 rootwait physm= ap.enabled=3D0 + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-arm + + + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index ad89353910..4ab664a846 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1175,6 +1175,9 @@ mymain(void) DO_TEST_CAPS_LATEST("disk-slices"); + DO_TEST_CAPS_ARCH_VER("disk-arm-virtio-sd", "aarch64", "4.0.0"); + DO_TEST_CAPS_ARCH_LATEST("disk-arm-virtio-sd", "aarch64"); + DO_TEST("graphics-egl-headless", QEMU_CAPS_EGL_HEADLESS, QEMU_CAPS_DEVICE_CIRRUS_VGA); diff --git a/tests/qemuxml2xmloutdata/disk-arm-virtio-sd.aarch64-latest.xml= b/tests/qemuxml2xmloutdata/disk-arm-virtio-sd.aarch64-latest.xml new file mode 100644 index 0000000000..024db53ffb --- /dev/null +++ b/tests/qemuxml2xmloutdata/disk-arm-virtio-sd.aarch64-latest.xml @@ -0,0 +1,41 @@ + + armtest + 496d7ea8-9739-544b-4ebd-ef08be936e6a + 1048576 + 1048576 + 1 + + hvm + /arm.kernel + /arm.initrd + console=3DttyAMA0,115200n8 rw root=3D/dev/vda3 rootwait physm= ap.enabled=3D0 + /arm.dtb + + + + + + + + + cortex-a9 + + + destroy + restart + restart + + /usr/bin/qemu-system-arm + + + + + + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 34a9f2803a..e7480fcf9d 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -643,6 +643,8 @@ mymain(void) DO_TEST("disk-serial", NONE); + DO_TEST_CAPS_ARCH_LATEST("disk-arm-virtio-sd", "aarch64"); + DO_TEST("virtio-rng-random", QEMU_CAPS_DEVICE_VIRTIO_RNG); DO_TEST("virtio-rng-egd", --=20 2.26.2