From: Megan Wachs Date: Mon, 14 May 2018 23:04:10 +0000 (-0700) Subject: Merge remote-tracking branch 'origin/downloadtest' into debug-tests-more-single X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff_plain;h=bd8f01b7942177911208fff916492ad4539638fb;hp=e0ce10a4148d4087e46252584b85b2fff3a0dbd7 Merge remote-tracking branch 'origin/downloadtest' into debug-tests-more-single --- diff --git a/debug/gdbserver.py b/debug/gdbserver.py index dd30a3d..be89d19 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -615,7 +615,7 @@ class MulticoreRunAllHaltOne(GdbTest): time.sleep(1) self.gdb.p("buf", fmt="") -class StepTest(GdbTest): +class StepTest(GdbSingleHartTest): compile_args = ("programs/step.S", ) def setup(self): @@ -634,7 +634,7 @@ class StepTest(GdbTest): pc = self.gdb.p("$pc") assertEqual("%x" % (pc - main_address), "%x" % expected) -class TriggerTest(GdbTest): +class TriggerTest(GdbSingleHartTest): compile_args = ("programs/trigger.S", ) def setup(self): self.gdb.load() @@ -753,7 +753,7 @@ class TriggerDmode(TriggerTest): assertIn("clear_triggers", output) self.check_triggers((1<<6) | (1<<0), 0xfeedac00) -class RegsTest(GdbTest): +class RegsTest(GdbSingleHartTest): compile_args = ("programs/regs.S", ) def setup(self): self.gdb.load() @@ -840,7 +840,7 @@ class DownloadTest(GdbTest): assertEqual(self.gdb.p("status"), self.crc) os.unlink(self.download_c.name) -#class MprvTest(GdbTest): +#class MprvTest(GdbSingleHartTest): # compile_args = ("programs/mprv.S", ) # def setup(self): # self.gdb.load() @@ -853,7 +853,7 @@ class DownloadTest(GdbTest): # output = self.gdb.command("p/x *(int*)(((char*)&data)-0x80000000)") # assertIn("0xbead", output) -class PrivTest(GdbTest): +class PrivTest(GdbSingleHartTest): compile_args = ("programs/priv.S", ) def setup(self): # pylint: disable=attribute-defined-outside-init diff --git a/debug/testlib.py b/debug/testlib.py index 0a6c185..fb5bee3 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -549,6 +549,8 @@ class Gdb(object): output = self.command("load", ops=1000) assert "failed" not in output assert "Transfer rate" in output + output = self.command("compare-sections", ops=1000) + assert "MIS" not in output def b(self, location): output = self.command("b %s" % location, ops=5) @@ -852,6 +854,8 @@ class GdbTest(BaseTest): self.gdb.interrupt() self.gdb.command("disassemble", ops=20) self.gdb.command("info registers all", ops=100) + self.gdb.command("flush regs") + self.gdb.command("info threads", ops=100) def classTeardown(self): del self.gdb @@ -864,6 +868,7 @@ class GdbTest(BaseTest): if hart != self.hart: self.gdb.select_hart(hart) self.gdb.p("$pc=loop_forever") + self.gdb.select_hart(self.hart) class GdbSingleHartTest(GdbTest):