Fix vxhs test to have stable certificate dir

The test suite has hardcoded /etc/pki/qemu as the cert dir, but this
only works if configure has --sysconfdir=/etc passed. We must set the
vxhs cert dir to a stable path in the test suite.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2017-09-28 18:41:21 +01:00
parent 6885b51e5f
commit 89f0ea419d
2 changed files with 5 additions and 2 deletions

View File

@ -20,7 +20,7 @@ server,nowait \
-no-acpi \
-boot c \
-usb \
-object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/qemu,\
-object tls-creds-x509,id=objvirtio-disk0_tls0,dir=/etc/pki/libvirt-vxhs,\
endpoint=client,verify-peer=yes \
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk0_tls0,\
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc251,file.server.type=tcp,\
@ -28,7 +28,7 @@ file.server.host=192.168.0.1,file.server.port=9999,format=raw,if=none,\
id=drive-virtio-disk0,cache=none \
-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
id=virtio-disk0 \
-object tls-creds-x509,id=objvirtio-disk1_tls0,dir=/etc/pki/qemu,\
-object tls-creds-x509,id=objvirtio-disk1_tls0,dir=/etc/pki/libvirt-vxhs,\
endpoint=client,verify-peer=yes \
-drive file.driver=vxhs,file.tls-creds=objvirtio-disk1_tls0,\
file.vdisk-id=eb90327c-8302-4725-9e1b-4e85ed4dc252,file.server.type=tcp,\

View File

@ -599,6 +599,9 @@ mymain(void)
VIR_FREE(driver.config->chardevTLSx509certdir);
if (VIR_STRDUP_QUIET(driver.config->chardevTLSx509certdir, "/etc/pki/libvirt-chardev") < 0)
return EXIT_FAILURE;
VIR_FREE(driver.config->vxhsTLSx509certdir);
if (VIR_STRDUP_QUIET(driver.config->vxhsTLSx509certdir, "/etc/pki/libvirt-vxhs") < 0)
return EXIT_FAILURE;
VIR_FREE(driver.config->hugetlbfs);
if (VIR_ALLOC_N(driver.config->hugetlbfs, 2) < 0)