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é <berrange(a)redhat.com>
---
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=192.168.0.3,file.server.port=9999,format=raw,if=none,\
id=drive-virtio-disk2,serial=eb90327c-8302-4725-9e1b-4e85ed4dc252,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,\
id=virtio-disk2 \
--object tls-creds-x509,id=objvirtio-disk3_tls0,dir=/etc/pki/qemu,\
-endpoint=client,verify-peer=yes \
+-object tls-creds-x509,id=objvirtio-disk3_tls0,dir=/etc/pki/libvirt-nbd/dummy,,\
+path,endpoint=client,verify-peer=yes \
-drive file.driver=nbd,file.server.type=inet,file.server.host=example.com,\
file.server.port=1234,file.tls-creds=objvirtio-disk3_tls0,format=raw,if=none,\
id=drive-virtio-disk3,cache=none \
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/libvirt-vxhs/dummy,path") < 0)
return EXIT_FAILURE;
+ VIR_FREE(driver.config->nbdTLSx509certdir);
+ if (VIR_STRDUP_QUIET(driver.config->nbdTLSx509certdir,
"/etc/pki/libvirt-nbd/dummy,path") < 0)
+ return EXIT_FAILURE;
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") == NULL)
virFileDeleteTree(fakerootdir);
+ VIR_FREE(driver.config->nbdTLSx509certdir);
qemuTestDriverFree(&driver);
VIR_FREE(fakerootdir);
VIR_FREE(capslatest_x86_64);
--
2.17.0
Show replies by date