From 9ad83bb682456e2130e0cf29fc1ed4b0d7a815db Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 10 Dec 2019 11:15:39 -0500 Subject: [PATCH] Fix: move testpoint after state update MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-sessiond/register.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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"); -- 2.34.1