summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch
new file mode 100644
index 0000000000..a8d983105a
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch
@@ -0,0 +1,46 @@
1From d284752e616dfc4c9288be3bb21c04ea78cdd967 Mon Sep 17 00:00:00 2001
2From: Francis Deslauriers <francis.deslauriers@efficios.com>
3Date: Wed, 8 Sep 2021 10:16:23 -0400
4Subject: [PATCH 2/2] Fix: Tests: race condition in test_ns_contexts_change
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Issue
10=====
11The test script doesn't wait for the test application to complete before
12stopping the tracing session. The race is that depending on the
13scheduling the application is not always done generating events when the
14session is stopped.
15
16Fix
17===
18Make the test script wait for the termination of the test app before
19stopping the session.
20
21Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
22Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
23Change-Id: I29d9b41d2a2ed60a6c42020509c2067442ae332c
24Upstream-Status: Backport
25Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
26---
27 tests/regression/ust/namespaces/test_ns_contexts_change | 3 +++
28 1 file changed, 3 insertions(+)
29
30diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change
31index 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()
35
36 touch "$file_sync_before_last"
37
38+ # Wait for the test app to generate all expected events and exit.
39+ wait $app_pid
40+
41 # stop and destroy
42 stop_lttng_tracing_ok "$session_name"
43 destroy_lttng_session_ok "$session_name"
44--
452.20.1
46