SHA256
8
0
forked from pool/gdb
Files
gdb/gdb-testsuite-fix-gdb.ada-scalar_storage.exp-on-s390.patch

74 lines
2.3 KiB
Diff
Raw Permalink Normal View History

- Simplify outdated comment in gdb.spec. - Update to fedora rawhide @ 0481d32. Maintenance script import-fedora.sh: * Skip gdb-fix-bg-execution-repeat.patch. - Add MIT in License tag due to gdbsupport/unordered_dense.h. - Update to fedora rawhide @ 89e3933. Maintenance script import-fedora.sh: * Drop gdb-6.8-bz466901-backtrace-full-prelinked.patch from skip_patches. - Update to fedora rawhide @ 660c52f. Drop patches: * gdb-rhbz1149205-catch-syscall-after-fork-test.patch - Update to fedora rawhide @ 885cdf8. Update patches: * gdb-add-rpm-suggestion-script.patch Drop patches: * fixup-gdb-add-rpm-suggestion-script.patch - Update to fedora rawhide @ 9c718a5. Drop patches: * gdb-6.3-mapping-zero-inode-test.patch - Update to fedora rawhide @ 15778f3. Drop patches: * gdb-archer-next-over-throw-cxx-exec.patch - Update to fedora rawhide @ 152468c. Maintenance script import-fedora.sh: * Rename gdb-6.3-rh-testversion-20041202.patch to gdb-test-show-version.patch in skip_patches. Patches dropped (Renamed to ...): * gdb-add-rpm-suggestion-script.patch Patches added (... this): * gdb-rpm-suggestion-script.patch - Move some patches from "Backport from gdb-patches" to "Backports from master, available in GDB 17". - Add patches (swo#33000): * gdb-tdep-fix-gdb.ada-finish-var-size.exp-on-ppc64le-.patch - Add patches (swo#32409): * gdb-ada-fix-gdb.ada-overloads.exp-on-s390x.patch - Add patches: * gdb-testsuite-make-gdb.reverse-time-reverse.exp-more.patch * gdb-testsuite-fix-gdb.reverse-time-reverse.exp-timeo.patch * gdb-testsuite-handle-asm-frame-in-gdb.python-py-miss.patch * gdb-testsuite-fix-gdb.base-ptype.exp-with-gcc-15.patch * gdb-testsuite-fix-gdb.python-py-objfile.exp-with-gcc.patch * gdb-testsuite-fix-gdb.ada-scalar_storage.exp-on-s390.patch * gdb-testsuite-fix-gdb.base-bp-permanent.exp-with-gcc.patch * gdb-testsuite-don-t-run-to-main-in-gdb.cp-cplusfuncs.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=465
2025-06-05 13:03:19 +00:00
From fb9de096f43a1494d11b8f17779159a96d0a0a63 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Tue, 15 Apr 2025 16:59:32 +0200
Subject: [PATCH 2/2] [gdb/testsuite] Fix gdb.ada/scalar_storage.exp on s390x
On s390x-linux, with test-case gdb.ada/scalar_storage.exp we have:
...
(gdb) print V_LE^M
$1 = (value => 126, another_value => 12, color => 3)^M
(gdb) FAIL: gdb.ada/scalar_storage.exp: print V_LE
print V_BE^M
$2 = (value => 125, another_value => 9, color => green)^M
(gdb) KFAIL: $exp: print V_BE (PRMS: DW_AT_endianity on enum types)
...
The KFAIL is incorrect in the sense that gdb is behaving as expected.
The problem is incorrect debug info, so change this into an xfail.
Furthermore, extend the xfail to cover V_LE.
Tested on s390x-linux and x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
PR testsuite/32875
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32875
---
gdb/testsuite/gdb.ada/scalar_storage.exp | 28 ++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/scalar_storage.exp b/gdb/testsuite/gdb.ada/scalar_storage.exp
index 5dccaef8f14..5a7e0e6191c 100644
--- a/gdb/testsuite/gdb.ada/scalar_storage.exp
+++ b/gdb/testsuite/gdb.ada/scalar_storage.exp
@@ -33,10 +33,30 @@ if {![runto "storage.adb:$bp_location"]} {
return
}
-gdb_test "print V_LE" "= \\(value => 126, another_value => 12, color => green\\)"
+set re "value => 126, another_value => 12, color => green"
# This requires a compiler fix that is in GCC 14.
-if { ![gnatmake_version_at_least 14] } {
- setup_kfail "DW_AT_endianity on enum types" *-*-*
+set have_xfail [expr ![gnatmake_version_at_least 14]]
+set re_color "(red|green|blue|$decimal)"
+set re_xfail \
+ "value => $decimal, another_value => $decimal, color => $re_color"
+
+set re_pre [string_to_regexp " = ("]
+set re_post [string_to_regexp ")"]
+set re $re_pre$re$re_post
+set re_xfail $re_pre$re_xfail$re_post
+
+foreach var { V_LE V_BE } {
+ gdb_test_multiple "print $var" "" {
+ -re -wrap $re {
+ pass $gdb_test_name
+ }
+ -re -wrap $re_xfail {
+ if { $have_xfail } {
+ xfail $gdb_test_name
+ } else {
+ fail $gdb_test_name
+ }
+ }
+ }
}
-gdb_test "print V_BE" "= \\(value => 126, another_value => 12, color => green\\)"
--
2.43.0