diff options
Diffstat (limited to 'meta/recipes-kernel/lttng/babeltrace2')
6 files changed, 216 insertions, 35 deletions
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch new file mode 100644 index 0000000000..4dffa7bfa5 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From a73cef80a0d4129f74ab2e160a15693235aad4d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 20 Mar 2025 18:10:08 -0700 | ||
4 | Subject: [PATCH] Cast result of bt_field_blob_get_length to size_t in | ||
5 | constructor of bt2s::span | ||
6 | |||
7 | Fixes errors e.g. | ||
8 | | ../../git/src/cpp-common/bt2/field.hpp:1139:82: error: non-constant-expression cannot be narrowed from type 'std::uint64_t' (aka 'unsigned long long') to 'size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] | ||
9 | | 1139 | return {internal::CommonBlobFieldSpec<LibObjT>::data(this->libObjPtr()), this->length()}; | ||
10 | | | ^~~~~~~~~~~~~~ | ||
11 | | ../../git/src/plugins/ctf/common/src/msg-iter.cpp:744:56: note: in instantiation of member function 'bt2::CommonBlobField<bt_field>::data' requested here | ||
12 | | 744 | std::memcpy(&this->_stackTopCurSubField().asBlob().data()[_mCurBlobFieldDataOffset], | ||
13 | | | ^ | ||
14 | | ../../git/src/cpp-common/bt2/field.hpp:1139:82: note: insert an explicit cast to silence this issue | ||
15 | | 1139 | return {internal::CommonBlobFieldSpec<LibObjT>::data(this->libObjPtr()), this->length()}; | ||
16 | | | ^~~~~~~~~~~~~~ | ||
17 | | | static_cast<size_type>( ) | ||
18 | |||
19 | Upstream-Status: Backport [https://github.com/efficios/babeltrace/commit/1e6b34e411c61135ad256047a985a9bad927eae0] | ||
20 | |||
21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
22 | --- | ||
23 | src/cpp-common/bt2/field.hpp | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | diff --git a/src/cpp-common/bt2/field.hpp b/src/cpp-common/bt2/field.hpp | ||
27 | index 8b291f7a..3a7d30a4 100644 | ||
28 | --- a/src/cpp-common/bt2/field.hpp | ||
29 | +++ b/src/cpp-common/bt2/field.hpp | ||
30 | @@ -1136,7 +1136,7 @@ public: | ||
31 | |||
32 | bt2s::span<typename internal::CommonBlobFieldSpec<LibObjT>::Data> data() const noexcept | ||
33 | { | ||
34 | - return {internal::CommonBlobFieldSpec<LibObjT>::data(this->libObjPtr()), this->length()}; | ||
35 | + return {internal::CommonBlobFieldSpec<LibObjT>::data(this->libObjPtr()), static_cast<std::size_t>(this->length())}; | ||
36 | } | ||
37 | |||
38 | std::uint64_t length() const noexcept | ||
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-Make-manpages-multilib-identical.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-Make-manpages-multilib-identical.patch index 2401b176e6..c2b76b1ed5 100644 --- a/meta/recipes-kernel/lttng/babeltrace2/0001-Make-manpages-multilib-identical.patch +++ b/meta/recipes-kernel/lttng/babeltrace2/0001-Make-manpages-multilib-identical.patch | |||
@@ -3,17 +3,20 @@ From: Jeremy Puhlman <jpuhlman@mvista.com> | |||
3 | Date: Mon, 9 Mar 2020 21:10:35 +0000 | 3 | Date: Mon, 9 Mar 2020 21:10:35 +0000 |
4 | Subject: [PATCH] Make manpages multilib identical | 4 | Subject: [PATCH] Make manpages multilib identical |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Submitted [https://review.lttng.org/c/babeltrace/+/14222] |
7 | |||
7 | Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> | 8 | Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> |
9 | Signed-off-by: Bin Lan <bin.lan.cn@windriver.com> | ||
8 | --- | 10 | --- |
9 | doc/man/asciidoc-attrs.conf.in | 4 ++-- | 11 | doc/man/asciidoc-attrs.conf.in | 4 ++-- |
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | 12 | 1 file changed, 2 insertions(+), 2 deletions(-) |
11 | 13 | ||
12 | diff --git a/doc/man/asciidoc-attrs.conf.in b/doc/man/asciidoc-attrs.conf.in | 14 | diff --git a/doc/man/asciidoc-attrs.conf.in b/doc/man/asciidoc-attrs.conf.in |
13 | index ad1183f1..e11c7031 100644 | 15 | index 88fb13ce2..27858b720 100644 |
14 | --- a/doc/man/asciidoc-attrs.conf.in | 16 | --- a/doc/man/asciidoc-attrs.conf.in |
15 | +++ b/doc/man/asciidoc-attrs.conf.in | 17 | +++ b/doc/man/asciidoc-attrs.conf.in |
16 | @@ -1,7 +1,7 @@ | 18 | @@ -4,8 +4,8 @@ |
19 | |||
17 | [attributes] | 20 | [attributes] |
18 | # default values | 21 | # default values |
19 | -system_plugin_path="@LIBDIR@/babeltrace2/plugins" | 22 | -system_plugin_path="@LIBDIR@/babeltrace2/plugins" |
@@ -24,5 +27,4 @@ index ad1183f1..e11c7031 100644 | |||
24 | enable_debug_info="@ENABLE_DEBUG_INFO_VAL@" | 27 | enable_debug_info="@ENABLE_DEBUG_INFO_VAL@" |
25 | defrdport=5344 | 28 | defrdport=5344 |
26 | -- | 29 | -- |
27 | 2.24.1 | 30 | 2.34.1 |
28 | |||
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-tests-do-not-run-test-applications-from-.libs.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-tests-do-not-run-test-applications-from-.libs.patch deleted file mode 100644 index 805dde8064..0000000000 --- a/meta/recipes-kernel/lttng/babeltrace2/0001-tests-do-not-run-test-applications-from-.libs.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 582713cc9a013481eeef253195d644020f637ec4 Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <582713cc9a013481eeef253195d644020f637ec4.1583403622.git.wallinux@gmail.com> | ||
3 | From: Anders Wallin <wallinux@gmail.com> | ||
4 | Date: Thu, 5 Mar 2020 11:20:04 +0100 | ||
5 | Subject: [PATCH] tests: do not run test applications from .libs | ||
6 | |||
7 | Cross compile specific change | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | |||
11 | Signed-off-by: Anders Wallin <wallinux@gmail.com> | ||
12 | --- | ||
13 | tests/lib/test_plugin | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/tests/lib/test_plugin b/tests/lib/test_plugin | ||
17 | index 652c90cc..1f817c50 100755 | ||
18 | --- a/tests/lib/test_plugin | ||
19 | +++ b/tests/lib/test_plugin | ||
20 | @@ -26,4 +26,4 @@ fi | ||
21 | # shellcheck source=../utils/utils.sh | ||
22 | source "$UTILSSH" | ||
23 | |||
24 | -"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins/.libs" | ||
25 | +"${BT_TESTS_BUILDDIR}/lib/plugin" "${BT_TESTS_BUILDDIR}/lib/test-plugin-plugins" | ||
26 | -- | ||
27 | 2.25.1 | ||
28 | |||
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-tests-fix-test-applications-in-cpp-common.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-tests-fix-test-applications-in-cpp-common.patch new file mode 100644 index 0000000000..87f94fb087 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace2/0001-tests-fix-test-applications-in-cpp-common.patch | |||
@@ -0,0 +1,129 @@ | |||
1 | From 1dc81f272855d94e6a78f7d10ea952745d991aa9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bin Lan <bin.lan.cn@windriver.com> | ||
3 | Date: Tue, 11 Mar 2025 17:19:11 +0800 | ||
4 | Subject: [PATCH] Tests: fix test applications in cpp-common are needed to | ||
5 | re-build | ||
6 | |||
7 | Test applications in cpp-common directory are needed to re-build when | ||
8 | calling make check in embedded system. The following error is shown | ||
9 | when running test applications: | ||
10 | make[3]: *** No rule to make target 'cpp-common/test-c-string-view.cpp', | ||
11 | needed by 'cpp-common/test-c-string-view.o'. | ||
12 | make[3]: *** No rule to make target '../tests/utils/tap/libtap.la', | ||
13 | needed by 'cpp-common/test-c-string-view'. | ||
14 | make[3]: *** No rule to make target '../src/common/libcommon.la', | ||
15 | needed by 'cpp-common/test-c-string-view'. | ||
16 | make[3]: *** No rule to make target '../src/logging/liblogging.la', | ||
17 | needed by 'cpp-common/test-c-string-view'. | ||
18 | ... | ||
19 | make[2]: *** [Makefile:1274: check-TESTS] Error 2 | ||
20 | make[1]: *** [Makefile:1805: check-am] Error 2 | ||
21 | make: *** [Makefile:1033: check-recursive] Error 1 | ||
22 | make: Target 'check' not remade because of errors. | ||
23 | |||
24 | Create some new shell scripts which are used to call test applications | ||
25 | in cpp-common directory. Then these test applications can run without | ||
26 | actually examining the source code. | ||
27 | |||
28 | Upstream-Status: Submitted [https://review.lttng.org/c/babeltrace/+/14213] | ||
29 | |||
30 | Signed-off-by: Bin Lan <bin.lan.cn@windriver.com> | ||
31 | --- | ||
32 | tests/Makefile.am | 6 +++--- | ||
33 | tests/cpp-common/test-c-string-view.sh | 17 +++++++++++++++++ | ||
34 | tests/cpp-common/test-unicode-conv.sh | 17 +++++++++++++++++ | ||
35 | tests/cpp-common/test-uuid.sh | 17 +++++++++++++++++ | ||
36 | 4 files changed, 54 insertions(+), 3 deletions(-) | ||
37 | create mode 100755 tests/cpp-common/test-c-string-view.sh | ||
38 | create mode 100755 tests/cpp-common/test-unicode-conv.sh | ||
39 | create mode 100755 tests/cpp-common/test-uuid.sh | ||
40 | |||
41 | diff --git a/tests/Makefile.am b/tests/Makefile.am | ||
42 | index 2a4022bc4..c79b77b32 100644 | ||
43 | --- a/tests/Makefile.am | ||
44 | +++ b/tests/Makefile.am | ||
45 | @@ -129,9 +129,9 @@ cpp_common_test_unicode_conv_LDADD = \ | ||
46 | $(COMMON_TEST_LDADD) | ||
47 | |||
48 | TESTS_CPP_COMMON = \ | ||
49 | - cpp-common/test-c-string-view \ | ||
50 | - cpp-common/test-uuid \ | ||
51 | - cpp-common/test-unicode-conv | ||
52 | + cpp-common/test-c-string-view.sh \ | ||
53 | + cpp-common/test-uuid.sh \ | ||
54 | + cpp-common/test-unicode-conv.sh | ||
55 | |||
56 | TESTS_LIB = \ | ||
57 | lib/test-bt-uuid \ | ||
58 | diff --git a/tests/cpp-common/test-c-string-view.sh b/tests/cpp-common/test-c-string-view.sh | ||
59 | new file mode 100755 | ||
60 | index 000000000..9c2ca5818 | ||
61 | --- /dev/null | ||
62 | +++ b/tests/cpp-common/test-c-string-view.sh | ||
63 | @@ -0,0 +1,17 @@ | ||
64 | +#!/bin/bash | ||
65 | +# | ||
66 | +# SPDX-License-Identifier: GPL-2.0-only | ||
67 | +# | ||
68 | +# Copyright (C) 2025 Bin Lan <bin.lan.cn@windriver.com> | ||
69 | +# | ||
70 | + | ||
71 | +if [ -n "${BT_TESTS_SRCDIR:-}" ]; then | ||
72 | + UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh" | ||
73 | +else | ||
74 | + UTILSSH="$(dirname "$0")/../utils/utils.sh" | ||
75 | +fi | ||
76 | + | ||
77 | +# shellcheck source=../utils/utils.sh | ||
78 | +source "$UTILSSH" | ||
79 | + | ||
80 | +"${BT_TESTS_BUILDDIR}/cpp-common/test-c-string-view" "$BT_TESTS_BT2_BIN" | ||
81 | diff --git a/tests/cpp-common/test-unicode-conv.sh b/tests/cpp-common/test-unicode-conv.sh | ||
82 | new file mode 100755 | ||
83 | index 000000000..df490b2eb | ||
84 | --- /dev/null | ||
85 | +++ b/tests/cpp-common/test-unicode-conv.sh | ||
86 | @@ -0,0 +1,17 @@ | ||
87 | +#!/bin/bash | ||
88 | +# | ||
89 | +# SPDX-License-Identifier: GPL-2.0-only | ||
90 | +# | ||
91 | +# Copyright (C) 2025 Bin Lan <bin.lan.cn@windriver.com> | ||
92 | +# | ||
93 | + | ||
94 | +if [ -n "${BT_TESTS_SRCDIR:-}" ]; then | ||
95 | + UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh" | ||
96 | +else | ||
97 | + UTILSSH="$(dirname "$0")/../utils/utils.sh" | ||
98 | +fi | ||
99 | + | ||
100 | +# shellcheck source=../utils/utils.sh | ||
101 | +source "$UTILSSH" | ||
102 | + | ||
103 | +"${BT_TESTS_BUILDDIR}/cpp-common/test-unicode-conv" "$BT_TESTS_BT2_BIN" | ||
104 | diff --git a/tests/cpp-common/test-uuid.sh b/tests/cpp-common/test-uuid.sh | ||
105 | new file mode 100755 | ||
106 | index 000000000..8c65daa94 | ||
107 | --- /dev/null | ||
108 | +++ b/tests/cpp-common/test-uuid.sh | ||
109 | @@ -0,0 +1,17 @@ | ||
110 | +#!/bin/bash | ||
111 | +# | ||
112 | +# SPDX-License-Identifier: GPL-2.0-only | ||
113 | +# | ||
114 | +# Copyright (C) 2025 Bin Lan <bin.lan.cn@windriver.com> | ||
115 | +# | ||
116 | + | ||
117 | +if [ -n "${BT_TESTS_SRCDIR:-}" ]; then | ||
118 | + UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh" | ||
119 | +else | ||
120 | + UTILSSH="$(dirname "$0")/../utils/utils.sh" | ||
121 | +fi | ||
122 | + | ||
123 | +# shellcheck source=../utils/utils.sh | ||
124 | +source "$UTILSSH" | ||
125 | + | ||
126 | +"${BT_TESTS_BUILDDIR}/cpp-common/test-uuid" "$BT_TESTS_BT2_BIN" | ||
127 | -- | ||
128 | 2.34.1 | ||
129 | |||
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-tests-set-the-correct-plugin-directory.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-tests-set-the-correct-plugin-directory.patch new file mode 100644 index 0000000000..7ac7582ad7 --- /dev/null +++ b/meta/recipes-kernel/lttng/babeltrace2/0001-tests-set-the-correct-plugin-directory.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 32494b1726a881883cb6d317ab76d1ec3f1fa740 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bin Lan <bin.lan.cn@windriver.com> | ||
3 | Date: Wed, 5 Mar 2025 10:51:11 +0800 | ||
4 | Subject: [PATCH] tests: set the correct directory of plugin shared library | ||
5 | |||
6 | The plugin shared libraries are put in test-plugins-plugins/.libs when | ||
7 | building in a host. test-plugins-plugins/.libs is not exist when cross | ||
8 | build. The plugin shared libraries are put in test-plugins-plugins | ||
9 | directory when cross build. | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe specific] | ||
12 | |||
13 | Signed-off-by: Bin Lan <bin.lan.cn@windriver.com> | ||
14 | --- | ||
15 | tests/lib/test-plugins.sh | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/tests/lib/test-plugins.sh b/tests/lib/test-plugins.sh | ||
19 | index f83e42baa..939236393 100755 | ||
20 | --- a/tests/lib/test-plugins.sh | ||
21 | +++ b/tests/lib/test-plugins.sh | ||
22 | @@ -14,4 +14,4 @@ fi | ||
23 | # shellcheck source=../utils/utils.sh | ||
24 | source "$UTILSSH" | ||
25 | |||
26 | -"${BT_TESTS_BUILDDIR}/lib/test-plugins" "${BT_TESTS_BUILDDIR}/lib/test-plugins-plugins/.libs" | ||
27 | +"${BT_TESTS_BUILDDIR}/lib/test-plugins" "${BT_TESTS_BUILDDIR}/lib/test-plugins-plugins" | ||
28 | -- | ||
29 | 2.34.1 | ||
30 | |||
diff --git a/meta/recipes-kernel/lttng/babeltrace2/run-ptest b/meta/recipes-kernel/lttng/babeltrace2/run-ptest index 72fe223436..a0bf33b75d 100755 --- a/meta/recipes-kernel/lttng/babeltrace2/run-ptest +++ b/meta/recipes-kernel/lttng/babeltrace2/run-ptest | |||
@@ -4,6 +4,16 @@ | |||
4 | 4 | ||
5 | # Without --ignore-exit, the tap harness causes any FAILs within a | 5 | # Without --ignore-exit, the tap harness causes any FAILs within a |
6 | # test plan to raise ERRORs; this is just noise. | 6 | # test plan to raise ERRORs; this is just noise. |
7 | makeargs="LOG_DRIVER_FLAGS=--ignore-exit abs_top_srcdir=$PWD abs_top_builddir=$PWD GREP=grep SED=sed PYTHON=python3" | 7 | makeargs="LOG_DRIVER_FLAGS=--ignore-exit abs_top_srcdir=$PWD abs_top_builddir=$PWD" |
8 | 8 | ||
9 | exec make -C tests -k -s $makeargs $target 2>/dev/null | 9 | exec 2> error.log |
10 | make -C tests -k -s $makeargs $target | ||
11 | exitcode=$? | ||
12 | if [ -e error.log ]; then | ||
13 | cat error.log | ||
14 | fi | ||
15 | if [ -e tests/test-suite.log ]; then | ||
16 | cat tests/test-suite.log | ||
17 | fi | ||
18 | |||
19 | exit $exitcode | ||