From f7c4d8622840b92a9f6cdb00d937d063a4efae9c Mon Sep 17 00:00:00 2001
From: "Dr. David von Oheimb" <David.von.Oheimb@siemens.com>
Date: Mon, 8 Mar 2021 09:26:28 +0100
Subject: [PATCH] 80-test_cmp_http.t: Add diagnostic info on starting/stopping
 mock server

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14630)
---
 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 4315b1c439..80cb6a4122 100644
--- a/test/recipes/80-test_cmp_http.t
+++ b/test/recipes/80-test_cmp_http.t
@@ -273,12 +273,17 @@ sub start_mock_server {
     my $cmd = "LD_LIBRARY_PATH=$dir DYLD_LIBRARY_PATH=$dir " .
         bldtop_dir($app) . " -config server.cnf $args";
     my $pid = mock_server_pid();
-    return $pid if $pid; # already running
+    if ($pid) {
+        print "Mock server already running with pid=$pid\n";
+        return $pid;
+    }
+    print "Launching mock server: $cmd\n";
     return system("$cmd &") == 0 # start in background, check for success
         ? (sleep 1, mock_server_pid()) : 0;
 }
 
 sub stop_mock_server {
     my $pid = $_[0];
+    print "Killing mock server with pid=$pid\n";
     system("kill $pid") if $pid;
 }