From c499cbc3239e3ac93fa5acf85cec7ea7df116518 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Thu, 7 Sep 2023 20:42:10 +0100 Subject: [PATCH] Prevent 80-test_cmp_http from accidentally killing perl in error. If there is an issue with setting up the test environment in this test, pid is not set so stop_server kills the perl process. A guard has been added to prevent this situation. Fixes: #22014 Signed-off-by: Randall S. Becker Reviewed-by: Richard Levitte Reviewed-by: Tom Cosgrove Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/22015) --- test/recipes/80-test_cmp_http.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index bd4df0dd0dc..62ce1bd1690 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -314,7 +314,7 @@ sub start_server { $server_host = "127.0.0.1" if $server_host eq "0.0.0.0"; } unless ($server_port > 0) { - stop_server($server_name, $pid); + stop_server($server_name, $pid) if $pid; print "Cannot get expected output from the $server_name server"; return 0; } -- 2.47.2