mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 17:05:16 +00:00
tests: Fix parallel runs of TLS test suites
I noticed this yesterday and fixed it in a different way, but ended up with one more problem. It was probably the way I fixed it combined with one more filename changed. Anyway, why I'm saying this is that one more filename should be renamed in order to avoid a race (which I was unable to reproduce, though). I checked this is the last file those two tests have in common by going through the code and the re-checked by this "script": strace -o session.trace -e open ./virnettlssessiontest strace -o context.trace -e open ./virnettlscontexttest sort \ <(sed -n '/^open/s/open("\([^"]*\)",.*$/\1/p' context.trace | sort -u)\ <(sed -n '/^open/s/open("\([^"]*\)",.*$/\1/p' session.trace | sort -u)\ | uniq -d| grep '.pem$' So it should be enough to make these tests independent of each other. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
81b1915773
commit
3be7a30426
@ -556,12 +556,12 @@ mymain(void)
|
||||
cacertlevel2areq.crt,
|
||||
};
|
||||
|
||||
testTLSWriteCertChain("cacertchain.pem",
|
||||
testTLSWriteCertChain("cacertchain-ctx.pem",
|
||||
certchain,
|
||||
ARRAY_CARDINALITY(certchain));
|
||||
|
||||
DO_CTX_TEST(true, "cacertchain.pem", servercertlevel3areq.filename, false);
|
||||
DO_CTX_TEST(false, "cacertchain.pem", clientcertlevel2breq.filename, false);
|
||||
DO_CTX_TEST(true, "cacertchain-ctx.pem", servercertlevel3areq.filename, false);
|
||||
DO_CTX_TEST(false, "cacertchain-ctx.pem", clientcertlevel2breq.filename, false);
|
||||
|
||||
testTLSDiscardCert(&cacertreq);
|
||||
testTLSDiscardCert(&cacert1req);
|
||||
@ -617,7 +617,7 @@ mymain(void)
|
||||
testTLSDiscardCert(&cacertlevel2areq);
|
||||
testTLSDiscardCert(&servercertlevel3areq);
|
||||
testTLSDiscardCert(&clientcertlevel2breq);
|
||||
unlink("cacertchain.pem");
|
||||
unlink("cacertchain-ctx.pem");
|
||||
|
||||
testTLSCleanup(KEYFILE);
|
||||
|
||||
|
@ -451,11 +451,11 @@ mymain(void)
|
||||
cacertlevel2areq.crt,
|
||||
};
|
||||
|
||||
testTLSWriteCertChain("cacertchain.pem",
|
||||
testTLSWriteCertChain("cacertchain-sess.pem",
|
||||
certchain,
|
||||
ARRAY_CARDINALITY(certchain));
|
||||
|
||||
DO_SESS_TEST("cacertchain.pem", servercertlevel3areq.filename, clientcertlevel2breq.filename,
|
||||
DO_SESS_TEST("cacertchain-sess.pem", servercertlevel3areq.filename, clientcertlevel2breq.filename,
|
||||
false, false, "libvirt.org", NULL);
|
||||
|
||||
testTLSDiscardCert(&clientcertreq);
|
||||
@ -474,7 +474,7 @@ mymain(void)
|
||||
testTLSDiscardCert(&cacertlevel2areq);
|
||||
testTLSDiscardCert(&servercertlevel3areq);
|
||||
testTLSDiscardCert(&clientcertlevel2breq);
|
||||
unlink("cacertchain.pem");
|
||||
unlink("cacertchain-sess.pem");
|
||||
|
||||
testTLSCleanup(KEYFILE);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user