!31 修复部分失败测试用例

From: @tong_1001 
Reviewed-by: @ziyangc 
Signed-off-by: @ziyangc
This commit is contained in:
openeuler-ci-bot 2023-02-21 07:31:36 +00:00 committed by Gitee
commit c95160b80f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 181 additions and 3 deletions

View File

@ -0,0 +1,140 @@
From e8fa8d0ca5349d01cf5505eb0d952ef26c62cc94 Mon Sep 17 00:00:00 2001
From: Stephen Webb <swebb@blackberry.com>
Date: Fri, 21 Oct 2022 15:52:22 -0400
Subject: [PATCH] check-namespace.sh: adjust aarch64 symbols
Some symbols for aarch64 were missing, and some were marked as
extraneous in this ABI checker.
Fixes #389.
---
tests/check-namespace.sh.in | 46 ++++++++++++++++---------------------
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/tests/check-namespace.sh.in b/tests/check-namespace.sh.in
index f99fb59..f9201a2 100644
--- a/tests/check-namespace.sh.in
+++ b/tests/check-namespace.sh.in
@@ -117,7 +117,8 @@ check_local_unw_abi () {
match _U${plat}_flush_cache
match _U${plat}_get_accessors
- match _U${plat}_getcontext
+ match _U${plat}_get_elf_image
+ match _U${plat}_get_exe_image_path
match _U${plat}_regname
match _U${plat}_strerror
@@ -130,68 +131,59 @@ check_local_unw_abi () {
case ${plat} in
arm)
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
+ match _U${plat}_getcontext
match _U${plat}_is_fpreg
match _UL${plat}_search_unwind_table
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
;;
hppa)
+ match _U${plat}_getcontext
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
match _U${plat}_setcontext
;;
ia64)
+ match _U${plat}_getcontext
match _UL${plat}_search_unwind_table
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
;;
x86)
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
+ match _U${plat}_getcontext
match _U${plat}_is_fpreg
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
;;
x86_64)
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
+ match _U${plat}_getcontext
match _U${plat}_is_fpreg
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
match _U${plat}_setcontext
;;
ppc*)
+ match _U${plat}_getcontext
match _U${plat}_get_func_addr
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
match _U${plat}_is_fpreg
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
;;
tilegx)
+ match _U${plat}_getcontext
match _U${plat}_is_fpreg
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
match _UL${plat}_local_addr_space_init
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
match ${plat}_lock
;;
s390x)
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
+ match _U${plat}_getcontext
match _U${plat}_is_fpreg
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
match _U${plat}_setcontext
;;
riscv)
- match _U${plat}_get_elf_image
- match _U${plat}_get_exe_image_path
+ match _U${plat}_getcontext
match _U${plat}_is_fpreg
match _UL${plat}_dwarf_search_unwind_table
match _UL${plat}_dwarf_find_unwind_table
@@ -288,15 +280,15 @@ check_generic_unw_abi () {
match _U${plat}_dwarf_search_unwind_table
match _U${plat}_dwarf_find_unwind_table
;;
- tilegx)
- match _U${plat}_dwarf_search_unwind_table
+ tilegx)
+ match _U${plat}_dwarf_search_unwind_table
match _U${plat}_dwarf_find_unwind_table
- match _U${plat}_get_elf_image
+ match _U${plat}_get_elf_image
match _U${plat}_get_exe_image_path
- match _U${plat}_is_fpreg
- match _U${plat}_local_addr_space_init
- match ${plat}_lock
- ;;
+ match _U${plat}_is_fpreg
+ match _U${plat}_local_addr_space_init
+ match ${plat}_lock
+ ;;
s390x)
match _U${plat}_is_fpreg
match _U${plat}_get_elf_image
@@ -315,6 +307,8 @@ check_generic_unw_abi () {
match _U${plat}_is_fpreg
match _U${plat}_dwarf_search_unwind_table
match _U${plat}_dwarf_find_unwind_table
+ match _U${plat}_get_elf_image
+ match _U${plat}_get_exe_image_path
;;
esac
--
2.27.0

View File

@ -0,0 +1,31 @@
From fedff5ac77c945fc0c5df534074163a784bfa5b3 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Wed, 7 Sep 2022 14:01:36 +0200
Subject: [PATCH] tests/run-coredump-unwind: Skip test if no coredump has been
created
In some build environments, coredumps are not created even if the
corresponding ulimit is positive. This change skips the test if
the coredump is missing.
---
tests/run-coredump-unwind | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/run-coredump-unwind b/tests/run-coredump-unwind
index 8d07742..0c2b28c 100755
--- a/tests/run-coredump-unwind
+++ b/tests/run-coredump-unwind
@@ -48,6 +48,10 @@ fi
./crasher backing_files
) 2>/dev/null
COREFILE=$TEMPDIR/core*
+if ! test -f "$COREFILE"; then
+ echo "crasher process did not produce coredump, test skipped"
+ exit 77
+fi
# magic option -testcase enables checking for the specific contents of the stack
./test-coredump-unwind $COREFILE -testcase `cat $TEMPDIR/backing_files`
--
2.33.0

View File

@ -1,17 +1,19 @@
Name: libunwind
Epoch: 2
Version: 1.6.2
Release: 3
Release: 4
Summary: Libunwind provides a C ABI to determine the call-chain of a program
License: BSD
URL: http://savannah.nongnu.org/projects/libunwind
Source: http://download-mirror.savannah.gnu.org/releases/libunwind/libunwind-%{version}.tar.gz
Patch0001: 0001-fix-byte_order_is_valid-function-logic.patch
Patch2: backport-check-namespace.sh-adjust-aarch64-symbols.patch
Patch3: backport-tests-run-coredump-unwind-Skip-test-if-no-coredump-h.patch
ExclusiveArch: aarch64 %{ix86} x86_64 riscv64
BuildRequires: automake libtool autoconf texlive-latex2man
BuildRequires: automake libtool autoconf texlive-latex2man gcc-c++
%description
Libunwind defines a portable and efficient C programming interface (API) to
@ -57,7 +59,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libunwind-ptrace*.so*
touch -r NEWS $RPM_BUILD_ROOT%{_includedir}/libunwind.h
%check
#make check may wrong
make check || true
%pre
@ -86,6 +87,12 @@ make check || true
%{_mandir}/*/*
%changelog
* Tue Feb 21 2023 shixuantong <shixuantong1@huawei.com> - 2:1.6.2-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix some test fail
* Fri Dec 16 2022 Bin Hu <hubin73@huawei.com> - 2:1.6.2-3
- Type:bugfix
- ID:NA