[PATCH] gdb, testsuite, btrace: relax unneeded stepi expected output
Luis Machado
luis.machado@linaro.org
Mon Apr 12 11:11:01 GMT 2021
On 4/12/21 8:09 AM, Metzger, Markus T wrote:
> Hello Luis,
>
>>>>> @@ -51,7 +51,7 @@ gdb_target_cmd $gdbserver_protocol
>> $gdbserver_gdbport
>>>>> # Create a record, check, reconnect
>>>>> with_test_prefix "first" {
>>>>> gdb_test_no_output "record btrace" "record btrace enable"
>>>>> - gdb_test "stepi 19" "($hex in .* from .*|$hex\t$decimal.*)"
>>>>> + gdb_test "stepi 19" ".*"
>>>>>
>>>>> gdb_test "info record" [multi_line \
>>>>> "Active record target: .*" \
>>>>>
>>>>
>>>> Investigating some racy tests under make check-read1, isn't there a
>>>> better matching pattern that we can use here to prevent future
>>>> non-determinism?
>>>
>>> The test now ignores all output since it doesn't really matter where we end up
>>> after stepping. This should be the most future-proof pattern. Were you
>> looking
>>> for a less lax pattern?
>>
>> Yeah, I was looking for a more meaningful kind of test other than
>> expecting anything.
>
> The meaningful part is just outside of this hunk:
>
> gdb_test "info record" [multi_line \
> "Active record target: .*" \
> "Recorded 19 instructions in .+ functions \\(. gaps\\) for thread 1 \\(Thread .*\\)."
> ]
>
> We check that we actually stepped exactly those 19 instructions. The test doesn't
> care where this brought us.
Indeed. Thanks for making it clear.
More information about the Gdb-patches
mailing list