From: Bernd Edlinger Date: Fri, 21 Mar 2025 19:58:57 +0000 (+0100) Subject: Fix a visual glitch in test_cmp_http.t X-Git-Tag: openssl-3.3.4~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5eeb8c8f226437697fef198d5d206cec7694e76;p=thirdparty%2Fopenssl.git Fix a visual glitch in test_cmp_http.t Kill the shell process after the Mock server is running, to prevent the shell from printing an error message when the Mock server is finally killed. Reviewed-by: Paul Dale Reviewed-by: David von Oheimb Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27144) (cherry picked from commit c45f0dd80370f1aa942cf47fc5ea99cb887621e4) --- diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index 36d7f372faa..b3d104861d0 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -328,7 +328,7 @@ sub start_server { if ($server_host eq '*' || $server_port == 0) { # Find out the actual server host and port and possibly different PID my ($host, $port); - $pid = 0; + my $pid0 = $pid; while (<$server_fh>) { print "$server_name server output: $_"; next if m/using section/; @@ -342,6 +342,11 @@ sub start_server { $server_host = "127.0.0.1" if $host eq "0.0.0.0"; } $server_port = $port if $server_port == 0 && defined $port; + if ($pid0 != $pid) { + # kill the shell process + kill('KILL', $pid0); + waitpid($pid0, 0); + } } if ($server_host eq '*' || $server_port == 0) { stop_server($server_name, $pid) if $pid;