Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.ada/big_packed_array.exp xfail for -m32
Date: Mon, 20 Sep 2021 15:08:24 +0200	[thread overview]
Message-ID: <20210920130822.GA23259@delia> (raw)

Hi,

With test-case gdb.ada/big_packed_array.exp and target board unix/-m32 I run
into:
...
(gdb) print bad^M
$2 = (0 => 0 <repeats 24 times>, 160)^M
(gdb) FAIL: gdb.ada/big_packed_array.exp: scenario=minimal: print bad
...

The problem is that while the variable is an array of 196 bits (== 24.5 bytes),
the debug information describes it as 25 unsigned char.  This is PR
gcc/101643, and the test-case contains an xfail for this, which catches only:
...
(gdb) print bad^M
$2 = (0 => 0 <repeats 25 times>)^M
...

Fix this by updating the xfail pattern.

Tested on x86_64-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix gdb.ada/big_packed_array.exp xfail for -m32

---
 gdb/testsuite/gdb.ada/big_packed_array.exp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gdb/testsuite/gdb.ada/big_packed_array.exp b/gdb/testsuite/gdb.ada/big_packed_array.exp
index 32ff0dd3e1c..e62f053166b 100644
--- a/gdb/testsuite/gdb.ada/big_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/big_packed_array.exp
@@ -43,6 +43,7 @@ foreach_with_prefix scenario {all minimal} {
 
     set re "= \\(false <repeats 196 times>\\)"
     set re_xfail "= \\(0 => 0 <repeats 25 times>\\)"
+    set re_xfail2 "= \\(0 => 0 <repeats 24 times>, ($decimal)\\)"
     gdb_test_multiple "print bad" "" {
        -re -wrap $re  {
            pass $gdb_test_name
@@ -54,5 +55,14 @@ foreach_with_prefix scenario {all minimal} {
            }
            fail $gdb_test_name
        }
+       -re -wrap $re_xfail2 {
+	   set last $expect_out(1,string)
+           if { $have_xfail && [string is integer $last] \
+		    && [expr ($last & 0xf) == 0] } {
+               # gcc/101643
+               setup_xfail *-*-*
+           }
+           fail $gdb_test_name
+       }
     }
 }

                 reply	other threads:[~2021-09-20 13:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210920130822.GA23259@delia \
    --to=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox