From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/babeltrace2: fix tests with uclibc
Date: Sat, 26 Sep 2020 22:18:17 +0200 [thread overview]
Message-ID: <20200926201817.996329-1-fontaine.fabrice@gmail.com> (raw)
It should be noted that upstream does not want to add a --disable-tests
option: https://review.lttng.org/c/babeltrace/+/4075
Fixes:
- http://autobuild.buildroot.org/results/1e50e1ff90c1ac2af2223365dc0cd6e1914bcd75
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...trace_ir_ref.c-rename-user-structure.patch | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 package/babeltrace2/0002-tests-lib-test_trace_ir_ref.c-rename-user-structure.patch
diff --git a/package/babeltrace2/0002-tests-lib-test_trace_ir_ref.c-rename-user-structure.patch b/package/babeltrace2/0002-tests-lib-test_trace_ir_ref.c-rename-user-structure.patch
new file mode 100644
index 0000000000..ac9eee82d8
--- /dev/null
+++ b/package/babeltrace2/0002-tests-lib-test_trace_ir_ref.c-rename-user-structure.patch
@@ -0,0 +1,57 @@
+From 7a27f13c192d15cae47740f3e884bba16f15ed41 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 26 Sep 2020 22:03:10 +0200
+Subject: [PATCH] tests/lib/test_trace_ir_ref.c: rename user structure
+
+Rename user structure to bt_user to avoid the following build failure
+with uclibc:
+
+test_trace_ir_ref.c:41:8: error: redefinition of 'struct user'
+ struct user {
+ ^
+In file included from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/procfs.h:33,
+ from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/ucontext.h:25,
+ from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/signal.h:329,
+ from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/glib-2.0/glib/gbacktrace.h:36,
+ from /home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/glib-2.0/glib.h:34,
+ from ../../src/common/assert.h:28,
+ from ../../src/lib/object.h:28,
+ from test_trace_ir_ref.c:25:
+/home/naourr/work/instance-0/output-1/per-package/babeltrace2/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/sys/user.h:48:8: note: originally defined here
+ struct user
+ ^~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/e4229e2b9c892b419a9d2eaa6929b80ea62dd130
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/efficios/babeltrace/pull/115]
+---
+ tests/lib/test_trace_ir_ref.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/lib/test_trace_ir_ref.c b/tests/lib/test_trace_ir_ref.c
+index d5dfa9cf..70caf29c 100644
+--- a/tests/lib/test_trace_ir_ref.c
++++ b/tests/lib/test_trace_ir_ref.c
+@@ -25,7 +25,7 @@
+
+ #define NR_TESTS 37
+
+-struct user {
++struct bt_user {
+ bt_trace_class *tc;
+ bt_stream_class *sc;
+ bt_event_class *ec;
+@@ -265,7 +265,7 @@ static void test_example_scenario(bt_self_component_source *self_comp)
+ bt_stream_class *weak_sc1 = NULL, *weak_sc2 = NULL;
+ bt_event_class *weak_ec1 = NULL, *weak_ec2 = NULL,
+ *weak_ec3 = NULL;
+- struct user user_a = { 0 }, user_b = { 0 }, user_c = { 0 };
++ struct bt_user user_a = { 0 }, user_b = { 0 }, user_c = { 0 };
+
+ /* The only reference which exists at this point is on TC1. */
+ tc1 = create_tc1(self_comp);
+--
+2.28.0
+
--
2.28.0
next reply other threads:[~2020-09-26 20:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 20:18 Fabrice Fontaine [this message]
2020-09-30 20:57 ` [Buildroot] [PATCH 1/1] package/babeltrace2: fix tests with uclibc Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200926201817.996329-1-fontaine.fabrice@gmail.com \
--to=fontaine.fabrice@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox