summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2024-03-22 16:11:42 +0100
committerTomas Mraz <tomas@openssl.org>2024-04-29 10:25:39 +0200
commitf4fcc21fdccfde90bda6f8a94d7f4e07f947e38f (patch)
tree5ec5eff4d35d2032f60996505fd97defd53fd415 /test
parent7054412ea8bb49d9522c3dd99982e41bf08c3ef7 (diff)
82-test_ocsp_cert_chain.t: kill -HUP the server after client quits
This ensures even if the connection for some reason fails, the server will terminate and the test won't get stuck. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/23857)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/82-test_ocsp_cert_chain.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/recipes/82-test_ocsp_cert_chain.t b/test/recipes/82-test_ocsp_cert_chain.t
index 1328776a14..a0c3737be8 100644
--- a/test/recipes/82-test_ocsp_cert_chain.t
+++ b/test/recipes/82-test_ocsp_cert_chain.t
@@ -120,6 +120,9 @@ sub run_test {
my @s_client_cmd = ("s_client", "-connect", "localhost:$server_port", "-status", "-verify_return_error");
my $s_client_pid = open3(my $s_client_i, my $s_client_o, my $s_client_e = gensym, $shlib_wrap, $apps_openssl, @s_client_cmd);
+ waitpid($s_client_pid, 0);
+ kill 'HUP', $s_server_pid, $ocsp_pid;
+
### the output from s_server that we want to check is written to its stderr
### cert_status: ocsp response sent:
@@ -133,9 +136,6 @@ sub run_test {
}
}
ok($resp == 1, "check s_server sent ocsp response");
-
- waitpid($s_client_pid, 0);
- kill 'HUP', $s_server_pid, $ocsp_pid;
}
run_test();