From: Jonathan Rajotte Date: Tue, 10 Dec 2019 16:15:39 +0000 (-0500) Subject: Fix: move testpoint after state update X-Git-Tag: v2.12.0-rc1~173 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9ad83bb682456e2130e0cf29fc1ed4b0d7a815db;p=lttng-tools.git Fix: move testpoint after state update 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 Change-Id: Ie4bf3bea6f84f49f5eceb413ae75a7e6fff08a8f Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/register.c b/src/bin/lttng-sessiond/register.c index 464b89459..d57a564cf 100644 --- a/src/bin/lttng-sessiond/register.c +++ b/src/bin/lttng-sessiond/register.c @@ -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");