diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 1a74a950e..a94e74a6b 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -1110,9 +1110,9 @@ def test(self): self.disable_timer() return - self.disable_timer() assertGreater(interrupt_count, 1000) assertGreater(local, 1000) + self.disable_timer() def postMortem(self): GdbSingleHartTest.postMortem(self) diff --git a/debug/testlib.py b/debug/testlib.py index cf62863cf..ebd7fcc81 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -1508,6 +1508,9 @@ def disable_timer(self, interrupt=False): if interrupt: self.gdb.interrupt() self.gdb.p("$mie=$mie & ~0x80") + self.gdb.p("$mstatus=$mstatus & ~0x8") + self.gdb.p(f"*((long long*) 0x{self.target.clint_addr + 0x4000:x})\ + =0x" + "f" * (self.hart.xlen // 4)) def exit(self, expected_result=10): self.gdb.command("delete")