diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-01-28 14:27:48 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-01-28 14:27:48 +0000 |
commit | 7fe8399de97e50f631ce28ceb42515862a927556 (patch) | |
tree | fcf0c8adb2a8ff2af3d5f17813a9b363f118d7f3 /gdb/testsuite/gdb.fortran/vla-value.exp | |
parent | 4a6a1ed4a113d386b131938bbc7d66e7b495e73f (diff) | |
download | binutils-7fe8399de97e50f631ce28ceb42515862a927556.zip binutils-7fe8399de97e50f631ce28ceb42515862a927556.tar.gz binutils-7fe8399de97e50f631ce28ceb42515862a927556.tar.bz2 |
[testsuite] Fix tiemout fail in gdb.fortran/vla-value.exp
In vla.f90, this single line of source is compiled to many instructions,
vla2(:, :, :) = 1311 ! vla2-allocated
it is quite slow (about several minutes in my testing) to step over this
source line without range stepping. This patch is to increase the timeout
value by 15 times, which is a magic number to make sure timeout disappears
in my testing with a slow arm-linux board.
gdb/testsuite:
2016-01-28 Yao Qi <yao.qi@linaro.org>
* gdb.fortran/vla-value.exp: Wrap test with with_timeout_factor.
Diffstat (limited to 'gdb/testsuite/gdb.fortran/vla-value.exp')
-rw-r--r-- | gdb/testsuite/gdb.fortran/vla-value.exp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran/vla-value.exp index 6c6a484..0945181 100644 --- a/gdb/testsuite/gdb.fortran/vla-value.exp +++ b/gdb/testsuite/gdb.fortran/vla-value.exp @@ -43,8 +43,13 @@ gdb_test "print vla1(5,2,18)=1" "no such vector element \\\(vector not allocated # Try to access value in allocated VLA gdb_breakpoint [gdb_get_line_number "vla2-allocated"] gdb_continue_to_breakpoint "vla2-allocated" -gdb_test "next" "\\d+(\\t|\\s)+vla1\\\(3, 6, 9\\\) = 42" \ - "step over value assignment of vla1" +# Many instructions to be executed when step over this line, and it is +# slower in remote debugging. Increase the timeout to avoid timeout +# fail. +with_timeout_factor 15 { + gdb_test "next" "\\d+(\\t|\\s)+vla1\\\(3, 6, 9\\\) = 42" \ + "step over value assignment of vla1" +} gdb_test "print &vla1" \ " = \\\(PTR TO -> \\\( real\\\(kind=4\\\) \\\(10,10,10\\\)\\\)\\\) $hex" \ "print allocated &vla1" @@ -125,7 +130,12 @@ if ![runto MAIN__] then { } gdb_breakpoint [gdb_get_line_number "vla2-allocated"] gdb_continue_to_breakpoint "vla2-allocated" -gdb_test "next" "\\d+.*vla1\\(3, 6, 9\\) = 42" "next (1)" +# Many instructions to be executed when step over this line, and it is +# slower in remote debugging. Increase the timeout to avoid timeout +# fail. +with_timeout_factor 15 { + gdb_test "next" "\\d+.*vla1\\(3, 6, 9\\) = 42" "next (1)" +} gdb_test_no_output "set \$myvar = vla1" "set \$myvar = vla1" gdb_test "print \$myvar" \ |