Skip to content

Commit

Permalink
[lldb] Fixed the @skipUnlessAArch64MTELinuxCompiler decorator (llvm#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
slydiman authored Nov 8, 2024
1 parent e5c6d1f commit 32c744a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lldb/packages/Python/lldbsuite/test/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,10 @@ def is_toolchain_with_mte():
f.close()

cmd = f"{compiler_path} -x c -o {f.name} -"
if subprocess.run(cmd, input="int main() {}".encode()).returncode != 0:
if (
subprocess.run(cmd, shell=True, input="int main() {}".encode()).returncode
!= 0
):
os.remove(f.name)
# Cannot compile at all, don't skip the test
# so that we report the broken compiler normally.
Expand All @@ -1014,7 +1017,7 @@ def is_toolchain_with_mte():
void* ptr = __arm_mte_create_random_tag((void*)(0), 0);
}"""
cmd = f"{compiler_path} -march=armv8.5-a+memtag -x c -o {f.name} -"
res = subprocess.run(cmd, input=test_src.encode())
res = subprocess.run(cmd, shell=True, input=test_src.encode())
os.remove(f.name)
if res.returncode != 0:
return "Toolchain does not support MTE"
Expand Down

0 comments on commit 32c744a

Please sign in to comment.