Skip to content

Commit

Permalink
[lldb] [test] Avoid relying on signos in other fork tests
Browse files Browse the repository at this point in the history
Sponsored by: The FreeBSD Foundation
  • Loading branch information
mgorny committed Jun 29, 2022
1 parent 476f9c9 commit 4a95861
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/API/tools/lldb-server/TestGdbRemoteFork.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/API/tools/lldb-server/TestGdbRemoteForkNonStop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4a95861

Please sign in to comment.