[PATCH 4/5] gdb/testsuite: change newline patterns used in gdb_test

Simon Marchi simark@simark.ca
Tue May 2 19:16:23 GMT 2023


On 4/28/23 17:50, Andrew Burgess wrote:
> Simon Marchi <simark@simark.ca> writes:
> 
>> On 4/28/23 11:57, Simon Marchi via Gdb-patches wrote:
>>>> I've pushed the patch below which fixes all the regressions I see when
>>>> using the native-gdbserver board.
>>>>
>>>> I'm still testing with the native-extended-gdbserver board, but I'm a
>>>> little short of time, so might not be able to fix any regressions that
>>>> throws up until next week.  So I've pushed this fix for now, and will
>>>> follow up with any additional fixes I find later.
>>>>
>>>> Sorry for causing the regressions.
>>>
>>> Thanks, I'll let you know if there are more remaining failures.
>>>
>>> Simon
>>>
>>
>> I still see these two, which are likely related:
>>
>> FAIL: gdb.trace/collection.exp: collect register locals collectively: run trace experiment: stop trace experiment
> 
> I think we should accept this regression.  Here's the gdb.log output:
> 
>   (gdb) PASS: gdb.trace/collection.exp: collect register locals collectively: run trace experiment: run trace experiment
>   tstop
>   Trace is not running.
>   (gdb) FAIL: gdb.trace/collection.exp: collect register locals collectively: run trace experiment: stop trace experiment
> 
> I changed this test form this:
> 
> 	gdb_test "tstop" \
> 	    "\[\r\n\]+" \
> 	    "stop trace experiment"
> 
> to this:
> 
> 	gdb_test_no_output "tstop" \
> 	    "stop trace experiment"
> 
> The 'Trace is not running.' error is what causes the test to fail.  This
> test has a bunch of other FAILs, one of which is the 'tstart' preceeding
> the above 'tstop':
> 
>   (gdb) PASS: gdb.trace/collection.exp: collect register locals collectively: run trace experiment: advance to begin
>   tstart
>   locf has been optimized out of existence.
>   locd has been optimized out of existence.
>   Expression pieces exceed word size
>   (gdb) FAIL: gdb.trace/collection.exp: collect register locals collectively: run trace experiment: start trace experiment
> 
> So clearly, the test script is expecting the tracing to start, but it
> doesn't.  Catching things like the above -- where we were missing a
> warning/error from GDB was exactly the point of my patch -- so I think
> this additional failure is acceptable.

That makes sense (it would have been obvious if I had looked at it, but
didn't really have time).  I'll add it to my list of expected failures,
since it's just the consequence of an existing failure.

>> FAIL: gdb.trace/pending.exp: ftrace works: stop trace experiment
> 
> I'm not able to reproduce this one.  On my local machine the
> pending_tracepoint_works proc (in pending.exp) exits early as (according
> to the comment) the target was unable to install the fast tracepoint.
> 
> Could you confirm that the 'tstart' test immediately preceding this
> 'tstop' test passes successfully please, it's name will be:
> 
>   gdb.trace/pending.exp: ftrace works: start trace experiment
> 
> If this FAILs then I think, like the one above then it's OK that the
> corresponding tstop also FAILs.  If you are seeing the 'tstart' PASS
> then could you paste in the corresponding gdb.log snippet and I'll see
> if I can spot the problem.

The "start trace experiment" fails too, so it's probably the same thing
as the previous one.

Thanks for looking into it!

Simon


More information about the Gdb-patches mailing list