From a2c476bbc9fde2e661c035cb2c1e460da5bbee49 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 1 Dec 2022 15:28:48 +0100 Subject: [PATCH] [gdb/testsuite] Fix timeout in gdb.ada/float-bits.exp A timeout was reported: ... FAIL: gdb.ada/float-bits.exp: maint print architecture (timeout) ... after recent commit 32a5aa26256 ("[gdb/testsuite] Fix gdb.ada/float-bits.exp for powerpc64le"). Fix this by rewriting the gdb_test_multiple to read line-by-line. Tested on x86_64-linux. --- 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. base-commit: 6ef35c04dffe685ece08212201c4c032baf8aa86 -- 2.35.3