Ensure there are no unnamed registers.
[riscv-tests.git] / debug / gdbserver.py
index 3e61449ce8daa9550a127bdb3060fcf27ebb8db0..521fffbf82ec59304f64d5df9fba502a25814f47 100755 (executable)
@@ -396,6 +396,8 @@ class Registers(DebugTest):
             output = self.gdb.command(cmd)
             for reg in ('zero', 'ra', 'sp', 'gp', 'tp'):
                 assertIn(reg, output)
+            for line in output.splitlines():
+                assertRegexpMatches(line, r"^\S")
 
         #TODO
         # mcpuid is one of the few registers that should have the high bit set
@@ -817,7 +819,8 @@ class PrivRw(PrivTest):
         # Disable physical memory protection by allowing U mode access to all
         # memory.
         self.gdb.p("$pmpcfg0=0xf")  # TOR, R, W, X
-        self.gdb.p("$pmpaddr0=0x%x" % ((self.hart.ram + self.hart.ram_size) >> 2))
+        self.gdb.p("$pmpaddr0=0x%x" %
+                ((self.hart.ram + self.hart.ram_size) >> 2))
 
         # Leave the PC at _start, where the first 4 instructions should be
         # legal in any mode.
@@ -869,12 +872,8 @@ def main():
     global parsed   # pylint: disable=global-statement
     parsed = parser.parse_args()
     target = targets.target(parsed)
-
     testlib.print_log_names = parsed.print_log_names
 
-    if parsed.xlen:
-        target.xlen = parsed.xlen
-
     module = sys.modules[__name__]
 
     return testlib.run_all_tests(module, target, parsed)