diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools')
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 @@ | |||
1 | From 790ef313364d1f1efb6f283705bb324eea2979ba Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Sun, 5 Sep 2021 10:13:08 +0200 | ||
4 | Subject: [PATCH] src/common: correct header location | ||
5 | |||
6 | sys/unistd.h is not guaranteed to exist, and does not with | ||
7 | e.g. musl C library. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-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 | |||
16 | diff --git a/src/common/kernel-probe.c b/src/common/kernel-probe.c | ||
17 | index 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( | ||
29 | diff --git a/src/common/userspace-probe.c b/src/common/userspace-probe.c | ||
30 | index 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 @@ | |||
1 | From de9fc501e775cae05f1f87534b4237cd78e8d9a8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 24 Jan 2020 18:03:25 +0100 | ||
4 | Subject: [PATCH] tests/regression: disable the tools/live tests | ||
5 | |||
6 | They have been found to sporadically fail; the issue has been | ||
7 | reported upstream and they will work to investigate and fix: | ||
8 | https://bugs.lttng.org/issues/1217 | ||
9 | |||
10 | Upstream-Status: Inappropriate [upstream is working on a real fix] | ||
11 | Signed-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 | |||
17 | diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am | ||
18 | index 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 @@ | |||
1 | From 8d9daede0882d239b0a47b0f7a6db68ba4934a7d Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Sat, 4 Sep 2021 13:57:39 +0200 | ||
4 | Subject: [PATCH] tests: wait some more before analysing traces or starting | ||
5 | tracing | ||
6 | |||
7 | Otherwise, there are sporadic race failures where lttng tracing | ||
8 | is stopped before all expected events are collected or is started too soon, e.g.: | ||
9 | |||
10 | PASS: tools/tracker/test_event_tracker 205 - Traced application stopped. | ||
11 | PASS: tools/tracker/test_event_tracker 206 - Stop lttng tracing for session | ||
12 | PASS: tools/tracker/test_event_tracker 207 - Destroy session tracker | ||
13 | FAIL: tools/tracker/test_event_tracker 208 - Validate empty trace | ||
14 | |||
15 | PASS: ust/namespaces/test_ns_contexts_change 42 - Stop lttng tracing for session mnt_ns | ||
16 | PASS: ust/namespaces/test_ns_contexts_change 43 - Destroy session mnt_ns | ||
17 | PASS: ust/namespaces/test_ns_contexts_change 44 - Wait after kill session daemon | ||
18 | PASS: ust/namespaces/test_ns_contexts_change 45 - Validate trace for event mnt_ns = 4026531840, 1000 events | ||
19 | PASS: ust/namespaces/test_ns_contexts_change 46 - Read a total of 1000 events, expected 1000 | ||
20 | PASS: ust/namespaces/test_ns_contexts_change 47 - Validate trace for event mnt_ns = 4026532303, 233 events | ||
21 | FAIL: ust/namespaces/test_ns_contexts_change 48 - Read a total of 233 events, expected 1000 | ||
22 | |||
23 | This is a hack; issue should be fixed upstream with explicit syncs. | ||
24 | It has been reported here: https://bugs.lttng.org/issues/1217 | ||
25 | |||
26 | Upstream-Status: Inappropriate [needs a real fix] | ||
27 | Signed-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 | |||
33 | diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker | ||
34 | index 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}" | ||
73 | diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change | ||
74 | index 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 | -- | ||
87 | 2.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. |
4 | export LD_LIBRARY_PATH=FIXMEPTESTPATH/tests/utils/testapp/userspace-probe-elf-binary/.libs | ||
4 | makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD" | 5 | makeargs="LOG_DRIVER_FLAGS=--ignore-exit top_srcdir=$PWD top_builddir=$PWD" |
5 | make -k -t all >/dev/null 2>&1 | 6 | make -k -t all >/dev/null 2>&1 |
6 | exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g' | 7 | exec make -k -s $makeargs check 2>/dev/null | sed -e 's#/tmp/tmp\...........#/tmp/tmp.XXXXXXXXXX#g' |