From e63009ff847638d23dae13dfba1f534ed6ad9473 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 18 Jul 2023 12:55:57 -0700 Subject: [PATCH 1/2] debug: Re-enable unavailable tests. --- debug/gdbserver.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 3b9a661ca..5a2ba2abe 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -1816,10 +1816,9 @@ class UnavailableMultiTest(GdbTest): "-DDEFINE_FREE") def early_applicable(self): - return False # This test fails in github workflows - #return (self.hart.support_cease or - # self.target.support_unavailable_control) \ - # and len(self.target.harts) > 1 + return (self.hart.support_cease or + self.target.support_unavailable_control) \ + and len(self.target.harts) > 1 def setup(self): ProgramTest.setup(self) @@ -1886,9 +1885,8 @@ class UnavailableRunTest(ProgramTest): """Test that we work correctly when the hart we're debugging ceases to respond.""" def early_applicable(self): - return False # This test fails in github workflows - #return self.hart.support_cease or \ - # self.target.support_unavailable_control + return self.hart.support_cease or \ + self.target.support_unavailable_control def test(self): self.gdb.b("main") @@ -1924,8 +1922,7 @@ class UnavailableCycleTest(ProgramTest): """Test that harts can be debugged after becoming temporarily unavailable.""" def early_applicable(self): - return False # This test fails in github workflows - #return self.target.support_unavailable_control + return self.target.support_unavailable_control def test(self): self.gdb.b("main") From 83425c3163dfd5d1a2ecb5b2afc3b3309bfd8762 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Tue, 18 Jul 2023 13:26:07 -0700 Subject: [PATCH 2/2] debug: Tolerate more whitespace from OpenOCD CLI During the github workflow this character is \n, while on my computer it's ' '. I'm sure there's a good reason for that, but it doesn't seem worth figuring out what that reason is. --- debug/testlib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debug/testlib.py b/debug/testlib.py index 63cc49c79..435b41b5a 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -432,7 +432,7 @@ def command(self, cmd): self.command_count += 1 self.process.stdin.write(magic + b"\n") self.process.stdin.flush() - m = self.expect(rb"(.*)^> " + re.escape(magic)) + m = self.expect(rb"(.*)^>\s*" + re.escape(magic)) return m.group(1) def expect(self, regex, message=None):