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.000000000 -0500 +++ uftrace-0.9.4/debian/patches/0001-test-Robustify-mcount_wrap_dlopen-test.patch 2021-01-02 18:47:36.000000000 -0500 @@ -0,0 +1,28 @@ +From 6483d9ac46bd6ed65bb4ad7ba5788fbe4533d414 Mon Sep 17 00:00:00 2001 +From: Namhyung Kim <namhy...@gmail.com> +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 <namhy...@gmail.com> +--- + 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.000000000 -0500 +++ uftrace-0.9.4/debian/patches/series 2021-01-02 18:47:36.000000000 -0500 @@ -0,0 +1 @@ +0001-test-Robustify-mcount_wrap_dlopen-test.patch