5.0-2 - Add testsuite fix for GCC 11.2.1

This commit is contained in:
Mark Wielaard 2021-07-30 18:47:17 +02:00 committed by Mark Wielaard
parent 377a654f76
commit 3469cfc027
2 changed files with 86 additions and 2 deletions

View File

@ -0,0 +1,79 @@
From 2e5be3d9b8501c4ca3d01b990191ff79171faf17 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Fri, 30 Jul 2021 18:09:46 +0200
Subject: [PATCH] tests: Handle zero directory entry in .debug_line DWARF5
debugedit.at
We were skipping the zero directory entry, because it was always
the same as the directory entry at position one. But that isn't
true anymore with gcc 11.2.1. There the zero dir entry is unique.
Fix the debugedit.at .debug_line testcases using DWARF5 to also
include dir entry zero.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
tests/debugedit.at | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/tests/debugedit.at b/tests/debugedit.at
index 608b1d0..c73bf82 100644
--- a/tests/debugedit.at
+++ b/tests/debugedit.at
@@ -492,6 +492,7 @@ DEBUGEDIT_SETUP([-gdwarf-5])
AT_DATA([expout],
[foo/bar/baz
+foo/bar/baz/subdir_bar
foo/bar/baz/subdir_headers
])
@@ -500,8 +501,8 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./subdir_bar/bar.o]])
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
AT_CHECK([[
readelf --debug-dump=line foo.o subdir_bar/bar.o baz.o \
- | grep -A5 "The Directory Table" | grep "^ [123]" \
- | cut -f2- -d/ | grep ^foo/ | sort
+ | grep -A6 "The Directory Table" | grep "^ [0123]" \
+ | cut -f2- -d/ | grep ^foo/ | sort | uniq
]],[0],[expout])
AT_CLEANUP
@@ -539,14 +540,15 @@ DEBUGEDIT_SETUP([-gdwarf-5])
AT_DATA([expout],
[foo/bar/baz
+foo/bar/baz/subdir_bar
foo/bar/baz/subdir_headers
])
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
AT_CHECK([[
readelf --debug-dump=line ./foobarbaz.part.o \
- | grep -A5 "The Directory Table" | grep "^ [123]" \
- | cut -f2- -d/ | grep ^foo/ | sort
+ | grep -A6 "The Directory Table" | grep "^ [0123]" \
+ | cut -f2- -d/ | grep ^foo/ | sort | uniq
]],[0],[expout])
AT_CLEANUP
@@ -584,14 +586,15 @@ DEBUGEDIT_SETUP([-gdwarf-5])
AT_DATA([expout],
[foo/bar/baz
+foo/bar/baz/subdir_bar
foo/bar/baz/subdir_headers
])
AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]])
AT_CHECK([[
readelf --debug-dump=line ./foobarbaz.exe \
- | grep -A5 "The Directory Table" | grep "^ [123]" \
- | cut -f2- -d/ | grep ^foo/ | sort
+ | grep -A6 "The Directory Table" | grep "^ [0123]" \
+ | cut -f2- -d/ | grep ^foo/ | sort | uniq
]],[0],[expout])
AT_CLEANUP
--
2.31.1

View File

@ -1,6 +1,6 @@
Name: debugedit
Version: 5.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Tools for debuginfo creation
License: GPLv3+ and GPLv2+ and LGPLv2+
URL: https://sourceware.org/debugedit/
@ -34,6 +34,8 @@ Requires: grep
%global _hardened_build 1
Patch1: 0001-tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch
%description
The debugedit project provides programs and scripts for creating
debuginfo and source file distributions, collect build-ids and rewrite
@ -45,7 +47,7 @@ read and write ELF files, DWARF data and build-ids.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup
%autosetup -p1
%build
%configure
@ -75,6 +77,9 @@ make check %{?_smp_mflags}
%{_mandir}/man1/find-debuginfo.1*
%changelog
* Fri Jul 30 2021 Mark Wielaard <mjw@fedoraproject.org> - 5.0-2
- Add testsuite fix for GCC 11.2.1
* Mon Jul 26 2021 Mark Wielaard <mjw@fedoraproject.org> - 5.0-1
- Upgrade to upstream 5.0 release.