Bug#966988: uftrace: FTBFS: test failed

2021-01-02 Thread Logan Rosen
Package: uftrace
Version: 0.9.4-0.2
Followup-For: Bug #966988
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch
X-Debbugs-Cc: lo...@ubuntu.com
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/0001-test-Robustify-mcount_wrap_dlopen-test.patch: Import patch from
upstream Git to fix a failing test.

Thanks for considering the patch.

Logan

-- System Information:
Debian Release: bullseye/sid
  APT prefers groovy-updates
  APT policy: (500, 'groovy-updates'), (500, 'groovy-security'), (500, 
'groovy'), (100, 'groovy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.8.0-33-generic (SMP w/8 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru 
uftrace-0.9.4/debian/patches/0001-test-Robustify-mcount_wrap_dlopen-test.patch 
uftrace-0.9.4/debian/patches/0001-test-Robustify-mcount_wrap_dlopen-test.patch
--- 
uftrace-0.9.4/debian/patches/0001-test-Robustify-mcount_wrap_dlopen-test.patch  
1969-12-31 19:00:00.0 -0500
+++ 
uftrace-0.9.4/debian/patches/0001-test-Robustify-mcount_wrap_dlopen-test.patch  
2021-01-02 18:47:36.0 -0500
@@ -0,0 +1,28 @@
+From 6483d9ac46bd6ed65bb4ad7ba5788fbe4533d414 Mon Sep 17 00:00:00 2001
+From: Namhyung Kim 
+Date: Fri, 20 Nov 2020 22:36:03 +0900
+Subject: [PATCH] test: Robustify mcount_wrap_dlopen test
+
+I found that it fails in some environment, which seems to call dlopen
+internally somewhere.  As its purpose is to check whether the hookup
+code is called, we can reset the real_dlopen pointer to NULL and check
+the value after the call.
+
+Signed-off-by: Namhyung Kim 
+---
+ libmcount/wrap.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/libmcount/wrap.c
 b/libmcount/wrap.c
+@@ -535,7 +535,9 @@
+ {
+   void *handle;
+ 
+-  TEST_EQ(real_dlopen, NULL);
++  /* In some environment, dlopen() is called already */
++  if (unlikely(real_dlopen != NULL))
++  real_dlopen = NULL;
+ 
+   handle= dlopen(NULL, RTLD_LAZY);
+ 
diff -Nru uftrace-0.9.4/debian/patches/series 
uftrace-0.9.4/debian/patches/series
--- uftrace-0.9.4/debian/patches/series 1969-12-31 19:00:00.0 -0500
+++ uftrace-0.9.4/debian/patches/series 2021-01-02 18:47:36.0 -0500
@@ -0,0 +1 @@
+0001-test-Robustify-mcount_wrap_dlopen-test.patch


Bug#966988: uftrace: FTBFS: test failed

2020-08-03 Thread Lucas Nussbaum
Source: uftrace
Version: 0.9.4-0.2
Severity: serious
Justification: FTBFS on amd64
Tags: bullseye sid ftbfs
Usertags: ftbfs-20200802 ftbfs-bullseye

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

Relevant part (hopefully):
> make[2]: Entering directory '/<>'
> gcc -o /<>/uftrace.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/uftrace.c
> gcc -o /<>/cmds/dump.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/cmds/dump.c
> gcc -o /<>/cmds/graph.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/cmds/graph.c
> gcc -o /<>/cmds/info.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/cmds/info.c
> gcc -o /<>/cmds/live.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/cmds/live.c
> gcc -o /<>/cmds/record.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/cmds/record.c
> gcc -o /<>/cmds/recv.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/cmds/recv.c
> gcc -o /<>/cmds/replay.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPYTHON2 
> -I/usr/include/python2.7 -DHAVE_PERF_CLOCKID -DHAVE_PERF_CTXSW 
> -DHAVE_LIBNCURSES -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DHAVE_LIBELF 
> -DHAVE_LIBDW -DHAVE_LIBCAPSTONE -I/usr/include/capstone -DUNIT_TEST -include 
> /<>/tests/unittest.h -Wno-sign-compare -pg -g 
> /<>/cmds/replay.c
> gcc -o /<>/cmds/report.ot -c -D_GNU_SOURCE 
> -ffile-prefix-map=/<>=. -Wdate-time -D_FORTIFY_SOURCE=2 -iquote 
> /<> -iquote /<> -iquote 
> /<>/arch/x86_64 -W -Wall -Wno-unused-parameter 
> -Wno-missing-field-initializers -O2 -g -DHAVE_CXA_DEMANGLE -DHAVE_LIBPY