From: Daniel P. Berrange Date: Wed, 14 Sep 2016 09:44:44 +0000 (+0100) Subject: tests: use a fixed chardev TLS path X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e043ecc82d161028c04061da71597b2127651c77;p=libvirt.git tests: use a fixed chardev TLS path The test qemuxml2argv-serial-tcp-tlsx509-chardev.args will fail if libvirt is built with a --sysconfdir arg that is not /etc. Fix this by setting a hardcoded path in the test code. Signed-off-by: Daniel P. Berrange --- diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args index 518117b883..4c8c23eb18 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args @@ -25,8 +25,8 @@ server,nowait \ -chardev udp,id=charserial0,host=127.0.0.1,port=2222,localaddr=127.0.0.1,\ localport=1111 \ -device isa-serial,chardev=charserial0,id=serial0 \ --object tls-creds-x509,id=objserial1_tls0,dir=/etc/pki/qemu,endpoint=client,\ -verify-peer=no \ +-object tls-creds-x509,id=objserial1_tls0,dir=/etc/pki/libvirt-chardev,\ +endpoint=client,verify-peer=no \ -chardev socket,id=charserial1,host=127.0.0.1,port=5555,\ tls-creds=objserial1_tls0 \ -device isa-serial,chardev=charserial1,id=serial1 \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 12fd732d84..dbb0e4d561 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -515,12 +515,18 @@ mymain(void) driver.privileged = true; + VIR_FREE(driver.config->defaultTLSx509certdir); + if (VIR_STRDUP_QUIET(driver.config->defaultTLSx509certdir, "/etc/pki/qemu") < 0) + return EXIT_FAILURE; VIR_FREE(driver.config->vncTLSx509certdir); if (VIR_STRDUP_QUIET(driver.config->vncTLSx509certdir, "/etc/pki/libvirt-vnc") < 0) return EXIT_FAILURE; VIR_FREE(driver.config->spiceTLSx509certdir); if (VIR_STRDUP_QUIET(driver.config->spiceTLSx509certdir, "/etc/pki/libvirt-spice") < 0) return EXIT_FAILURE; + VIR_FREE(driver.config->chardevTLSx509certdir); + if (VIR_STRDUP_QUIET(driver.config->chardevTLSx509certdir, "/etc/pki/libvirt-chardev") < 0) + return EXIT_FAILURE; VIR_FREE(driver.config->stateDir); if (VIR_STRDUP_QUIET(driver.config->stateDir, "/nowhere") < 0)