Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: Re-enable unavailable tests, and fix them for github #497

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions debug/gdbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion debug/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading