From 62c131b788b59fedd0fea20b4204e91f53b7de06 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 22 Jan 2014 22:14:59 -0500 Subject: [PATCH] Fix health check: signal parent before exit testpoint We need to signal parent for readiness before hitting the thread exit testpoint, otherwise we hang the test. Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-sessiond/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index d6bca47d5..c05be0a91 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -3693,10 +3693,6 @@ static void *thread_manage_clients(void *data) health_register(health_sessiond, HEALTH_SESSIOND_TYPE_CMD); - if (testpoint(sessiond_thread_manage_clients)) { - goto error_testpoint; - } - health_code_update(); ret = lttcomm_listen_unix_sock(client_sock); @@ -3732,6 +3728,11 @@ static void *thread_manage_clients(void *data) kill(child_ppid, SIGUSR1); } + /* This testpoint is after we signal readiness to the parent. */ + if (testpoint(sessiond_thread_manage_clients)) { + goto error; + } + if (testpoint(sessiond_thread_manage_clients_before_loop)) { goto error; } @@ -3907,7 +3908,6 @@ error: error_listen: error_create_poll: -error_testpoint: unlink(client_unix_sock_path); if (client_sock >= 0) { ret = close(client_sock); -- 2.34.1