From d775b2b71d42ec52bd9a43cb51e84aa1035e1432 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Wed, 8 Sep 2021 10:16:23 -0400 Subject: [PATCH 1/1] Fix: Tests: race condition in test_ns_contexts_change MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Issue ===== The test script doesn't wait for the test application to complete before stopping the tracing session. The race is that depending on the scheduling the application is not always done generating events when the session is stopped. Fix === Make the test script wait for the termination of the test app before stopping the session. Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: I29d9b41d2a2ed60a6c42020509c2067442ae332c --- tests/regression/ust/namespaces/test_ns_contexts_change | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change index c0af15e95..8a4b62ce3 100755 --- a/tests/regression/ust/namespaces/test_ns_contexts_change +++ b/tests/regression/ust/namespaces/test_ns_contexts_change @@ -79,6 +79,9 @@ function test_ns() touch "$file_sync_before_last" + # Wait for the test app to generate all expected events and exit. + wait $app_pid + # stop and destroy stop_lttng_tracing_ok "$session_name" destroy_lttng_session_ok "$session_name" -- 2.34.1