public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Prevent timeout in gdb.ada/float-bits.exp
Date: Fri,  2 Dec 2022 07:56:46 +0000 (GMT)	[thread overview]
Message-ID: <20221202075646.B26D33858D20@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=63dc62b25880d4eeabb9eb3a5d691043b2723dd5

commit 63dc62b25880d4eeabb9eb3a5d691043b2723dd5
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Dec 2 08:56:42 2022 +0100

    [gdb/testsuite] Prevent timeout in gdb.ada/float-bits.exp
    
    Recent commit 32a5aa26256 ("[gdb/testsuite] Fix gdb.ada/float-bits.exp
    for powerpc64le") started using command "maint print architecture", which
    produces ~275 lines.
    
    Rewrite the corresponding gdb_test_multiple to read line-by-line, to prevent
    timeouts on slower test setups.
    
    Note that this doesn't fix a timeout in the test-case on aarch64 due to:
    ...
    gdbarch_dump: read_core_file_mappings = <0x817438>
    (gdb) aarch64_dump_tdep: Lowest pc = 0x0x8000
    ...
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.ada/float-bits.exp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/float-bits.exp b/gdb/testsuite/gdb.ada/float-bits.exp
index 921fe36a4bd..dab16a60286 100644
--- a/gdb/testsuite/gdb.ada/float-bits.exp
+++ b/gdb/testsuite/gdb.ada/float-bits.exp
@@ -75,14 +75,21 @@ set gdb_long_double_size [float_size "16llf#0#" ]
 
 # Get the used long double format.
 set long_double_format ""
-gdb_test_multiple "maint print architecture" "" {
-    -re "\r\ngdbarch_dump: long_double_format = (\[^\r\n\]*)" {
+set cmd "maint print architecture"
+gdb_test_multiple $cmd  "" {
+    -re "^[string_to_regexp $cmd](?=\r\n)" {
+	exp_continue
+    }
+    -re "^\r\ngdbarch_dump: long_double_format = (\[^\r\n\]*)(?=\r\n)" {
 	set long_double_format $expect_out(1,string)
 	exp_continue
     }
-    -re -wrap "" {
+    -re "^\r\n$gdb_prompt $" {
 	pass $gdb_test_name
     }
+    -re "^\r\n(\[^\r\n\]*)(?=\r\n)" {
+	exp_continue
+    }
 }
 
 # Set default values for 128-bit IEEE quad long doubles.

                 reply	other threads:[~2022-12-02  7:56 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=20221202075646.B26D33858D20@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).