From nobody Sun May 5 06:42:18 2024 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 1528219830940845.8120281420187; Tue, 5 Jun 2018 10:30:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BB87C0828AC; Tue, 5 Jun 2018 17:30:29 +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 ACFAD608F2; Tue, 5 Jun 2018 17:30:27 +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 BA4374CA82; Tue, 5 Jun 2018 17:30:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w55HUNbN024016 for ; Tue, 5 Jun 2018 13:30:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 27C4D111671F; Tue, 5 Jun 2018 17:30:23 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.79]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3235111AF3C; Tue, 5 Jun 2018 17:30:19 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Tue, 5 Jun 2018 18:30:18 +0100 Message-Id: <20180605173018.27706-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: use a fixed NBD TLS certificate path 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-Type: text/plain; charset="utf-8" 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 05 Jun 2018 17:30:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 The default NBD TLS certificate path varies based on prefix given to configure, causing tests to fail depending on build options. Signed-off-by: Daniel P. Berrang=C3=A9 --- Pushed as a build fix for CI tests/qemuxml2argvdata/disk-drive-network-tlsx509.args | 4 ++-- tests/qemuxml2argvtest.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/qemuxml2argvdata/disk-drive-network-tlsx509.args b/tests= /qemuxml2argvdata/disk-drive-network-tlsx509.args index 970b8a32a6..e25f45742c 100644 --- a/tests/qemuxml2argvdata/disk-drive-network-tlsx509.args +++ b/tests/qemuxml2argvdata/disk-drive-network-tlsx509.args @@ -44,8 +44,8 @@ file.server.host=3D192.168.0.3,file.server.port=3D9999,fo= rmat=3Draw,if=3Dnone,\ id=3Ddrive-virtio-disk2,serial=3Deb90327c-8302-4725-9e1b-4e85ed4dc252,cach= e=3Dnone \ -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x6,drive=3Ddrive-virtio-disk2,\ id=3Dvirtio-disk2 \ --object tls-creds-x509,id=3Dobjvirtio-disk3_tls0,dir=3D/etc/pki/qemu,\ -endpoint=3Dclient,verify-peer=3Dyes \ +-object tls-creds-x509,id=3Dobjvirtio-disk3_tls0,dir=3D/etc/pki/libvirt-nb= d/dummy,,\ +path,endpoint=3Dclient,verify-peer=3Dyes \ -drive file.driver=3Dnbd,file.server.type=3Dinet,file.server.host=3Dexampl= e.com,\ file.server.port=3D1234,file.tls-creds=3Dobjvirtio-disk3_tls0,format=3Draw= ,if=3Dnone,\ id=3Ddrive-virtio-disk3,cache=3Dnone \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 36bff26d33..8e5504f845 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -655,6 +655,9 @@ mymain(void) VIR_FREE(driver.config->vxhsTLSx509certdir); if (VIR_STRDUP_QUIET(driver.config->vxhsTLSx509certdir, "/etc/pki/libv= irt-vxhs/dummy,path") < 0) return EXIT_FAILURE; + VIR_FREE(driver.config->nbdTLSx509certdir); + if (VIR_STRDUP_QUIET(driver.config->nbdTLSx509certdir, "/etc/pki/libvi= rt-nbd/dummy,path") < 0) + return EXIT_FAILURE; =20 VIR_FREE(driver.config->hugetlbfs); if (VIR_ALLOC_N(driver.config->hugetlbfs, 2) < 0) @@ -2860,6 +2863,7 @@ mymain(void) if (getenv("LIBVIRT_SKIP_CLEANUP") =3D=3D NULL) virFileDeleteTree(fakerootdir); =20 + VIR_FREE(driver.config->nbdTLSx509certdir); qemuTestDriverFree(&driver); VIR_FREE(fakerootdir); VIR_FREE(capslatest_x86_64); --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list