[PATCH] gdb/testsuite: make runto_main not pass no-message to runto

Simon Marchi simark@simark.ca
Tue Dec 7 16:31:15 GMT 2021


On 2021-12-07 4:51 a.m., Tom de Vries via Gdb-patches wrote:
> On 9/30/21 5:52 PM, Simon Marchi via Gdb-patches wrote:
>> From: Simon Marchi <simon.marchi@polymtl.ca>
>>
>> As follow-up to this discussion:
>>
>>   https://sourceware.org/pipermail/gdb-patches/2020-August/171385.html
>>
>> ... make runto_main not pass no-message to runto.  This means that if we
>> fail to run to main, for some reason, we'll emit a FAIL.  This is the
>> behavior we want the majority of (if not all) the time.
>>
>
> I ran test-case gdb.arch/amd64-disp-step-avx.exp with gcc 4.8.5 and
> target board unix/-pie/-fPIE and gdb 11.1, and ran into a reported
> failure to run to main.
>
> I then tried to reproduce with trunk, and saw the failure message
> disappear, while the test-case still failed to run to main.
>
> This patch removes the fail in the test-case, and then does:
> ...
>  proc runto_main { } {
> -    return [runto main no-message qualified]
> +    return [runto main qualified]
>  }
> ...
> but runto sets no-message as default argument, so there's no actual
> change in behaviour for runto.
>
> This fixes it for me:
> ...
> @@ -628,9 +627,6 @@ proc runto { function args } {
>
>      delete_breakpoints
>
> -    # Default to "no-message".
> -    set args "no-message $args"
> -
>      set print_pass 0
>      set print_fail 1
> ...
>
> The submission of the patch introducing the default no-message is here (
>  https://sourceware.org/pipermail/gdb-patches/2012-October/096637.html ).
>
> Thanks,
> - Tom
>

Oh, so you are telling me that my patch did actually hide all failures
to run to main?  Damn :(.

In fact, I don't understand the current code in runto.  I think the
original intention of that code was to not show PASSes but we show
FAILs.  But by adding no-message to args, that defaults to not showing
anything.  And your change seems to change it to its documented /
intended behavior, or am I missing something?

Simon



More information about the Gdb-patches mailing list