diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1291,14 +1291,18 @@ return cpuinfo + def isAArch64(self): + """Returns true if the architecture is AArch64.""" + return self.getArchitecture().lower() == "aarch64" + def isAArch64SVE(self): - return "sve" in self.getCPUInfo() + return self.isAArch64() and "sve" in self.getCPUInfo() def isAArch64MTE(self): - return "mte" in self.getCPUInfo() + return self.isAArch64() and "mte" in self.getCPUInfo() def isAArch64PAuth(self): - return "paca" in self.getCPUInfo() + return self.isAArch64() and "paca" in self.getCPUInfo() def getArchitecture(self): """Returns the architecture in effect the test suite is running with.""" diff --git a/lldb/test/API/functionalities/memory/tag/TestMemoryTag.py b/lldb/test/API/functionalities/memory/tag/TestMemoryTag.py --- a/lldb/test/API/functionalities/memory/tag/TestMemoryTag.py +++ b/lldb/test/API/functionalities/memory/tag/TestMemoryTag.py @@ -33,7 +33,7 @@ # If you're on AArch64 you could have MTE but the remote process # must also support it. If you're on any other arhcitecture you # won't have any tagging at all. So the error message is different. - if self.getArchitecture() == "aarch64": + if self.isAArch64(): expected = "error: Process does not support memory tagging" else: expected = "error: This architecture does not support memory tagging" diff --git a/lldb/test/API/functionalities/return-value/TestReturnValue.py b/lldb/test/API/functionalities/return-value/TestReturnValue.py --- a/lldb/test/API/functionalities/return-value/TestReturnValue.py +++ b/lldb/test/API/functionalities/return-value/TestReturnValue.py @@ -15,8 +15,8 @@ mydir = TestBase.compute_mydir(__file__) def affected_by_pr33042(self): - return ("clang" in self.getCompiler() and self.getArchitecture() == - "aarch64" and self.getPlatform() == "linux") + return ("clang" in self.getCompiler() and self.isAArch64() and + self.getPlatform() == "linux") def affected_by_pr44132(self): return (self.getArchitecture() in ["aarch64", "arm"] and diff --git a/lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py b/lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py --- a/lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py +++ b/lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py @@ -64,7 +64,7 @@ self.assertEqual(q_info_reg["format"], xml_info_reg.get("format")) self.assertEqual(q_info_reg["bitsize"], xml_info_reg.get("bitsize")) - if not self.getArchitecture() == 'aarch64': + if not self.isAArch64(): self.assertEqual(q_info_reg["offset"], xml_info_reg.get("offset")) self.assertEqual(q_info_reg["encoding"], xml_info_reg.get("encoding"))