diff --git a/backport-Redirect-stder-in-gdb-add-index.sh-test.patch b/backport-Redirect-stder-in-gdb-add-index.sh-test.patch new file mode 100644 index 0000000..4610c59 --- /dev/null +++ b/backport-Redirect-stder-in-gdb-add-index.sh-test.patch @@ -0,0 +1,31 @@ +From d03a041790e1d0ecb900ec1de57580bca9519daa Mon Sep 17 00:00:00 2001 +From: Mark Wielaard +Date: Sat, 2 Jul 2022 01:11:00 +0200 +Subject: [PATCH] Redirect stder in gdb-add-index.sh test + +gdb-add-index might produce an error message on stderr when trying to +disable debuginfod support. Any message to stderr makes the testcase +fail. This looks like a gdb bug: +https://sourceware.org/bugzilla/show_bug.cgi?id=29316 +But it is easy to workaround by redirecting stderr to stdout. +--- + testsuite/dwz.tests/gdb-add-index.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/testsuite/dwz.tests/gdb-add-index.sh b/testsuite/dwz.tests/gdb-add-index.sh +index 5a91b23..3095efb 100644 +--- a/testsuite/dwz.tests/gdb-add-index.sh ++++ b/testsuite/dwz.tests/gdb-add-index.sh +@@ -1,6 +1,8 @@ + cp $execs/hello 1 + +-gdb-add-index 1 ++# Redirect gdb-add-index stderr to stdout. ++# https://sourceware.org/bugzilla/show_bug.cgi?id=29316 ++gdb-add-index 1 2>&1 + + readelf -S 1 | grep -q '\.gdb_index' + +-- +2.31.1 + diff --git a/dwz.spec b/dwz.spec index e8fd6b5..fa37896 100644 --- a/dwz.spec +++ b/dwz.spec @@ -1,6 +1,6 @@ Name: dwz Version: 0.14 -Release: 4 +Release: 5 Summary: A DWARF optimization and duplicate removal tool License: GPLv2+ and GPLv3+ URL: https://sourceware.org/dwz/ @@ -8,6 +8,7 @@ Source0:https://sourceware.org/ftp/dwz/releases/%{name}-%{version}.tar.xz BuildRequires:gcc gcc-c++ gdb elfutils-libelf-devel dejagnu Patch1: testsuite-Handle-readelf-following-links-by-default.patch +Patch2: backport-Redirect-stder-in-gdb-add-index.sh-test.patch %description The package contains a program that attempts to optimize DWARF debugging @@ -53,6 +54,9 @@ make check %{_mandir}/man1/dwz* %changelog +* Tue Jan 10 2023 dongyuzhen - 0.14-5 +- fix the testcase fail + * Tue Oct 25 2022 yanglongkang - 0.14-4 - rebuild for next release