[testsuite] Fix timeout for gdb.xml/tdesc-reload.exp

Message ID 20210427130159.2560765-1-luis.machado@linaro.org
State New
Headers show
Series
  • [testsuite] Fix timeout for gdb.xml/tdesc-reload.exp
Related show

Commit Message

Mike Frysinger via Gdb-patches April 27, 2021, 1:01 p.m.
For aarch64, the "info all-registers" output is very verbose.  If you run
this test using read1, it will timeout before the command output is done being
read.

Read line-by-line so we don't run into timeouts.

gdb/testsuite/ChangeLog:

YYYY-MM-DD  Luis Machado  <luis.machado@linaro.org>

	* gdb.xml/tdesc-reload.exp: Pass -lbl.
---
 gdb/testsuite/gdb.xml/tdesc-reload.exp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

-- 
2.25.1

Comments

Mike Frysinger via Gdb-patches April 27, 2021, 3:26 p.m. | #1
On 2021-04-27 9:01 a.m., Luis Machado via Gdb-patches wrote:
> For aarch64, the "info all-registers" output is very verbose.  If you run

> this test using read1, it will timeout before the command output is done being

> read.

> 

> Read line-by-line so we don't run into timeouts.

> 

> gdb/testsuite/ChangeLog:

> 

> YYYY-MM-DD  Luis Machado  <luis.machado@linaro.org>

> 

> 	* gdb.xml/tdesc-reload.exp: Pass -lbl.


I haven't tested on aarch64, but I guess you did, so this LGTM.

Simon
Mike Frysinger via Gdb-patches April 27, 2021, 11:44 p.m. | #2
On 4/27/21 12:26 PM, Simon Marchi wrote:
> On 2021-04-27 9:01 a.m., Luis Machado via Gdb-patches wrote:

>> For aarch64, the "info all-registers" output is very verbose.  If you run

>> this test using read1, it will timeout before the command output is done being

>> read.

>>

>> Read line-by-line so we don't run into timeouts.

>>

>> gdb/testsuite/ChangeLog:

>>

>> YYYY-MM-DD  Luis Machado  <luis.machado@linaro.org>

>>

>> 	* gdb.xml/tdesc-reload.exp: Pass -lbl.

> 

> I haven't tested on aarch64, but I guess you did, so this LGTM.

> 

> Simon

> 


Indeed I've been exercising this with aarch64 and x86_64.

Pushed now. Thanks!

Patch

diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp
index bc0f88b7ee3..a3bb2fb166a 100644
--- a/gdb/testsuite/gdb.xml/tdesc-reload.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp
@@ -70,8 +70,11 @@  if ![runto_main] then {
 
 # Run info registers just to check this appears to run fine with the
 # new target description.
-gdb_test "info all-registers" ".*" \
-    "Run info registers"
+gdb_test_multiple "info all-registers" "Run info registers" -lbl {
+    -re -wrap "" {
+	pass $gdb_test_name
+    }
+}
 
 # Write out the current target description.
 gdb_test_no_output "pipe maint print xml-tdesc | cat > $xml_file_3" \