summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch88
1 files changed, 88 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch
new file mode 100644
index 0000000..c4cac9c
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch
@@ -0,0 +1,88 @@
1From 8d9daede0882d239b0a47b0f7a6db68ba4934a7d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sat, 4 Sep 2021 13:57:39 +0200
4Subject: [PATCH] tests: wait some more before analysing traces or starting
5 tracing
6
7Otherwise, there are sporadic race failures where lttng tracing
8is stopped before all expected events are collected or is started too soon, e.g.:
9
10PASS: tools/tracker/test_event_tracker 205 - Traced application stopped.
11PASS: tools/tracker/test_event_tracker 206 - Stop lttng tracing for session
12PASS: tools/tracker/test_event_tracker 207 - Destroy session tracker
13FAIL: tools/tracker/test_event_tracker 208 - Validate empty trace
14
15PASS: ust/namespaces/test_ns_contexts_change 42 - Stop lttng tracing for session mnt_ns
16PASS: ust/namespaces/test_ns_contexts_change 43 - Destroy session mnt_ns
17PASS: ust/namespaces/test_ns_contexts_change 44 - Wait after kill session daemon
18PASS: ust/namespaces/test_ns_contexts_change 45 - Validate trace for event mnt_ns = 4026531840, 1000 events
19PASS: ust/namespaces/test_ns_contexts_change 46 - Read a total of 1000 events, expected 1000
20PASS: ust/namespaces/test_ns_contexts_change 47 - Validate trace for event mnt_ns = 4026532303, 233 events
21FAIL: ust/namespaces/test_ns_contexts_change 48 - Read a total of 233 events, expected 1000
22
23This is a hack; issue should be fixed upstream with explicit syncs.
24It has been reported here: https://bugs.lttng.org/issues/1217
25
26Upstream-Status: Inappropriate [needs a real fix]
27Signed-off-by: Alexander Kanavin <alex@linutronix.de>
28---
29 tests/regression/tools/tracker/test_event_tracker | 8 ++++++++
30 tests/regression/ust/namespaces/test_ns_contexts_change | 2 ++
31 2 files changed, 10 insertions(+)
32
33diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
34index feb3787..a0f2257 100755
35--- a/tests/regression/tools/tracker/test_event_tracker
36+++ b/tests/regression/tools/tracker/test_event_tracker
37@@ -130,6 +130,8 @@ function test_event_vpid_tracker()
38
39 prepare_"$domain"_app
40
41+sleep 5
42+
43 start_lttng_tracing_ok
44
45 if [ "$expect_event" -eq 1 ]; then
46@@ -173,6 +175,8 @@ function test_event_pid_tracker()
47
48 prepare_"$domain"_app
49
50+sleep 5
51+
52 start_lttng_tracing_ok
53
54 if [ "$expect_event" -eq 1 ]; then
55@@ -275,6 +279,8 @@ function test_event_vpid_track_untrack()
56
57 prepare_"$domain"_app
58
59+sleep 5
60+
61 start_lttng_tracing_ok
62
63 lttng_track_"$domain"_ok "--vpid ${CHILD_PID}"
64@@ -315,6 +321,8 @@ function test_event_pid_track_untrack()
65
66 prepare_"$domain"_app
67
68+sleep 5
69+
70 start_lttng_tracing_ok
71
72 lttng_track_"$domain"_ok "--pid ${CHILD_PID}"
73diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change
74index c0af15e..b111bfe 100755
75--- a/tests/regression/ust/namespaces/test_ns_contexts_change
76+++ b/tests/regression/ust/namespaces/test_ns_contexts_change
77@@ -79,6 +79,8 @@ function test_ns()
78
79 touch "$file_sync_before_last"
80
81+sleep 5
82+
83 # stop and destroy
84 stop_lttng_tracing_ok "$session_name"
85 destroy_lttng_session_ok "$session_name"
86--
872.20.1
88