]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Use default gdb_expect timeout in runto
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Thu, 4 Apr 2024 17:22:22 +0000 (14:22 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Mon, 22 Apr 2024 16:10:33 +0000 (13:10 -0300)
runto uses a hard-coded timeout of 30s in its invocation of gdb_expect.
This is normally fine, but for very a slow system (e.g., an emulator) it
may not be enough time for GDB to reach the intended breakpoint.

gdb_expect can obtain a timeout value from user-configurable variables
when it's not given one explicitly, so use that mechanism instead since
the user will have already adjusted the timeout variable to account for
the slow system.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/lib/gdb.exp

index ddee928d510452417dd41e14738aadba513a222c..cbd37fd3094718a3a90b0af4fc2a3bfad9337982 100644 (file)
@@ -768,7 +768,7 @@ proc runto { linespec args } {
     
     # the "at foo.c:36" output we get with -g.
     # the "in func" output we get without -g.
-    gdb_expect 30 {
+    gdb_expect {
        -re "(?:Break|Temporary break).* at .*:$decimal.*$gdb_prompt $" {
            if { $print_pass } {
                pass $test_name