Fix health check: signal parent before exit testpoint
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Jan 2014 03:14:59 +0000 (22:14 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 28 Jan 2014 21:19:41 +0000 (16:19 -0500)
We need to signal parent for readiness before hitting the thread exit
testpoint, otherwise we hang the test.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/main.c

index 821431d96343b6da91b282e83e4e1dabf3c140d0..5205984461a759074c945575c05ebf497554a0b0 100644 (file)
@@ -3758,10 +3758,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);
@@ -3797,6 +3793,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;
        }
@@ -3972,7 +3973,6 @@ error:
 
 error_listen:
 error_create_poll:
-error_testpoint:
        unlink(client_unix_sock_path);
        if (client_sock >= 0) {
                ret = close(client_sock);
This page took 0.028 seconds and 4 git commands to generate.