diff options
author | Tom de Vries <tdevries@suse.de> | 2021-04-30 11:25:47 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-04-30 11:25:47 +0200 |
commit | 5536f0cc62309de740e678da87c11039dd7bfb35 (patch) | |
tree | 9ecfcc3f6c0b480193284bce3ca2ca95391148f8 /gdb | |
parent | 7f7f284dfeebd16f7f8a08a565cf9837c3322308 (diff) | |
download | gdb-5536f0cc62309de740e678da87c11039dd7bfb35.zip gdb-5536f0cc62309de740e678da87c11039dd7bfb35.tar.gz gdb-5536f0cc62309de740e678da87c11039dd7bfb35.tar.bz2 |
[gdb/testsuite] Make gdb.mi/mi-sym-info.exp more robust against timeouts
Once in a while, I run into this timeout:
...
FAIL: gdb.mi/mi-sym-info.exp: List all variables from debug information \
only (timeout)
...
I can make the timeout reproducible by setting timeout to 8s (instead of the
default 10s) for the duration of that test.
Make the test-case more stable by fixing all timeouts caused by setting
timeout to 5, either by adding with_timeout_factor, or increasing its factor.
Tested on x86_64-linux. Also tested in parallel with stress -c 5, to simulate
a busy system in another way.
gdb/testsuite/ChangeLog:
2021-04-30 Tom de Vries <tdevries@suse.de>
* gdb.mi/mi-sym-info.exp: Add with_timeout_factor, and increase
existing timeout factors.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-sym-info.exp | 70 |
2 files changed, 42 insertions, 33 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 10c7d76..8e021d2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2021-04-30 Tom de Vries <tdevries@suse.de> + * gdb.mi/mi-sym-info.exp: Add with_timeout_factor, and increase + existing timeout factors. + +2021-04-30 Tom de Vries <tdevries@suse.de> + * gdb.mi/mi-sym-info.exp: Remove duplicate test. 2021-04-29 Tom de Vries <tdevries@suse.de> diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp index f7f574a..18f8518 100644 --- a/gdb/testsuite/gdb.mi/mi-sym-info.exp +++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp @@ -55,42 +55,46 @@ set type_syms \ # Fetch all functions, variables and types without any non-debug # symbols. -set testname "List all functions from debug information only" -set cmd "111-symbol-info-functions" -set state 0 -gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { - -re "111\\^done,symbols=\{debug=\\\[${symtab_re}" { - if { $state == 0 } { incr state } - exp_continue - } - -re ",${symtab_re}" { - exp_continue - } - -re "\\\]\}\r\n${mi_gdb_prompt}$" { - if { $state == 1 } { - pass $gdb_test_name - } else { - fail $gdb_test_name +with_timeout_factor 2 { + set testname "List all functions from debug information only" + set cmd "111-symbol-info-functions" + set state 0 + gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { + -re "111\\^done,symbols=\{debug=\\\[${symtab_re}" { + if { $state == 0 } { incr state } + exp_continue + } + -re ",${symtab_re}" { + exp_continue + } + -re "\\\]\}\r\n${mi_gdb_prompt}$" { + if { $state == 1 } { + pass $gdb_test_name + } else { + fail $gdb_test_name + } } } } -set testname "List all variables from debug information only" -set cmd "112-symbol-info-variables" -set state 0 -gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { - -re "112\\^done,symbols=\{debug=\\\[${symtab_re}" { - if { $state == 0 } { incr state } - exp_continue - } - -re ",${symtab_re}" { - exp_continue - } - -re "\\\]\}\r\n${mi_gdb_prompt}$" { - if { $state == 1 } { - pass $gdb_test_name - } else { - fail $gdb_test_name +with_timeout_factor 2 { + set testname "List all variables from debug information only" + set cmd "112-symbol-info-variables" + set state 0 + gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" { + -re "112\\^done,symbols=\{debug=\\\[${symtab_re}" { + if { $state == 0 } { incr state } + exp_continue + } + -re ",${symtab_re}" { + exp_continue + } + -re "\\\]\}\r\n${mi_gdb_prompt}$" { + if { $state == 1 } { + pass $gdb_test_name + } else { + fail $gdb_test_name + } } } } @@ -150,7 +154,7 @@ gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" { } } -with_timeout_factor 2 { +with_timeout_factor 4 { set testname "List all variables" set cmd "115-symbol-info-variables --include-nondebug" set state 0 |