From nobody Wed May 14 07:16:13 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152708487775988.52144819216176; Wed, 23 May 2018 07:14:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E41330CA8C9; Wed, 23 May 2018 14:14:34 +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 E9192308BDA1; Wed, 23 May 2018 14:14:32 +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 CF0AA4CA81; Wed, 23 May 2018 14:14:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4NEDhmE026071 for ; Wed, 23 May 2018 10:13:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 89CFA2144B22; Wed, 23 May 2018 14:13:43 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10F152144B21; Wed, 23 May 2018 14:13:42 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 23 May 2018 16:13:27 +0200 Message-Id: <16543dd47776059c5f2f44c9e33d4b7b17f0061e.1527084603.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 2/5] tests: qemuxml2argv: Verify that disk secret alias is correct with user-aliases 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 23 May 2018 14:14:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Change the disk encryption type to qcow2+luks so that the appropriate secret objects are generated. This tests that the proper alias is used for the passphrase secret object. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemuxml2argvdata/user-aliases.args | 8 +++++++- tests/qemuxml2argvdata/user-aliases.xml | 2 +- tests/qemuxml2argvtest.c | 3 ++- tests/qemuxml2xmltest.c | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2argvdata/user-aliases.args b/tests/qemuxml2argvd= ata/user-aliases.args index 5ef52fc556..293dc919d5 100644 --- a/tests/qemuxml2argvdata/user-aliases.args +++ b/tests/qemuxml2argvdata/user-aliases.args @@ -7,6 +7,8 @@ QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-x86_64 \ -name gentoo \ -S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-gentoo/master-key.aes \ -machine pc-i440fx-1.4,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff \ -m 4096 \ -smp 4,sockets=3D4,cores=3D1,threads=3D1 \ @@ -43,7 +45,11 @@ id=3Ddrive-ua-myDisk1,cache=3Dnone \ -drive file=3D/var/lib/libvirt/images/gentoo.qcow2,format=3Dqcow2,if=3Dnon= e,\ id=3Ddrive-ua-myDisk2 \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-ua-myDisk2,id= =3Dua-myDisk2 \ --drive file=3D/var/lib/libvirt/images/OtherDemo.img,format=3Dqcow2,if=3Dno= ne,\ +-object secret,id=3Dua-myEncryptedDisk1-luks-secret0,\ +data=3D9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\ +keyid=3DmasterKey0,iv=3DAAECAwQFBgcICQoLDA0ODw=3D=3D,format=3Dbase64 \ +-drive file=3D/var/lib/libvirt/images/OtherDemo.img,encrypt.format=3Dluks,\ +encrypt.key-secret=3Dua-myEncryptedDisk1-luks-secret0,format=3Dqcow2,if=3D= none,\ id=3Ddrive-ua-myEncryptedDisk1 \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x7,drive=3Ddrive-ua-myEncrypted= Disk1,\ id=3Dua-myEncryptedDisk1 \ diff --git a/tests/qemuxml2argvdata/user-aliases.xml b/tests/qemuxml2argvda= ta/user-aliases.xml index 9ce123b477..98b4845e52 100644 --- a/tests/qemuxml2argvdata/user-aliases.xml +++ b/tests/qemuxml2argvdata/user-aliases.xml @@ -55,7 +55,7 @@ - + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1d023129ac..38530cdb5c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2823,7 +2823,8 @@ mymain(void) QEMU_CAPS_PIIX_DISABLE_S4, QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_ISA_SERIAL, QEMU_CAPS_HDA_DUPLEX, - QEMU_CAPS_CCID_EMULATED); + QEMU_CAPS_CCID_EMULATED, + QEMU_CAPS_QCOW2_LUKS, QEMU_CAPS_OBJECT_SECRET); DO_TEST("user-aliases2", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI= ); DO_TEST("user-aliases-usb", QEMU_CAPS_KVM, QEMU_CAPS_PIIX_DISABLE_S3, QEMU_CAPS_PIIX_DISABLE_S4, diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index e31d8212fe..b4f9161056 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1171,7 +1171,7 @@ mymain(void) DO_TEST("pseries-cpu-exact", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); - DO_TEST("user-aliases", NONE); + DO_TEST("user-aliases", QEMU_CAPS_QCOW2_LUKS); DO_TEST("input-virtio-ccw", QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_KEYBOARD, --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list