Fix parallel runs of TLS test suites

Use a separate keyfile name for the two TLS test suites so that
they don't clash when running tests in parallel

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2013-08-09 11:54:41 +01:00
parent be7a89e8ca
commit eaa99a17db
4 changed files with 16 additions and 16 deletions
+6 -4
View File
@@ -40,6 +40,8 @@
# define VIR_FROM_THIS VIR_FROM_RPC
# define KEYFILE "key-ctx.pem"
struct testTLSContextData {
bool isServer;
const char *cacrt;
@@ -66,7 +68,7 @@ static int testTLSContextInit(const void *opaque)
ctxt = virNetTLSContextNewServer(data->cacrt,
NULL,
data->crt,
keyfile,
KEYFILE,
NULL,
true,
true);
@@ -74,7 +76,7 @@ static int testTLSContextInit(const void *opaque)
ctxt = virNetTLSContextNewClient(data->cacrt,
NULL,
data->crt,
keyfile,
KEYFILE,
true,
true);
}
@@ -109,7 +111,7 @@ mymain(void)
{
int ret = 0;
testTLSInit();
testTLSInit(KEYFILE);
# define DO_CTX_TEST(_isServer, _caCrt, _crt, _expectFail) \
do { \
@@ -617,7 +619,7 @@ mymain(void)
testTLSDiscardCert(&clientcertlevel2breq);
unlink("cacertchain.pem");
testTLSCleanup();
testTLSCleanup(KEYFILE);
return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}