Prior to this the only check was that we did not print
this message when reading registers that should exist.
I thought there was an indentation bug here so I wrote a test
for it. There is not, but we could do with the coverage anyway.
Differential D145940
[lldb] Add test for unavailable registers DavidSpickett on Mar 13 2023, 7:41 AM. Authored by
Details Prior to this the only check was that we did not print I thought there was an indentation bug here so I wrote a test
Diff Detail
Event Timeline
Comment Actions Seems like most xml-based tests like this are in lldb/test/API/functionalities/gdb_remote_client, is there a reason this is not in that package too? Comment Actions It's not in that dir because it's testing how the register command handles missing registers, rather than how the gdb client does. It assumes that the gdb client is correctly doing its job. And it seemed like the place one would look if you wondered whether there was an existing test. Comment Actions The non XML way to do this is just reading bogus register names (and is already tested). However that's all or nothing so it doesn't prove that when there is a mix of available and unavailable registers the command works correctly. Comment Actions Remove the need for regex, with the tradeoff that you need
|
optional: IIUC, patterns takes a list of patterns which are checked in order, so you could remove extraneous regexes like this one and pass a list instead.