!40 [sync] PR-38: [手工同步PR]回合上游补丁修复可能的测试失败

From: @openeuler-sync-bot 
Reviewed-by: @shenyangyang01 
Signed-off-by: @shenyangyang01
This commit is contained in:
openeuler-ci-bot 2024-12-02 08:35:48 +00:00 committed by Gitee
commit 06cb992efa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 163 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: debugedit Name: debugedit
Version: 5.0 Version: 5.0
Release: 6 Release: 7
Summary: Tools for debuginfo creation Summary: Tools for debuginfo creation
License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only License: GPL-2.0-or-later and LGPL-2.1-only and GPL-3.0-only
Group: Applications Group: Applications
@ -19,6 +19,7 @@ Requires: sed dwz grep
Patch0: tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch Patch0: tests-Handle-zero-directory-entry-in-.debug_line-DWA.patch
Patch1: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch Patch1: find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
Patch2: tests-Ignore-stderr-output-of-readelf-in-debugedit.a.patch
Patch1000: add-loongarch-support-not-upstream-modified.patch Patch1000: add-loongarch-support-not-upstream-modified.patch
Patch1001: add-sw_64-support-not-upstream-modified.patch Patch1001: add-sw_64-support-not-upstream-modified.patch
@ -67,6 +68,9 @@ make check %{?_smp_mflags}
%{_rpmconfigdir}/debugedit %{_rpmconfigdir}/debugedit
%changelog %changelog
* Fri Nov 29 2024 laokz <zhangkai@iscas.ac.cn> - 5.0-7
- backport upstream patch to avoid tests failure
* Thu Aug 10 2023 herengui <herengui@kylinsec.com.cn> - 5.0-6 * Thu Aug 10 2023 herengui <herengui@kylinsec.com.cn> - 5.0-6
- Add support for sw_64 and loongarch64 - Add support for sw_64 and loongarch64

View File

@ -0,0 +1,158 @@
From 785f451a1b05f89c3b24eb5550f35488b80152b7 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Wed, 6 Nov 2024 00:28:40 +0100
Subject: [PATCH] tests: Ignore stderr output of readelf in debugedit.at
readelf might produce some warning messages that don't matter for the
specific tests in debugedit.at. So ignore stderr output and just check
stdout output is as expected.
https://sourceware.org/bugzilla/show_bug.cgi?id=31653
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
tests/debugedit.at | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/tests/debugedit.at b/tests/debugedit.at
index 1c59e86..fa38416 100644
--- a/tests/debugedit.at
+++ b/tests/debugedit.at
@@ -308,7 +308,7 @@ AT_CHECK([[
readelf --debug-dump=info foo.o subdir_bar/bar.o baz.o \
| grep -E 'DW_AT_(name|comp_dir)' \
| rev | cut -d: -f1 | rev | cut -c2- | grep ^/foo/bar/baz | sort -u
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -331,7 +331,7 @@ AT_CHECK([[
readelf --debug-dump=info ./foobarbaz.part.o \
| grep -E 'DW_AT_(name|comp_dir)' \
| rev | cut -d: -f1 | rev | cut -c2- | grep ^/foo/bar/baz | sort -u
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -353,7 +353,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]])
AT_CHECK([[
readelf --debug-dump=info ./foobarbaz.exe | grep -E 'DW_AT_(name|comp_dir)' \
| rev | cut -d: -f1 | rev | cut -c2- | grep ^/foo/bar/baz | sort -u
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -390,7 +390,7 @@ for i in ./foo.o ./subdir_bar/bar.o ./baz.o;do \
| sed -n 's/^.*> *DW_AT_name *:.* \(stringp[^ ]*\|st.\)$/\1/p' \
| sort;
done
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -419,7 +419,7 @@ readelf --debug-dump=info ./foobarbaz.part.o \
| awk '/Abbrev Number:.*DW_TAG_type_unit/{p=1}{if(p)print}/^$/{p=0}' \
| sed -n 's/^.*> *DW_AT_name *:.* \(stringp[^ ]*\|st.\)$/\1/p' \
| sort
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -448,7 +448,7 @@ readelf --debug-dump=info ./foobarbaz.exe \
| awk '/Abbrev Number:.*DW_TAG_type_unit/{p=1}{if(p)print}/^$/{p=0}' \
| sed -n 's/^.*> *DW_AT_name *:.* \(stringp[^ ]*\|st.\)$/\1/p' \
| sort
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -477,7 +477,7 @@ AT_CHECK([[
readelf --debug-dump=line foo.o subdir_bar/bar.o baz.o \
| grep -A3 "The Directory Table" | grep "^ [123]" \
| grep /foo/ | cut -c5- | sort
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -504,7 +504,7 @@ AT_CHECK([[
readelf --debug-dump=line foo.o subdir_bar/bar.o baz.o \
| grep -A5 "The Directory Table" | grep "^ [0123]" \
| cut -f2- -d/ | grep ^foo/ | sort -u
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -526,7 +526,7 @@ AT_CHECK([[
readelf --debug-dump=line ./foobarbaz.part.o \
| grep -A3 "The Directory Table" | grep "^ [123]" \
| grep /foo/ | cut -c5- | sort
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -551,7 +551,7 @@ AT_CHECK([[
readelf --debug-dump=line ./foobarbaz.part.o \
| grep -A5 "The Directory Table" | grep "^ [0123]" \
| cut -f2- -d/ | grep ^foo/ | sort -u
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -573,7 +573,7 @@ AT_CHECK([[
readelf --debug-dump=line ./foobarbaz.exe \
| grep -A3 "The Directory Table" | grep "^ [123]" \
| grep /foo/ | cut -c5- | sort
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -598,7 +598,7 @@ AT_CHECK([[
readelf --debug-dump=line ./foobarbaz.exe \
| grep -A5 "The Directory Table" | grep "^ [0123]" \
| cut -f2- -d/ | grep ^foo/ | sort -u
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -623,7 +623,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./baz.o]])
AT_CHECK([[
readelf --debug-dump=macro foo.o subdir_bar/bar.o baz.o \
| grep NUMBER | rev | cut -d: -f1 | rev | cut -c2-
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -646,7 +646,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.part.o]])
AT_CHECK([[
readelf --debug-dump=macro ./foobarbaz.part.o \
| grep NUMBER | rev | cut -d: -f1 | rev | cut -c2-
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
@@ -669,7 +669,7 @@ AT_CHECK([[debugedit -b $(pwd) -d /foo/bar/baz ./foobarbaz.exe]])
AT_CHECK([[
readelf --debug-dump=macro ./foobarbaz.exe \
| grep NUMBER | rev | cut -d: -f1 | rev | cut -c2-
-]],[0],[expout])
+]],[0],[expout],[ignore])
AT_CLEANUP
--
2.39.5