def test_memory_tag_read_unsupported(self):
"""Test that "memory tag read" errors on unsupported platforms"""
- if not self.isAArch64MTE():
+ if self.isAArch64MTE():
self.skipTest("Requires a target without AArch64 MTE.")
self.build()
num_expected_locations=1)
self.runCmd("run", RUN_SUCCEEDED)
- self.expect("memory tag read 0 1",
- substrs=["error: This architecture does not support memory tagging"],
- error=True)
+ # 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":
+ expected = "error: Process does not support memory tagging"
+ else:
+ expected = "error: This architecture does not support memory tagging"
+
+ self.expect("memory tag read 0 1", substrs=[expected], error=True)