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-compat-Define-off64_t-as-off_t-on-linux.patch74
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-lttng-tools-filter-random-filename-of-tests-output.patch55
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch27
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch34
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service9
-rwxr-xr-xmeta/recipes-kernel/lttng/lttng-tools/run-ptest9
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch27
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch51
8 files changed, 150 insertions, 136 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch
new file mode 100644
index 0000000000..4e21d1e9f1
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-compat-Define-off64_t-as-off_t-on-linux.patch
@@ -0,0 +1,74 @@
+From 74b3844737b03492756b4f896c938b504b069f14 Mon Sep 17 00:00:00 2001
+From: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+Date: Tue, 17 Jan 2023 16:57:35 -0500
+Subject: [PATCH] compat: off64_t is not defined by musl
+
+This helps compile with latest musl, where off64_t is not defined unless
+_LARGEFILE64_SOURCE is defined. On glibc, _LARGEFILE64_SOURCE is defined
+if _GNU_SOURCE is defined, so the problem is only seen with musl.
+
+Since the project uses AC_SYS_LARGEFILE, which from the autoconf doc:
+"arrange for 64-bit file offsets, known as large-file support."
+
+As such, it is safe to assume off_t is 64-bit wide. This is checked by a
+static_assert to catch any platform where autoconf would let a 32-bit
+off_t slip.
+
+Upstream-Status: Submitted [https://review.lttng.org/c/lttng-tools/+/9268]
+Reported-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
+---
+
+--- a/src/common/compat/compat-fcntl.c
++++ b/src/common/compat/compat-fcntl.c
+@@ -8,14 +8,17 @@
+ #define _LGPL_SOURCE
+ #include <common/compat/fcntl.h>
+ #include <common/macros.h>
++#include <common/bug.h>
++#include <stdint.h>
+ #include <unistd.h>
+
+ #ifdef __linux__
+
+ LTTNG_HIDDEN
+-int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
++int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
+ unsigned int flags)
+ {
++ LTTNG_BUILD_BUG_ON(sizeof(off_t) != sizeof(int64_t));
+ #ifdef HAVE_SYNC_FILE_RANGE
+ return sync_file_range(fd, offset, nbytes, flags);
+ #else
+--- a/src/common/compat/fcntl.h
++++ b/src/common/compat/fcntl.h
+@@ -13,16 +13,12 @@
+
+ #include <common/compat/errno.h>
+
+-#if (defined(__CYGWIN__))
+-typedef long long off64_t;
+-#endif
+-
+ #if (defined(__FreeBSD__) || defined(__sun__))
+ typedef off64_t loff_t;
+ #endif
+
+ #ifdef __linux__
+-extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
++extern int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
+ unsigned int flags);
+ #define lttng_sync_file_range(fd, offset, nbytes, flags) \
+ compat_sync_file_range(fd, offset, nbytes, flags)
+@@ -37,8 +33,8 @@ extern int compat_sync_file_range(int fd
+ #define SYNC_FILE_RANGE_WAIT_BEFORE 0
+ #define SYNC_FILE_RANGE_WRITE 0
+
+-static inline int lttng_sync_file_range(int fd, off64_t offset,
+- off64_t nbytes, unsigned int flags)
++static inline int lttng_sync_file_range(int fd, off_t offset,
++ off_t nbytes, unsigned int flags)
+ {
+ return -ENOSYS;
+ }
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-lttng-tools-filter-random-filename-of-tests-output.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-lttng-tools-filter-random-filename-of-tests-output.patch
deleted file mode 100644
index fed5a2fb59..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/0001-lttng-tools-filter-random-filename-of-tests-output.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From b9744428d6dfb1cba7b6e3fdbf0613977914b12f Mon Sep 17 00:00:00 2001
-From: Dengke Du <dengke.du@windriver.com>
-Date: Fri, 29 Apr 2016 03:25:58 -0400
-Subject: [PATCH] lttng-tools: filter random filename of tests output
-
-Show the failed tests, filter the random filename when the test
-passed, add up the result.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dengke Du <dengke.du@windriver.com>
----
- tests/run.sh | 25 +++++++++++++++++++++++--
- 1 file changed, 23 insertions(+), 2 deletions(-)
-
-diff --git a/tests/run.sh b/tests/run.sh
-index 6455359..9080afc 100755
---- a/tests/run.sh
-+++ b/tests/run.sh
-@@ -17,9 +17,30 @@
- # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- #
-
-+# Define two variable to store the passed and failed result
-+pass_count=0
-+fail_count=0
-+
- [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
-
--prove --merge -v --exec '' - < $1 | sed \
-+# Using a while loop to add up the passed and failed result, we use Here Strings
-+# "<<<" in bash in order to redirect the test output to the while loop. If put the
-+# test output as a pipeline, the while loop will run in subshell, we can't get the
-+# pass_count and fail_count when the subshell exit.
-+while read line
-+do
-+ if [[ $line == "FAIL"* ]]; then
-+ echo $line;((fail_count=fail_count+1))
-+ fi
-+ if [[ $line == "PASS"* ]]; then
-+ ((pass_count=pass_count+1))
-+ fi
-+done <<< "$(prove --merge -v --exec '' - < $1 | sed \
- -e 's|^ok \(.*\)|PASS: \1|' \
- -e 's|^not ok \(.*\)|FAIL: \1|' \
-- | egrep -h 'PASS|FAIL'
-+ | egrep -h 'PASS|FAIL')"
-+
-+# Add up the result and output the passed and failed tests
-+echo "$1 statistics"
-+echo "total pass: $pass_count tests passed!"
-+echo "total fail: $fail_count tests failed!"
---
-2.8.1
-
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch
new file mode 100644
index 0000000000..2d08b08879
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-tests-do-not-strip-a-helper-library.patch
@@ -0,0 +1,27 @@
+From ab238c213fac190972f55e73cf3e0bb1c7846eb8 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 12 Dec 2019 16:52:07 +0100
+Subject: [PATCH] tests: do not strip a helper library
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tests/utils/testapp/userspace-probe-elf-binary/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
+index 03f5d5a..d12c343 100644
+--- a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
++++ b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
+@@ -12,7 +12,7 @@ userspace_probe_elf_binary_LDADD = libfoo.la
+ libfoo.strip: libfoo.la
+ $(OBJCOPY) --strip-all .libs/libfoo.so
+
+-all-local: libfoo.strip
++all-local:
+ @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+ for script in $(EXTRA_DIST); do \
+ cp -f $(srcdir)/$$script $(builddir); \
+--
+2.17.1
+
diff --git a/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch b/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch
new file mode 100644
index 0000000000..3a77ea2e43
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/disable-tests.patch
@@ -0,0 +1,34 @@
+Upstream-Status: Inappropriate [need to root cause the test hangs]
+
+We keep seeing hangs in the tools/notifications tests on x86 and arm for
+a variety of distros. Exclude them for now to work out if this is the
+only place we see them and give SWAT/triage a break from the stream
+of them.
+
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=14263
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: lttng-tools-2.13.1/tests/regression/Makefile.am
+===================================================================
+--- lttng-tools-2.13.1.orig/tests/regression/Makefile.am
++++ lttng-tools-2.13.1/tests/regression/Makefile.am
+@@ -29,18 +29,6 @@ TESTS = tools/base-path/test_ust \
+ tools/crash/test_crash \
+ tools/regen-metadata/test_ust \
+ tools/regen-statedump/test_ust \
+- tools/notification/test_notification_ust_error \
+- tools/notification/test_notification_ust_buffer_usage \
+- tools/notification/test_notification_ust_capture \
+- tools/notification/test_notification_ust_event_rule_condition_exclusion \
+- tools/notification/test_notification_kernel_error \
+- tools/notification/test_notification_kernel_buffer_usage \
+- tools/notification/test_notification_kernel_capture \
+- tools/notification/test_notification_kernel_instrumentation \
+- tools/notification/test_notification_kernel_syscall \
+- tools/notification/test_notification_notifier_discarded_count \
+- tools/notification/test_notification_kernel_userspace_probe \
+- tools/notification/test_notification_multi_app \
+ tools/rotation/test_ust \
+ tools/rotation/test_kernel \
+ tools/rotation/test_save_load_mi \
diff --git a/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service
new file mode 100644
index 0000000000..aaf8130592
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=LTTng 2.x central tracing registry session daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/lttng-sessiond -d
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta/recipes-kernel/lttng/lttng-tools/run-ptest b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
index e758815c77..c4dbe50f21 100755
--- a/meta/recipes-kernel/lttng/lttng-tools/run-ptest
+++ b/meta/recipes-kernel/lttng/lttng-tools/run-ptest
@@ -1,4 +1,7 @@
#!/bin/sh
-
-make -C tests installcheck
-
+# 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'
diff --git a/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch b/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch
deleted file mode 100644
index 958bce48e0..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/runtest-2.4.0.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 584f59b..c2bcabd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \
- dist_noinst_DATA = CodingStyle
-
- EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt
-+
-+install-ptest:
-+ cp -r $(srcdir)/tests $(DESTDIR)
-+ for m in $$(find $(DESTDIR)/tests -name Makefile); do \
-+ sed -i -e 's|^Makefile:|_Makefile:|' $$m; \
-+ done
-diff --git a/tests/run.sh b/tests/run.sh
-index c6c50fd..6455359 100755
---- a/tests/run.sh
-+++ b/tests/run.sh
-@@ -19,4 +19,7 @@
-
- [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
-
--prove --merge --exec '' - < $1
-+prove --merge -v --exec '' - < $1 | sed \
-+ -e 's|^ok \(.*\)|PASS: \1|' \
-+ -e 's|^not ok \(.*\)|FAIL: \1|' \
-+ | egrep -h 'PASS|FAIL'
diff --git a/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch b/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
deleted file mode 100644
index bd4f7d1d1b..0000000000
--- a/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 1f54181c2df1fb92c3323a6dbf8273fb66b883b6 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
- <jeremie.galarneau@efficios.com>
-Date: Sat, 17 Oct 2015 19:41:47 -0400
-Subject: [PATCH] Port: Don't use SIGUNUSED which is not defined on Solaris
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-Organization: O.S. Systems Software LTDA.
-
-Upstream-Status: Backport [2.8.0]
-
-Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
----
- src/common/runas.c | 18 +++++-------------
- 1 file changed, 5 insertions(+), 13 deletions(-)
-
-diff --git a/src/common/runas.c b/src/common/runas.c
-index 57f7382..0825470 100644
---- a/src/common/runas.c
-+++ b/src/common/runas.c
-@@ -530,21 +530,13 @@ int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid)
- static
- int reset_sighandler(void)
- {
-- int sig, ret = 0;
-+ int sig;
-
-- for (sig = SIGHUP; sig <= SIGUNUSED; sig++) {
-- /* Skip unblockable signals. */
-- if (sig == SIGKILL || sig == SIGSTOP) {
-- continue;
-- }
-- if (signal(sig, SIG_DFL) == SIG_ERR) {
-- PERROR("reset signal %d", sig);
-- ret = -1;
-- goto end;
-- }
-+ DBG("Resetting run_as worker signal handlers to default");
-+ for (sig = 1; sig <= 31; sig++) {
-+ (void) signal(sig, SIG_DFL);
- }
--end:
-- return ret;
-+ return 0;
- }
-
- static
---
-2.6.2
-