summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2021-09-06 11:38:48 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-10 09:25:04 +0100
commit750d640f12b5c6804af51a67e23d4aca93564b79 (patch)
treec9991cf2878cc12928dcdcd1e938daac6007f06c /meta/recipes-kernel/lttng/lttng-tools
parentb71bfba1b5076ad1b9a10c08ef0e3393ccbed92a (diff)
downloadopenembedded-core-750d640f12b5c6804af51a67e23d4aca93564b79.tar.gz
lttng: update 2.12 -> 2.13.0
Drop 0001-tests-regression-disable-the-tools-live-tests.patch (mass-disabling of ptests) and replace that with more targeted fixes: - a patch that adds explicit sleeps where races due to too tight timings were observed (not a proper fix; upstream needs to figure out how to sync explicitly and reliably) - LD_LIBRARY_PATH so that helper binaries are able to find their custom libraries they're linked with (we strip rpath from them for reproducibility) - set pgrep location explicitly as it used unconditionally on target, but auto-detected (incorrectly) on the host - enable kmod as it is available in target images - correct various missing scripts, binaries, and inhibit stripping where that is expected. License-Update: license info consolidated in LICENSE Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 @@
+From 790ef313364d1f1efb6f283705bb324eea2979ba Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sun, 5 Sep 2021 10:13:08 +0200
+Subject: [PATCH] src/common: correct header location
+
+sys/unistd.h is not guaranteed to exist, and does not with
+e.g. musl C library.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/common/kernel-probe.c | 2 +-
+ src/common/userspace-probe.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/common/kernel-probe.c b/src/common/kernel-probe.c
+index 2beb53f..44100bc 100644
+--- a/src/common/kernel-probe.c
++++ b/src/common/kernel-probe.c
+@@ -20,7 +20,7 @@
+ #include <lttng/kernel-probe.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+
+ static
+ int lttng_kernel_probe_location_address_serialize(
+diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c
+index 67b0ee6..66afc6f 100644
+--- a/src/common/userspace-probe.c
++++ b/src/common/userspace-probe.c
+@@ -20,7 +20,7 @@
+ #include <lttng/userspace-probe-internal.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+
+ static
+ 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 @@
-From de9fc501e775cae05f1f87534b4237cd78e8d9a8 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Fri, 24 Jan 2020 18:03:25 +0100
-Subject: [PATCH] tests/regression: disable the tools/live tests
-
-They have been found to sporadically fail; the issue has been
-reported upstream and they will work to investigate and fix:
-https://bugs.lttng.org/issues/1217
-
-Upstream-Status: Inappropriate [upstream is working on a real fix]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- tests/regression/Makefile.am | 10 +---------
- 1 file changed, 1 insertion(+), 9 deletions(-)
-
-diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am
-index cbac90d..d467886 100644
---- a/tests/regression/Makefile.am
-+++ b/tests/regression/Makefile.am
-@@ -11,16 +11,10 @@ TESTS = tools/filtering/test_invalid_filter \
- tools/filtering/test_valid_filter \
- tools/streaming/test_ust \
- tools/health/test_thread_ok \
-- tools/live/test_ust \
-- tools/live/test_ust_tracefile_count \
-- tools/live/test_lttng_ust \
- tools/tracefile-limits/test_tracefile_count \
- tools/tracefile-limits/test_tracefile_size \
-- tools/exclusion/test_exclusion \
- tools/snapshots/test_ust_fast \
-- tools/snapshots/test_ust_streaming \
- tools/save-load/test_save \
-- tools/save-load/test_load \
- tools/save-load/test_autoload \
- tools/mi/test_mi \
- tools/wildcard/test_event_wildcard \
-@@ -38,8 +32,7 @@ TESTS = tools/filtering/test_invalid_filter \
- tools/working-directory/test_relayd_working_directory \
- tools/notification/test_notification_multi_app \
- tools/clear/test_ust \
-- tools/clear/test_kernel \
-- tools/tracker/test_event_tracker
-+ tools/clear/test_kernel
-
- if HAVE_LIBLTTNG_UST_CTL
- SUBDIRS += ust
-@@ -60,7 +53,6 @@ TESTS += ust/before-after/test_before_after \
- ust/multi-lib/test_multi_lib \
- ust/rotation-destroy-flush/test_rotation_destroy_flush \
- ust/namespaces/test_ns_contexts \
-- ust/namespaces/test_ns_contexts_change \
- tools/metadata/test_ust \
- tools/relayd-grouping/test_ust
- 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 @@
+From 8d9daede0882d239b0a47b0f7a6db68ba4934a7d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sat, 4 Sep 2021 13:57:39 +0200
+Subject: [PATCH] tests: wait some more before analysing traces or starting
+ tracing
+
+Otherwise, there are sporadic race failures where lttng tracing
+is stopped before all expected events are collected or is started too soon, e.g.:
+
+PASS: tools/tracker/test_event_tracker 205 - Traced application stopped.
+PASS: tools/tracker/test_event_tracker 206 - Stop lttng tracing for session
+PASS: tools/tracker/test_event_tracker 207 - Destroy session tracker
+FAIL: tools/tracker/test_event_tracker 208 - Validate empty trace
+
+PASS: ust/namespaces/test_ns_contexts_change 42 - Stop lttng tracing for session mnt_ns
+PASS: ust/namespaces/test_ns_contexts_change 43 - Destroy session mnt_ns
+PASS: ust/namespaces/test_ns_contexts_change 44 - Wait after kill session daemon
+PASS: ust/namespaces/test_ns_contexts_change 45 - Validate trace for event mnt_ns = 4026531840, 1000 events
+PASS: ust/namespaces/test_ns_contexts_change 46 - Read a total of 1000 events, expected 1000
+PASS: ust/namespaces/test_ns_contexts_change 47 - Validate trace for event mnt_ns = 4026532303, 233 events
+FAIL: ust/namespaces/test_ns_contexts_change 48 - Read a total of 233 events, expected 1000
+
+This is a hack; issue should be fixed upstream with explicit syncs.
+It has been reported here: https://bugs.lttng.org/issues/1217
+
+Upstream-Status: Inappropriate [needs a real fix]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ tests/regression/tools/tracker/test_event_tracker | 8 ++++++++
+ tests/regression/ust/namespaces/test_ns_contexts_change | 2 ++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker
+index feb3787..a0f2257 100755
+--- a/tests/regression/tools/tracker/test_event_tracker
++++ b/tests/regression/tools/tracker/test_event_tracker
+@@ -130,6 +130,8 @@ function test_event_vpid_tracker()
+
+ prepare_"$domain"_app
+
++sleep 5
++
+ start_lttng_tracing_ok
+
+ if [ "$expect_event" -eq 1 ]; then
+@@ -173,6 +175,8 @@ function test_event_pid_tracker()
+
+ prepare_"$domain"_app
+
++sleep 5
++
+ start_lttng_tracing_ok
+
+ if [ "$expect_event" -eq 1 ]; then
+@@ -275,6 +279,8 @@ function test_event_vpid_track_untrack()
+
+ prepare_"$domain"_app
+
++sleep 5
++
+ start_lttng_tracing_ok
+
+ lttng_track_"$domain"_ok "--vpid ${CHILD_PID}"
+@@ -315,6 +321,8 @@ function test_event_pid_track_untrack()
+
+ prepare_"$domain"_app
+
++sleep 5
++
+ start_lttng_tracing_ok
+
+ lttng_track_"$domain"_ok "--pid ${CHILD_PID}"
+diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change
+index c0af15e..b111bfe 100755
+--- a/tests/regression/ust/namespaces/test_ns_contexts_change
++++ b/tests/regression/ust/namespaces/test_ns_contexts_change
+@@ -79,6 +79,8 @@ function test_ns()
+
+ touch "$file_sync_before_last"
+
++sleep 5
++
+ # stop and destroy
+ stop_lttng_tracing_ok "$session_name"
+ destroy_lttng_session_ok "$session_name"
+--
+2.20.1
+
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 @@
#!/bin/sh
# Without --ignore-exit, the tap harness causes any FAILs within a
# test plan to raise ERRORs; this is just noise.
+export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs
makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD"
make -k -t all >/dev/null 2>&1
exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g'