From: mwachs5 Date: Thu, 6 Jul 2017 22:04:27 +0000 (-0700) Subject: debug: Make the 'out of reset' tests actually apply reset X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff_plain;h=0d211cd3885c2b98c4a2cfe01daff80b921e63fb debug: Make the 'out of reset' tests actually apply reset --- diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 37fd698..5ac0153 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -205,6 +205,9 @@ class MemTestBlock(GdbTest): class InstantHaltTest(GdbTest): def test(self): + """Assert that reset is really resetting what it should.""" + self.gdb.command("monitor reset halt") + self.gdb.command("flushregs") assertEqual(self.target.reset_vector, self.gdb.p("$pc")) # mcycle and minstret have no defined reset value. mstatus = self.gdb.p("$mstatus") @@ -215,6 +218,8 @@ class InstantChangePc(GdbTest): def test(self): """Change the PC right as we come out of reset.""" # 0x13 is nop + self.gdb.command("monitor reset halt") + self.gdb.command("flushregs") self.gdb.command("p *((int*) 0x%x)=0x13" % self.target.ram) self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 4)) self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 8))