From c45f0dd80370f1aa942cf47fc5ea99cb887621e4 Mon Sep 17 00:00:00 2001 From: Bernd Edlinger Date: Fri, 21 Mar 2025 20:58:57 +0100 Subject: [PATCH] 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) --- test/recipes/80-test_cmp_http.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index 39f3a54dd29..63b25259f58 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -330,7 +330,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/; @@ -344,6 +344,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; -- 2.47.2