!36 [sync] PR-33: 回合上游补丁修复可能的测试失败

From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-11-28 06:46:57 +00:00 committed by Gitee
commit afca1b217f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 164 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: debugedit Name: debugedit
Version: 5.0 Version: 5.0
Release: 7 Release: 8
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
Patch6000: backport-Fix-u-option.patch Patch6000: backport-Fix-u-option.patch
Patch9000: add-loongarch-support-for-debugedit.patch Patch9000: add-loongarch-support-for-debugedit.patch
@ -32,6 +33,7 @@ paths in DWARF data for debugging, tracing and profiling.
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1
%patch6000 -p1 %patch6000 -p1
%ifarch loongarch64 %ifarch loongarch64
%patch9000 -p1 %patch9000 -p1
@ -71,6 +73,9 @@ make check %{?_smp_mflags}
%{_rpmconfigdir}/debugedit %{_rpmconfigdir}/debugedit
%changelog %changelog
* Wed Nov 6 2024 laokz <zhangkai@iscas.ac.cn> - 5.0-8
- backport upstream patch to avoid tests failure
* Tue May 28 2024 shaojiansong <shaojiansong@kylinos.cn> - 5.0-7 * Tue May 28 2024 shaojiansong <shaojiansong@kylinos.cn> - 5.0-7
- Fix lack of loongarch64 patch files in src.rpm package which is build from any platform. - Fix lack of loongarch64 patch files in src.rpm package which is build from any platform.

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