Skip to content

Commit d4eaa5b

Browse files
authored
Merge pull request #497 from riscv-software-src/unavailable
debug: Re-enable unavailable tests, and fix them for github
2 parents 985acb5 + 83425c3 commit d4eaa5b

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

debug/gdbserver.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,10 +1816,9 @@ class UnavailableMultiTest(GdbTest):
18161816
"-DDEFINE_FREE")
18171817

18181818
def early_applicable(self):
1819-
return False # This test fails in github workflows
1820-
#return (self.hart.support_cease or
1821-
# self.target.support_unavailable_control) \
1822-
# and len(self.target.harts) > 1
1819+
return (self.hart.support_cease or
1820+
self.target.support_unavailable_control) \
1821+
and len(self.target.harts) > 1
18231822

18241823
def setup(self):
18251824
ProgramTest.setup(self)
@@ -1886,9 +1885,8 @@ class UnavailableRunTest(ProgramTest):
18861885
"""Test that we work correctly when the hart we're debugging ceases to
18871886
respond."""
18881887
def early_applicable(self):
1889-
return False # This test fails in github workflows
1890-
#return self.hart.support_cease or \
1891-
# self.target.support_unavailable_control
1888+
return self.hart.support_cease or \
1889+
self.target.support_unavailable_control
18921890

18931891
def test(self):
18941892
self.gdb.b("main")
@@ -1924,8 +1922,7 @@ class UnavailableCycleTest(ProgramTest):
19241922
"""Test that harts can be debugged after becoming temporarily
19251923
unavailable."""
19261924
def early_applicable(self):
1927-
return False # This test fails in github workflows
1928-
#return self.target.support_unavailable_control
1925+
return self.target.support_unavailable_control
19291926

19301927
def test(self):
19311928
self.gdb.b("main")

debug/testlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def command(self, cmd):
432432
self.command_count += 1
433433
self.process.stdin.write(magic + b"\n")
434434
self.process.stdin.flush()
435-
m = self.expect(rb"(.*)^> " + re.escape(magic))
435+
m = self.expect(rb"(.*)^>\s*" + re.escape(magic))
436436
return m.group(1)
437437

438438
def expect(self, regex, message=None):

0 commit comments

Comments
 (0)