From nobody Mon Feb 9 00:54:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1571394457; cv=none; d=zoho.com; s=zohoarc; b=DupI7n27H2CaH+M5pMJi/llSQdAPVkS6Oofgqw85w9MPIpIafJUGdIMpHXa1y/v4OF82lp68/5HwRH3jhVNmV/GTatyRcjBEdP1fqFifq4qpuTzdw1YjtJYPfpm+Ofk4LO0YJLq3A7j9evea4Ap7jiG/MlMRyXuEnqCG34IqF1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571394457; 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=VuEQd9OVL4HLtEXo/fLCQao49PA324BZAOaBDmfSOlI=; b=FNIqy0CzqfuVDtAvyHE8OF7RK5nma40flbUPNl2P2l3SAYgstydSL8i84PujDlYQz6VRZSFRgwu9ptSVly+bFw9qOVstsb5zrkgWZL6drEXGPu4/4axk8Q12bAqksi3B8pZlWHrNCZ1rObdzSOYpuzJ/BS3Nwqf7Mzs/k768sLs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571394457136580.8256514318493; Fri, 18 Oct 2019 03:27:37 -0700 (PDT) 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 292BBC028320; Fri, 18 Oct 2019 10:27:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 03AB05D9CA; Fri, 18 Oct 2019 10:27:35 +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 B45431803518; Fri, 18 Oct 2019 10:27:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9IARS2c017436 for ; Fri, 18 Oct 2019 06:27:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id C827B60BFB; Fri, 18 Oct 2019 10:27:28 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0037660BF1; Fri, 18 Oct 2019 10:27:27 +0000 (UTC) From: Pavel Mores To: pmores@redhat.com, libvir-list@redhat.com Date: Fri, 18 Oct 2019 12:27:22 +0200 Message-Id: <20191018102722.1934-3-pmores@redhat.com> In-Reply-To: <20191018102722.1934-1-pmores@redhat.com> References: <20191018102722.1934-1-pmores@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/2] qemu: add tests of the default video type selection algorithm 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@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.31]); Fri, 18 Oct 2019 10:27:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The test case for x86_64 and neither cirrus nor vga capability is of the xml2argv type because it actually fails to parse the XML at all [*] which is something that xml2xml tests don't seem to handle. xml2argv test fails to produce a qemu argv for this case which xml2argv tests can handle. The (unrelated) "graphics-egl-headless-rendernode" had to be adjusted as it expects cirrus to be added as per previous behaviour. It now has to use QEMU_CAPS_DEVICE_CIRRUS_VGA to get that (otherwise it'd end up with vga). [*] This is a consequence of the decision not to have a fallback if the obvious choices (cirrus and vga) aren't viable due to missing QEMU caps. Signed-off-by: Pavel Mores --- .../default-video-type-aarch64.xml | 16 +++++++ .../default-video-type-ppc64.xml | 16 +++++++ .../default-video-type-riscv64.xml | 16 +++++++ .../default-video-type-s390x.xml | 16 +++++++ .../default-video-type-x86_64-caps-test-0.xml | 17 ++++++++ .../default-video-type-x86_64-caps-test-1.xml | 17 ++++++++ tests/qemuxml2argvtest.c | 1 + ...ault-video-type-aarch64.aarch64-latest.xml | 42 +++++++++++++++++++ .../default-video-type-ppc64.ppc64-latest.xml | 31 ++++++++++++++ ...ault-video-type-riscv64.riscv64-latest.xml | 39 +++++++++++++++++ .../default-video-type-s390x.s390x-latest.xml | 32 ++++++++++++++ .../default-video-type-x86_64-caps-test-0.xml | 31 ++++++++++++++ .../default-video-type-x86_64-caps-test-1.xml | 31 ++++++++++++++ tests/qemuxml2xmltest.c | 10 ++++- 14 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/default-video-type-aarch64.xml create mode 100644 tests/qemuxml2argvdata/default-video-type-ppc64.xml create mode 100644 tests/qemuxml2argvdata/default-video-type-riscv64.xml create mode 100644 tests/qemuxml2argvdata/default-video-type-s390x.xml create mode 100644 tests/qemuxml2argvdata/default-video-type-x86_64-caps-t= est-0.xml create mode 100644 tests/qemuxml2argvdata/default-video-type-x86_64-caps-t= est-1.xml create mode 100644 tests/qemuxml2xmloutdata/default-video-type-aarch64.aar= ch64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/default-video-type-ppc64.ppc64= -latest.xml create mode 100644 tests/qemuxml2xmloutdata/default-video-type-riscv64.ris= cv64-latest.xml create mode 100644 tests/qemuxml2xmloutdata/default-video-type-s390x.s390x= -latest.xml create mode 100644 tests/qemuxml2xmloutdata/default-video-type-x86_64-caps= -test-0.xml create mode 100644 tests/qemuxml2xmloutdata/default-video-type-x86_64-caps= -test-1.xml diff --git a/tests/qemuxml2argvdata/default-video-type-aarch64.xml b/tests/= qemuxml2argvdata/default-video-type-aarch64.xml new file mode 100644 index 0000000000..03326d3c9b --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-aarch64.xml @@ -0,0 +1,16 @@ + + default-video-type-aarch64-test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1 + + hvm + + + + /usr/bin/qemu-system-aarch64 + + + + + diff --git a/tests/qemuxml2argvdata/default-video-type-ppc64.xml b/tests/qe= muxml2argvdata/default-video-type-ppc64.xml new file mode 100644 index 0000000000..739e07fc19 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-ppc64.xml @@ -0,0 +1,16 @@ + + default-video-type-ppc64-test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1 + + hvm + + + + /usr/bin/qemu-system-ppc64 + + + + + diff --git a/tests/qemuxml2argvdata/default-video-type-riscv64.xml b/tests/= qemuxml2argvdata/default-video-type-riscv64.xml new file mode 100644 index 0000000000..55f6fa9391 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-riscv64.xml @@ -0,0 +1,16 @@ + + default-video-type-riscv64-test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1 + + hvm + + + + /usr/bin/qemu-system-riscv64 + + + + + diff --git a/tests/qemuxml2argvdata/default-video-type-s390x.xml b/tests/qe= muxml2argvdata/default-video-type-s390x.xml new file mode 100644 index 0000000000..9eda06a3a1 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-s390x.xml @@ -0,0 +1,16 @@ + + default-video-type-s390x-test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1 + + hvm + + + + /usr/bin/qemu-system-s390x + + + + + diff --git a/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-0.x= ml b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-0.xml new file mode 100644 index 0000000000..2c753fe227 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-0.xml @@ -0,0 +1,17 @@ + + default-video-type-x86_64-test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1 + + hvm + + + + /usr/bin/qemu-system-x86_64 + + + + + + diff --git a/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-1.x= ml b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-1.xml new file mode 100644 index 0000000000..2c753fe227 --- /dev/null +++ b/tests/qemuxml2argvdata/default-video-type-x86_64-caps-test-1.xml @@ -0,0 +1,17 @@ + + default-video-type-x86_64-test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1 + + hvm + + + + /usr/bin/qemu-system-x86_64 + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a84ea0954d..1f50afdc9c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2088,6 +2088,7 @@ mymain(void) DO_TEST("video-none-device", QEMU_CAPS_VNC); DO_TEST_PARSE_ERROR("video-invalid-multiple-devices", NONE); + DO_TEST_PARSE_ERROR("default-video-type-x86_64-caps-test-0", NONE); =20 DO_TEST("virtio-rng-default", QEMU_CAPS_DEVICE_VIRTIO_RNG, diff --git a/tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-la= test.xml b/tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-late= st.xml new file mode 100644 index 0000000000..4b660b8d70 --- /dev/null +++ b/tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-latest.xml @@ -0,0 +1,42 @@ + + default-video-type-aarch64-test + 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f + 1048576 + 1048576 + 1 + + hvm + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + + + + +
+ + + + +
+ + + + +