1 From d284752e616dfc4c9288be3bb21c04ea78cdd967 Mon Sep 17 00:00:00 2001
2 From: Francis Deslauriers <francis.deslauriers@efficios.com>
3 Date: Wed, 8 Sep 2021 10:16:23 -0400
4 Subject: [PATCH 2/2] Fix: Tests: race condition in test_ns_contexts_change
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 The test script doesn't wait for the test application to complete before
12 stopping the tracing session. The race is that depending on the
13 scheduling the application is not always done generating events when the
18 Make the test script wait for the termination of the test app before
21 Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
22 Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
23 Change-Id: I29d9b41d2a2ed60a6c42020509c2067442ae332c
24 Upstream-Status: Backport
25 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
27 tests/regression/ust/namespaces/test_ns_contexts_change | 3 +++
28 1 file changed, 3 insertions(+)
30 diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change
31 index c0af15e..8a4b62c 100755
32 --- a/tests/regression/ust/namespaces/test_ns_contexts_change
33 +++ b/tests/regression/ust/namespaces/test_ns_contexts_change
34 @@ -79,6 +79,9 @@ function test_ns()
36 touch "$file_sync_before_last"
38 + # Wait for the test app to generate all expected events and exit.
42 stop_lttng_tracing_ok "$session_name"
43 destroy_lttng_session_ok "$session_name"