summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch41
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch55
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-tests-wait-some-more-before-analysing-traces-or-star.patch88
-rwxr-xr-xmeta/recipes-kernel/lttng/lttng-tools/run-ptest1
4 files changed, 130 insertions, 55 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch
new file mode 100644
index 0000000000..925b51c3ce
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-src-common-correct-header-location.patch
@@ -0,0 +1,41 @@
1From 790ef313364d1f1efb6f283705bb324eea2979ba Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Sun, 5 Sep 2021 10:13:08 +0200
4Subject: [PATCH] src/common: correct header location
5
6sys/unistd.h is not guaranteed to exist, and does not with
7e.g. musl C library.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11---
12 src/common/kernel-probe.c | 2 +-
13 src/common/userspace-probe.c | 2 +-
14 2 files changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/src/common/kernel-probe.c b/src/common/kernel-probe.c
17index 2beb53f..44100bc 100644
18--- a/src/common/kernel-probe.c
19+++ b/src/common/kernel-probe.c
20@@ -20,7 +20,7 @@
21 #include <lttng/kernel-probe.h>
22 #include <sys/stat.h>
23 #include <sys/types.h>
24-#include <sys/unistd.h>
25+#include <unistd.h>
26
27 static
28 int lttng_kernel_probe_location_address_serialize(
29diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c
30index 67b0ee6..66afc6f 100644
31--- a/src/common/userspace-probe.c
32+++ b/src/common/userspace-probe.c
33@@ -20,7 +20,7 @@
34 #include <lttng/userspace-probe-internal.h>
35 #include <sys/stat.h>
36 #include <sys/types.h>
37-#include <sys/unistd.h>
38+#include <unistd.h>
39
40 static
41 int lttng_userspace_probe_location_function_set_binary_fd_handle(
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch
deleted file mode 100644
index 08c1423310..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-regression-disable-the-tools-live-tests.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From de9fc501e775cae05f1f87534b4237cd78e8d9a8 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 24 Jan 2020 18:03:25 +0100
4Subject: [PATCH] tests/regression: disable the tools/live tests
5
6They have been found to sporadically fail; the issue has been
7reported upstream and they will work to investigate and fix:
8https://bugs.lttng.org/issues/1217
9
10Upstream-Status: Inappropriate [upstream is working on a real fix]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12
13---
14 tests/regression/Makefile.am | 10 +---------
15 1 file changed, 1 insertion(+), 9 deletions(-)
16
17diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am
18index cbac90d..d467886 100644
19--- a/tests/regression/Makefile.am
20+++ b/tests/regression/Makefile.am
21@@ -11,16 +11,10 @@ TESTS = tools/filtering/test_invalid_filter \
22 tools/filtering/test_valid_filter \
23 tools/streaming/test_ust \
24 tools/health/test_thread_ok \
25- tools/live/test_ust \
26- tools/live/test_ust_tracefile_count \
27- tools/live/test_lttng_ust \
28 tools/tracefile-limits/test_tracefile_count \
29 tools/tracefile-limits/test_tracefile_size \
30- tools/exclusion/test_exclusion \
31 tools/snapshots/test_ust_fast \
32- tools/snapshots/test_ust_streaming \
33 tools/save-load/test_save \
34- tools/save-load/test_load \
35 tools/save-load/test_autoload \
36 tools/mi/test_mi \
37 tools/wildcard/test_event_wildcard \
38@@ -38,8 +32,7 @@ TESTS = tools/filtering/test_invalid_filter \
39 tools/working-directory/test_relayd_working_directory \
40 tools/notification/test_notification_multi_app \
41 tools/clear/test_ust \
42- tools/clear/test_kernel \
43- tools/tracker/test_event_tracker
44+ tools/clear/test_kernel
45
46 if HAVE_LIBLTTNG_UST_CTL
47 SUBDIRS += ust
48@@ -60,7 +53,6 @@ TESTS += ust/before-after/test_before_after \
49 ust/multi-lib/test_multi_lib \
50 ust/rotation-destroy-flush/test_rotation_destroy_flush \
51 ust/namespaces/test_ns_contexts \
52- ust/namespaces/test_ns_contexts_change \
53 tools/metadata/test_ust \
54 tools/relayd-grouping/test_ust
55 endif # HAVE_LIBLTTNG_UST_CTL
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 0000000000..c4cac9cc58
--- /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
diff --git a/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
index eaa2e7b29d..c4dbe50f21 100755
--- a/meta/recipes-kernel/lttng/lttng-tools/run-ptest
+++ b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
@@ -1,6 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2# Without --ignore-exit, the tap harness causes any FAILs within a 2# Without --ignore-exit, the tap harness causes any FAILs within a
3# test plan to raise ERRORs; this is just noise. 3# test plan to raise ERRORs; this is just noise.
4export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs
4makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD" 5makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD"
5make -k -t all >/dev/null 2>&1 6make -k -t all >/dev/null 2>&1
6exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g' 7exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g'