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)
self.gdb.pop_state()
def run_all_tests(module, target, parsed):
- if not os.path.exists(parsed.logs):
+ try:
os.makedirs(parsed.logs)
+ except OSError:
+ # There's a race where multiple instances of the test program might
+ # decide to create the logs directory at the same time.
+ pass
overall_start = time.time()
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: