Fix: move testpoint after state update
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 10 Dec 2019 16:15:39 +0000 (11:15 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 13 Dec 2019 20:06:06 +0000 (15:06 -0500)
This prevent failure and hang for the long_regression test suite.

Otherwise the sessiond error out before the test completion due to an
invalid thread state.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: Ie4bf3bea6f84f49f5eceb413ae75a7e6fff08a8f
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/register.c

index 464b89459f7f6f7bc4880fa698d38188f83783ec..d57a564cf6ec6f38ec5210f9a7397931eedc695a 100644 (file)
@@ -183,10 +183,6 @@ static void *thread_application_registration(void *data)
                goto error_listen;
        }
 
-       if (testpoint(sessiond_thread_registration_apps)) {
-               goto error_create_poll;
-       }
-
        /*
         * Pass 2 as size here for the thread quit pipe and apps_sock. Nothing
         * more will be added to this poll set.
@@ -211,6 +207,10 @@ static void *thread_application_registration(void *data)
        set_thread_status(thread_state, true);
        pthread_cleanup_pop(0);
 
+       if (testpoint(sessiond_thread_registration_apps)) {
+               goto error_poll_add;
+       }
+
        while (1) {
                DBG("Accepting application registration");
 
This page took 0.025403 seconds and 4 git commands to generate.