[Lldb-commits] [lldb] 4a95861 - [lldb] [test] Avoid relying on signos in other fork tests
Michał Górny via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 29 08:48:52 PDT 2022
Author: Michał Górny
Date: 2022-06-29T17:48:36+02:00
New Revision: 4a95861d7394da7e7f33ff325c3b28159cb6aa77
URL: https://github.com/llvm/llvm-project/commit/4a95861d7394da7e7f33ff325c3b28159cb6aa77
DIFF: https://github.com/llvm/llvm-project/commit/4a95861d7394da7e7f33ff325c3b28159cb6aa77.diff
LOG: [lldb] [test] Avoid relying on signos in other fork tests
Sponsored by: The FreeBSD Foundation
Added:
Modified:
lldb/packages/Python/lldbsuite/test/tools/lldb-server/fork_testbase.py
lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/fork_testbase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/fork_testbase.py
index bd9c3843ddfe..1a3cc4a0350f 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/fork_testbase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/fork_testbase.py
@@ -2,9 +2,10 @@
class GdbRemoteForkTestBase(gdbremote_testcase.GdbRemoteTestCaseBase):
- fork_regex = ("[$]T05thread:p([0-9a-f]+)[.]([0-9a-f]+);.*"
+ fork_regex = ("[$]T[0-9a-fA-F]{{2}}thread:p([0-9a-f]+)[.]([0-9a-f]+);.*"
"{}:p([0-9a-f]+)[.]([0-9a-f]+).*")
- fork_regex_nonstop = ("%Stop:T05thread:p([0-9a-f]+)[.]([0-9a-f]+);.*"
+ fork_regex_nonstop = ("%Stop:T[0-9a-fA-F]{{2}}"
+ "thread:p([0-9a-f]+)[.]([0-9a-f]+);.*"
"{}:p([0-9a-f]+)[.]([0-9a-f]+).*")
fork_capture = {1: "parent_pid", 2: "parent_tid",
3: "child_pid", 4: "child_tid"}
diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
index 3b0338075a05..0c169de3f4d0 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
@@ -38,8 +38,8 @@ def test_vfork(self):
self.test_sequence.add_log_lines([
"read packet: $c#00",
{"direction": "send",
- "regex": r"[$]T05thread:p{}[.]{}.*vforkdone.*".format(parent_pid,
- parent_tid),
+ "regex": r"[$]T[0-9a-fA-F]{{2}}thread:p{}[.]{}.*vforkdone.*"
+ .format(parent_pid, parent_tid),
},
"read packet: $c#00",
"send packet: $W00;process:{}#00".format(parent_pid),
diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
index 5b1a35408d3e..764f238a51ee 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
@@ -15,8 +15,8 @@ def test_vfork_nonstop(self):
"read packet: $c#00",
"send packet: $OK#00",
{"direction": "send",
- "regex": r"%Stop:T05thread:p{}[.]{}.*vforkdone.*".format(
- parent_pid, parent_tid),
+ "regex": r"%Stop:T[0-9a-fA-F]{{2}}thread:p{}[.]{}.*vforkdone.*"
+ .format(parent_pid, parent_tid),
},
"read packet: $vStopped#00",
"send packet: $OK#00",
More information about the lldb-commits
mailing list