From nobody Mon Feb 9 02:55:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1680262089; cv=none; d=zohomail.com; s=zohoarc; b=TXUonVuG3ejAV3tTSgivrib/63FQ3v39imW5tHvOuVuth5D8IPIHlqca3MfRAFsQOlY/sfXkr6UjBB/uKqs8yK1W6NUNQyAJ0YRQl1NT6N1/qL2o8JZX1QfOENcuGzyBXoRdc5/mPob7QAayqXdLhBq0p2bhVJ68xuTdPZ+A5JQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680262089; 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=yOwR08bELwbVE1hXyp6n6Qpbxyerdwk/2n1/psY62LA=; b=nW+FxT/oIWREbVhCBUqYBorfKQdjc+ZYcqi0idSy93Iee/qI7rHoi2CSs1lM3aSCN5RHiZ0iNs/q/5SuWw3gckbblvx7YadOmR0ISiJhzvpo5QN7Ygc1IDNbJv0lDyta2B7DCcLGOwkNB+kfMjmx2ADajez3WDa4K0N14LYoJDY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1680262089721463.07891914081836; Fri, 31 Mar 2023 04:28:09 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-97-1WlCmY6JO3Sihir7-I5mqg-1; Fri, 31 Mar 2023 07:26:37 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 840093C10C66; Fri, 31 Mar 2023 11:26:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7120614171B6; Fri, 31 Mar 2023 11:26:33 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 621AC19465BD; Fri, 31 Mar 2023 11:26:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3468B1946A41 for ; Fri, 31 Mar 2023 11:26:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 247891121319; Fri, 31 Mar 2023 11:26:32 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 665CA1121315 for ; Fri, 31 Mar 2023 11:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680262088; 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=yOwR08bELwbVE1hXyp6n6Qpbxyerdwk/2n1/psY62LA=; b=he7jrM5KY6nFQuNJp3Q+bo6AZoBhbcj0tG8peuDetp5gkXwUVmw30dnMuXJcc9LP4OgDxJ TVA0EPTexxlFW8COKfgWcQt+DHX8dl5AMp+61VrPhi8dzbKdteeoCE8p6dXXUK6edmTRaV iid0vO9A8uwgZznBTGreZ0EMhnZv/Gk= X-MC-Unique: 1WlCmY6JO3Sihir7-I5mqg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 14/21] qemuxml2(argv|xml)test: Modernize testing of USB controllers on aarch64 Date: Fri, 31 Mar 2023 13:26:08 +0200 Message-Id: <8de643c505f593528fcfe3a06521bb43ff59ba31.1680260939.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1680262090784100001 Content-Type: text/plain; charset="utf-8" All supported qemu versions at this point support both 'qemu-xhci' and 'nec-xhci' controllers. To allow using real capabilities restructure the tests so that we test both controllers explicitly as well as the selection of the default model. Also add a xml2xml test invocation of the unified test. Signed-off-by: Peter Krempa --- .../aarch64-usb-controller-qemu-xhci.args | 30 ---------------- .../aarch64-usb-controller-qemu-xhci.xml | 16 --------- ...arch64-usb-controller.aarch64-latest.args} | 11 ++++-- ...ec-xhci.xml =3D> aarch64-usb-controller.xml} | 6 ++++ tests/qemuxml2argvtest.c | 9 +---- .../aarch64-usb-controller.aarch64-latest.xml | 36 +++++++++++++++++++ tests/qemuxml2xmltest.c | 2 ++ 7 files changed, 53 insertions(+), 57 deletions(-) delete mode 100644 tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci= .args delete mode 100644 tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci= .xml rename tests/qemuxml2argvdata/{aarch64-usb-controller-nec-xhci.args =3D> a= arch64-usb-controller.aarch64-latest.args} (55%) rename tests/qemuxml2argvdata/{aarch64-usb-controller-nec-xhci.xml =3D> aa= rch64-usb-controller.xml} (61%) create mode 100644 tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64= -latest.xml diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args b= /tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args deleted file mode 100644 index 099d8617b6..0000000000 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.args +++ /dev/null @@ -1,30 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ -USER=3Dtest \ -LOGNAME=3Dtest \ -XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-aarch64 \ --name guest=3DQEMUGuest1,debug-threads=3Don \ --S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/d= omain--1-QEMUGuest1/master-key.aes \ --machine virt,usb=3Doff,gic-version=3D2,dump-guest-core=3Doff \ --accel tcg \ --m 214 \ --overcommit mem-lock=3Doff \ --smp 1,sockets=3D1,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ --mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ --rtc base=3Dutc \ --no-shutdown \ --no-acpi \ --boot strict=3Don \ --device qemu-xhci,id=3Dusb,bus=3Dpcie.0,addr=3D0x1 \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml b/= tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml deleted file mode 100644 index 1b7320f433..0000000000 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-qemu-xhci.xml +++ /dev/null @@ -1,16 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219100 - 1 - - hvm - - - /usr/bin/qemu-system-aarch64 - -
- - - - diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.args b/= tests/qemuxml2argvdata/aarch64-usb-controller.aarch64-latest.args similarity index 55% rename from tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.args rename to tests/qemuxml2argvdata/aarch64-usb-controller.aarch64-latest.args index ce7cd798cc..0879a1fb91 100644 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.args +++ b/tests/qemuxml2argvdata/aarch64-usb-controller.aarch64-latest.args @@ -9,10 +9,12 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ /usr/bin/qemu-system-aarch64 \ -name guest=3DQEMUGuest1,debug-threads=3Don \ -S \ --object secret,id=3DmasterKey0,format=3Draw,file=3D/var/lib/libvirt/qemu/d= omain--1-QEMUGuest1/master-key.aes \ --machine virt,usb=3Doff,gic-version=3D2,dump-guest-core=3Doff \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine virt,usb=3Doff,gic-version=3D2,dump-guest-core=3Doff,memory-backe= nd=3Dmach-virt.ram \ -accel tcg \ +-cpu cortex-a15 \ -m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":2243= 95264}' \ -overcommit mem-lock=3Doff \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ @@ -25,6 +27,9 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -no-shutdown \ -no-acpi \ -boot strict=3Don \ --device nec-usb-xhci,id=3Dusb,bus=3Dpcie.0,addr=3D0x1 \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pcie.0","addr":"0x1"}' \ +-device '{"driver":"nec-usb-xhci","id":"usb1","bus":"pcie.0","addr":"0x2"}= ' \ +-device '{"driver":"qemu-xhci","id":"usb2","bus":"pcie.0","addr":"0x3"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.xml b/t= ests/qemuxml2argvdata/aarch64-usb-controller.xml similarity index 61% rename from tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.xml rename to tests/qemuxml2argvdata/aarch64-usb-controller.xml index 1b7320f433..b95503ed26 100644 --- a/tests/qemuxml2argvdata/aarch64-usb-controller-nec-xhci.xml +++ b/tests/qemuxml2argvdata/aarch64-usb-controller.xml @@ -11,6 +11,12 @@
+ +
+ + +
+ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 93e6d095c2..a10bed05d5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2554,14 +2554,7 @@ mymain(void) DO_TEST_CAPS_LATEST_PPC64("ppc64-tpmproxy-single"); DO_TEST_CAPS_LATEST_PPC64("ppc64-tpmproxy-with-tpm"); - DO_TEST("aarch64-usb-controller-qemu-xhci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_NEC_USB_XHCI, - QEMU_CAPS_DEVICE_QEMU_XHCI); - - DO_TEST("aarch64-usb-controller-nec-xhci", - QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_NEC_USB_XHCI); + DO_TEST_CAPS_ARCH_LATEST("aarch64-usb-controller", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("sparc-minimal", "sparc"); diff --git a/tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest= .xml b/tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest.xml new file mode 100644 index 0000000000..0e0f797cd5 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-usb-controller.aarch64-latest.xml @@ -0,0 +1,36 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + + + cortex-a15 + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + +
+ + +
+ + +
+ + +