[PATCH][gdb/testsuite] Give up after consecutive timeouts in completion-support.exp

Simon Marchi simark@simark.ca
Tue Mar 17 14:30:11 GMT 2020


On 2020-03-16 1:59 p.m., Tom de Vries wrote:
> Hi,
> 
> When running test-case gdb.linespec/cpcompletion.exp with target board
> unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects, we run into lots of
> timeouts, in particular with this pattern:
> ...
> FAIL: gdb.linespec/cpcompletion.exp: template-ret-type: \
>   cmd complete "b template2_"
> FAIL: gdb.linespec/cpcompletion.exp: template-ret-type: \
>   tab complete "b template2_st" (timeout)
> FAIL: gdb.linespec/cpcompletion.exp: template-ret-type: \
>   cmd complete "b template2_st"
> FAIL: gdb.linespec/cpcompletion.exp: template-ret-type: \
>   tab complete "b template2_str" (timeout)
> FAIL: gdb.linespec/cpcompletion.exp: template-ret-type: \
>   cmd complete "b template2_str"
> FAIL: gdb.linespec/cpcompletion.exp: template-ret-type: \
>   tab complete "b template2_stru" (timeout)
> ...
> 
> Fix this by detecting timeouts in test_complete_prefix_range_re and giving up
> after 3 consecutive timeouts.
> 
> This reduces testing time from ~39m to ~9m.
> 
> Tested on x86_64-linux.
> 
> OK for trunk?
> 
> Thanks,
> - Tom

Hi Tom,

My only question is: why retry when we get a timeout?

If we get a timeout because GDB takes time to respond, then shouldn't the timeout
time be increased?

If we get a timeout because GDB doesn't respond the right thing, then shouldn't
we return immediately to avoid further timeouts, given the test has already failed?

Simon


More information about the Gdb-patches mailing list