aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2022-12-01 10:30:11 -0800
committerGitHub <noreply@github.com>2022-12-01 10:30:11 -0800
commit068241464ee28131a811f70bd2a78e299e60af91 (patch)
tree6889d751e34c36dc45e1081b5d5b53b088da80a0 /debug/testlib.py
parente9ab2e9502894692302d289a950a08cf2c25db68 (diff)
downloadriscv-tests-068241464ee28131a811f70bd2a78e299e60af91.zip
riscv-tests-068241464ee28131a811f70bd2a78e299e60af91.tar.gz
riscv-tests-068241464ee28131a811f70bd2a78e299e60af91.tar.bz2
Share exit() among more tests. (#433)
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 8255384..1559d2c 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -1253,6 +1253,14 @@ class GdbTest(BaseTest):
# PMP registers are optional
pass
+ def exit(self, expected_result=10):
+ self.gdb.command("delete")
+ self.gdb.b("_exit")
+ output = self.gdb.c()
+ assertIn("Breakpoint", output)
+ assertIn("_exit", output)
+ assertEqual(self.gdb.p("status"), expected_result)
+
class GdbSingleHartTest(GdbTest):
def classSetup(self):
GdbTest.classSetup(self)