From nobody Mon Feb 9 19:05:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1650641604; cv=none; d=zohomail.com; s=zohoarc; b=Pf70Z8t26FRhN1bBguYUF0FIdfbXiKTZcg3BLV7Yi8PY3wuDO7NUNc8i9/v2SxS9oHhfdG8Fwza1KUXqciRxlGpvIRNx+yITKyBci2miEzkJ95GSQAktHw+/A81mbb+gEKMSb+hiRyO9nvJ+woiZ380MOxNCS0Rzrix0uxv024c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650641604; 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=pzqaMB6Z9wSw9rXdMeQ+fJiWo4oBlKHEWO32b82Oq/o=; b=Ipo0fhVTFdr5dh8BR7r/MUZFIJsxK/4azR+vTy1InKLeOV+3+Mrqk20sTxf+syHXa5C9szS2iyIcR/Z4qMSB7hAENUjlqEGQ/ewlZNgIVqcciYW2AXeYGT7kcrFsnJM5RORCkXqy7OBSe3hfaFInyLobevl+sCuUu1dkluFPxBA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1650641604007607.9693423859119; Fri, 22 Apr 2022 08:33:24 -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-395-IvMwzAvLPqqfIgFl4D3X6w-1; Fri, 22 Apr 2022 11:32:13 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F6D43C021A8; Fri, 22 Apr 2022 15:32:10 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 59A68409B3F9; Fri, 22 Apr 2022 15:32:10 +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 10C2F1940353; Fri, 22 Apr 2022 15:32:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2BF7A1940351 for ; Fri, 22 Apr 2022 15:32:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2001E401475; Fri, 22 Apr 2022 15:32:07 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69007416363 for ; Fri, 22 Apr 2022 15:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650641603; 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=pzqaMB6Z9wSw9rXdMeQ+fJiWo4oBlKHEWO32b82Oq/o=; b=OK9GDvMlK01Stv8HFOD0q04VVCd6eIjbmieGZ7l/rPReohO0oeUFsJwqjmNmuZjN8PozQw RwJ54IKYxCn4vcwvr1t+xpsAJJ5i9Cp6wVRYe7ALKCb8LcEuTYWsRM/GcZr7FRGayhu5IL IPVFm1Cs1yPgtZgDr/BK7ILbtlUoVnI= X-MC-Unique: IvMwzAvLPqqfIgFl4D3X6w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 11/11] tests: qemuxml2*: Add testing of authenticated http/ftp disks Date: Fri, 22 Apr 2022 17:31:55 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1650641605573100003 Content-Type: text/plain; charset="utf-8" Extend the 'disk-cdrom-network' to cover this instance. This also validates that the parameters of -blockdev conform to the QAPI schema. Also add the xml2xml variant of this test case. Signed-off-by: Peter Krempa --- .../disk-cdrom-network.x86_64-4.1.0.args | 6 +- .../disk-cdrom-network.x86_64-latest.args | 6 +- tests/qemuxml2argvdata/disk-cdrom-network.xml | 6 ++ .../disk-cdrom-network.x86_64-latest.xml | 72 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 tests/qemuxml2xmloutdata/disk-cdrom-network.x86_64-late= st.xml diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-4.1.0.args b/= tests/qemuxml2argvdata/disk-cdrom-network.x86_64-4.1.0.args index 00030f208d..34bd38622a 100644 --- a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-4.1.0.args +++ b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-4.1.0.args @@ -28,9 +28,11 @@ QEMU_AUDIO_DRV=3Dnone \ -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ -drive file=3Dftp://host.name:21/url/path/file.iso,format=3Draw,if=3Dnone,= id=3Ddrive-ide0-0-0,readonly=3Don \ -device ide-cd,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0,b= ootindex=3D1 \ --drive file=3Dftps://host.name:990/url/path/file.iso,format=3Draw,if=3Dnon= e,id=3Ddrive-ide0-0-1,readonly=3Don \ +-object secret,id=3Dide0-0-1-auth-secret0,data=3D9eao5F8qtkGt+seB1HYivWIxb= twUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=3DmasterKey0,iv=3DAAECAwQFBgc= ICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive file=3Dftps://host.name:990/url/path/file.iso,file.password-secret= =3Dide0-0-1-auth-secret0,format=3Draw,if=3Dnone,id=3Ddrive-ide0-0-1,readonl= y=3Don \ -device ide-cd,bus=3Dide.0,unit=3D1,drive=3Ddrive-ide0-0-1,id=3Dide0-0-1 \ --drive 'file=3Dhttps://host.name:443/url/path/file.iso?test=3Dval,format= =3Draw,if=3Dnone,id=3Ddrive-ide0-1-0,readonly=3Don' \ +-object secret,id=3Dide0-1-0-auth-secret0,data=3D9eao5F8qtkGt+seB1HYivWIxb= twUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=3DmasterKey0,iv=3DAAECAwQFBgc= ICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive 'file=3Dhttps://host.name:443/url/path/file.iso?test=3Dval,file.pas= sword-secret=3Dide0-1-0-auth-secret0,format=3Draw,if=3Dnone,id=3Ddrive-ide0= -1-0,readonly=3Don' \ -device ide-cd,bus=3Dide.1,unit=3D0,drive=3Ddrive-ide0-1-0,id=3Dide0-1-0 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args b= /tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args index 6bc09072eb..267e4cb47b 100644 --- a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args @@ -30,10 +30,12 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config= \ -blockdev '{"driver":"ftp","url":"ftp://host.name:21/url/path/file.iso","n= ode-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-3-format","read-only":true,"driver":"raw"= ,"file":"libvirt-3-storage"}' \ -device '{"driver":"ide-cd","bus":"ide.0","unit":0,"drive":"libvirt-3-form= at","id":"ide0-0-0","bootindex":1}' \ --blockdev '{"driver":"ftps","url":"ftps://host.name:990/url/path/file.iso"= ,"node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ +-object '{"qom-type":"secret","id":"libvirt-2-storage-auth-secret0","data"= :"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid"= :"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw=3D=3D","format":"base64"}' \ +-blockdev '{"driver":"ftps","url":"ftps://host.name:990/url/path/file.iso"= ,"username":"testuser","password-secret":"libvirt-2-storage-auth-secret0","= node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw"= ,"file":"libvirt-2-storage"}' \ -device '{"driver":"ide-cd","bus":"ide.0","unit":1,"drive":"libvirt-2-form= at","id":"ide0-0-1"}' \ --blockdev '{"driver":"https","url":"https://host.name:443/url/path/file.is= o?test=3Dval","node-name":"libvirt-1-storage","auto-read-only":true,"discar= d":"unmap"}' \ +-object '{"qom-type":"secret","id":"libvirt-1-storage-auth-secret0","data"= :"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid"= :"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw=3D=3D","format":"base64"}' \ +-blockdev '{"driver":"https","url":"https://host.name:443/url/path/file.is= o?test=3Dval","username":"testuser","password-secret":"libvirt-1-storage-au= th-secret0","node-name":"libvirt-1-storage","auto-read-only":true,"discard"= :"unmap"}' \ -blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw"= ,"file":"libvirt-1-storage"}' \ -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-form= at","id":"ide0-1-0"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.xml b/tests/qemuxml2= argvdata/disk-cdrom-network.xml index 14872d8889..40c53dd8fc 100644 --- a/tests/qemuxml2argvdata/disk-cdrom-network.xml +++ b/tests/qemuxml2argvdata/disk-cdrom-network.xml @@ -32,6 +32,9 @@ + + + @@ -41,6 +44,9 @@ + + + diff --git a/tests/qemuxml2xmloutdata/disk-cdrom-network.x86_64-latest.xml = b/tests/qemuxml2xmloutdata/disk-cdrom-network.x86_64-latest.xml new file mode 100644 index 0000000000..86f8ccf921 --- /dev/null +++ b/tests/qemuxml2xmloutdata/disk-cdrom-network.x86_64-latest.xml @@ -0,0 +1,72 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + qemu64 + + + destroy + restart + restart + + /usr/bin/qemu-system-x86_64 + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + +
+ + +
+ + + +
+ + + +