RE: [PATCH] gdb, testsuite, btrace: relax unneeded stepi expected output

Metzger, Markus T via Gdb-patches
2021-04-12T11:09:56Z

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.

Regards,
Markus.

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928