X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=debug%2Ftestlib.py;h=fb5bee33b1284b36ecafe918821a979ad1cf738c;hb=bd8f01b7942177911208fff916492ad4539638fb;hp=0fe0322726a30ce0216ae81a2951bce4b9115948;hpb=7ba428b5d1d3c6d56a2e534daf7b3983cf3f46bf;p=riscv-tests.git diff --git a/debug/testlib.py b/debug/testlib.py index 0fe0322..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,22 +854,28 @@ 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 BaseTest.classTeardown(self) -class GdbSingleHartTest(GdbTest): - def classSetup(self): - GdbTest.classSetup(self) - + def parkOtherHarts(self): + """Park harts besides the currently selected one in loop_forever().""" for hart in self.target.harts: # Park all harts that we're not using in a safe place. if hart != self.hart: self.gdb.select_hart(hart) self.gdb.p("$pc=loop_forever") + self.gdb.select_hart(self.hart) +class GdbSingleHartTest(GdbTest): + def classSetup(self): + GdbTest.classSetup(self) + self.parkOtherHarts() + class ExamineTarget(GdbTest): def test(self): for hart in self.target.harts: