summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRandall S. Becker <randall.becker@nexbridge.ca>2023-09-07 20:42:10 +0100
committerPauli <pauli@openssl.org>2023-09-11 09:08:35 +1000
commitc499cbc3239e3ac93fa5acf85cec7ea7df116518 (patch)
tree11dfd3695a7dbe0607e387c609edaaea69e42326 /test
parent9a41a3c6a453a90d6c6cf106480a4a72b08b14f9 (diff)
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 <randall.becker@nexbridge.ca> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22015)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/80-test_cmp_http.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t
index bd4df0dd0d..62ce1bd169 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;
}