From: Stephan Bosch Date: Mon, 11 Nov 2019 22:37:01 +0000 (+0100) Subject: lib-http: test-http-server-errors - Adjust log prefix code to match other similar... X-Git-Tag: 2.3.13~703 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9572e778180c903bfcf4417733b57ef695eff77d;p=thirdparty%2Fdovecot%2Fcore.git lib-http: test-http-server-errors - Adjust log prefix code to match other similar unit tests. --- diff --git a/src/lib-http/test-http-server-errors.c b/src/lib-http/test-http-server-errors.c index 2adb08a8dd..128ba6b229 100644 --- a/src/lib-http/test-http-server-errors.c +++ b/src/lib-http/test-http-server-errors.c @@ -960,12 +960,10 @@ test_run_client_server(const struct http_server_settings *server_set, client_pids[i] = (pid_t)-1; client_pids_count = 0; hostpid_init(); - if (debug) { - i_debug("client[%d]: PID=%s", - i+1, my_pid); - } - i_set_failure_prefix("CLIENT[%u]: ", i + 1); /* Child: client */ + i_set_failure_prefix("CLIENT[%u]: ", i + 1); + if (debug) + i_debug("PID=%s", my_pid); /* Wait a little for server setup */ i_sleep_msecs(100); i_close_fd(&fd_listen); @@ -980,19 +978,18 @@ test_run_client_server(const struct http_server_settings *server_set, exit(1); } } - if (debug) - i_debug("server: PID=%s", my_pid); - i_set_failure_prefix("SERVER: "); } /* Parent: server */ - + i_set_failure_prefix("SERVER: "); + if (debug) + i_debug("PID=%s", my_pid); ioloop = io_loop_create(); server_test(server_set); io_loop_destroy(&ioloop); + i_unset_failure_prefix(); i_close_fd(&fd_listen); - test_clients_kill_all(); i_free(client_pids); }