[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Matt Caswell
matt at openssl.org
Tue Nov 7 11:00:57 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 77543471c709089d3845f6bdcf13fa4557ec57dc (commit)
from fb969d09b0a9a1ae4ad27fbc1372aa31ade30667 (commit)
- Log -----------------------------------------------------------------
commit 77543471c709089d3845f6bdcf13fa4557ec57dc
Author: Matt Caswell <matt at openssl.org>
Date: Fri Nov 3 10:43:06 2017 +0000
Fix race condition in TLSProxy
Normally TLSProxy waits for the s_server process to finish before
continuing. However in cases where serverconnects > 1 we need to keep the
s_server process around for a later test so we continue immediately. This
means that TAP test output can end up being printed to stdout at the same
time as s_server is printing stuff. This confuses the test runner and can
cause spurious test failures. This commit introduces a small delay in cases
where serverconnects > 1 in order to give s_server enough time to finish
what it was doing before we continue to the next test.
Fixes #4129
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4661)
-----------------------------------------------------------------------
Summary of changes:
util/perl/TLSProxy/Proxy.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm
index 8742ac7..d33637a 100644
--- a/util/perl/TLSProxy/Proxy.pm
+++ b/util/perl/TLSProxy/Proxy.pm
@@ -19,6 +19,7 @@ use TLSProxy::ClientHello;
use TLSProxy::ServerHello;
use TLSProxy::ServerKeyExchange;
use TLSProxy::NewSessionTicket;
+use Time::HiRes qw/usleep/;
my $have_IPv6 = 0;
my $IP_factory;
@@ -317,6 +318,9 @@ sub clientstart
.$self->serverpid."\n";
waitpid( $self->serverpid, 0);
die "exit code $? from server process\n" if $? != 0;
+ } else {
+ # Give s_server sufficient time to finish what it was doing
+ usleep(250000);
}
die "clientpid is zero\n" if $self->clientpid == 0;
print "Waiting for client process to close: ".$self->clientpid."\n";
More information about the openssl-commits
mailing list