]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix intermittent test failure in 80-test_cmp_http.t
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 9 Jan 2025 14:14:15 +0000 (15:14 +0100)
committerTomas Mraz <tomas@openssl.org>
Mon, 13 Jan 2025 19:21:35 +0000 (20:21 +0100)
output to stderr is unbuffered bypassing the normal output, which does
not happen at line boundaries and is therefore confusing the TAP parser.
This is known to cause random test failures like this one:

80-test_cmp_http.t                    (Wstat: 0 Tests: 5 Failed: 0)
  Parse errors: Tests out of sequence.  Found (6) but expected (5)
                Bad plan.  You planned 6 tests but ran 5.

Fixes #23992

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26364)

test/recipes/80-test_cmp_http.t

index e045f29c43af1cb1f7f18268ff249497c34fbd7e..908909c2c64f2089386ee44682fad0d5e306d4fd 100644 (file)
@@ -270,7 +270,7 @@ sub start_mock_server {
     print "Current directory is ".getcwd()."\n";
     print "Launching mock server: $cmd\n";
     die "Invalid port: $server_port" unless $server_port =~ m/^\d+$/;
-    my $pid = open($server_fh, "$cmd|") or die "Trying to $cmd";
+    my $pid = open($server_fh, "$cmd 2>".result_dir()."/error.txt |") or die "Trying to $cmd";
     print "Pid is: $pid\n";
     if ($server_port == 0) {
         # Find out the actual server port