[Lldb-commits] [PATCH] D145940: [lldb] Add test for unavailable registers

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 22 02:41:29 PDT 2023


DavidSpickett marked an inline comment as done.
DavidSpickett added inline comments.


================
Comment at: lldb/test/API/commands/register/register/TestRegistersUnavailable.py:43-53
+        self.expect("register read --all", patterns=[
+            "(?sm)^general purpose registers:\n"
+            "^\s+rdx = 0x5555555555555555\n"
+            ".*"
+            "^3 registers were unavailable.\n"
+            "\n"
+            "^supplementary registers:\n"
----------------
rupprecht wrote:
> 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.
That is how substrs work but regex is applied to the full output each time: https://github.com/llvm/llvm-project/blob/56d94a90dbbf1845ec71cd749691c74c1dd8a3ef/lldb/packages/Python/lldbsuite/test/lldbtest.py#L2382

So I will keep this as it is.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145940/new/

https://reviews.llvm.org/D145940



More information about the lldb-commits mailing list