[gdb/testsuite] Bail out after 1 timeout in test_complete_prefix_range_re In test_complete_prefix_range_re we stop testing the range after 3 consecutive timeouts. Handle timeouts more rigorously by stopping testing after the first timeout. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-03-19 Tom de Vries * lib/completion-support.exp (test_complete_prefix_range_re): Stop testing after the first timeout. --- gdb/testsuite/lib/completion-support.exp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp index 18eac827f5..2bf3acd1f4 100644 --- a/gdb/testsuite/lib/completion-support.exp +++ b/gdb/testsuite/lib/completion-support.exp @@ -311,20 +311,11 @@ proc test_complete_prefix_range_re {input completion_re start {end -1}} { set end [string length $input] } - set timeouts 0 - set max_timeouts 3 for {set i $start} {$i < $end} {incr i} { set line [string range $input 0 $i] set res [test_gdb_complete_unique_re "$line" $completion_re] if { $res == -1 } { - incr timeouts - } else { - if { $timeouts > 0 } { - set timeouts 0 - } - } - if { $timeouts == $max_timeouts } { - verbose -log "Consecutive timeouts in test_complete_prefix_range_re, giving up" + verbose -log "Timeout in test_complete_prefix_range_re, giving up" break } }