From 08cf04bb4747269dde46b45346b7f38653013002 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 19 Mar 2019 16:58:20 -0400 Subject: [PATCH] Hack back-branch SSL tests to avoid intermittent buildfarm failures. Buildfarm member eelpout sometimes reports the wrong error message for an SSL connection failure. In HEAD, this problem is believed to be solved by commit 1f39a1c06, but I'm as yet unwilling to back-patch that. The problem seems fairly unlikely to be an issue in the field, since (as far as we can tell) it happens only during a failure of a local-loopback SSL connection, and it's improbable even then. It seems better to just live with it for the time being; but let's tweak the regression test to accept the other error message as a "pass". Needed in v11 only, since older branches didn't check the message text anyway. Discussion: https://postgr.es/m/CAEepm=2n6Nv+5tFfe8YnkUm1fXgvxR0Mm1FoD+QKG-vLNGLyKg@mail.gmail.com --- src/test/ssl/t/001_ssltests.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 39ede38c992..d5dcb465362 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -350,7 +350,7 @@ test_connect_fails( test_connect_fails( $common_connstr, "user=ssltestuser sslcert=ssl/client-revoked.crt sslkey=ssl/client-revoked_tmp.key", - qr/SSL error/, + qr/SSL error|server closed the connection unexpectedly/, "certificate authorization fails with revoked client cert"); # intermediate client_ca.crt is provided by client, and isn't in server's ssl_ca_file @@ -363,7 +363,8 @@ test_connect_ok( "sslmode=require sslcert=ssl/client+client_ca.crt", "intermediate client certificate is provided by client"); test_connect_fails($common_connstr, "sslmode=require sslcert=ssl/client.crt", - qr/SSL error/, "intermediate client certificate is missing"); + qr/SSL error|server closed the connection unexpectedly/, + "intermediate client certificate is missing"); # clean up unlink("ssl/client_tmp.key", "ssl/client_wrongperms_tmp.key",