[Lldb-commits] [lldb] [lldb][test][AArch64] Add test for AArch32 compatibility execution (PR #211793)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 24 06:50:51 PDT 2026
================
@@ -0,0 +1,117 @@
+"""
+Test launching AArch32 programs on AArch64.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+import subprocess
+
+
+class AArch64LinuxAArch32Compat(TestBase):
+ NO_DEBUG_INFO_TESTCASE = True
+
+ @skipIfRemote
+ @skipUnlessArch("aarch64")
+ @skipIfLLVMTargetMissing("ARM")
+ @skipUnlessPlatform(["linux"])
+ def test_aarch32_compat(self):
+ self.build()
+ test_program = self.getBuildArtifact("a.out")
+
+ try:
+ process = subprocess.Popen([test_program])
+ except (subprocess.SubprocessError, OSError):
+ self.skipTest("AArch32 programs are not supported.")
+
+ try:
+ # The program is running but might be emulated using binfmt_misc.
+ # If it is, the exe will be the emulator.
+ exe_path = os.readlink(f"/proc/{process.pid}/exe")
----------------
DavidSpickett wrote:
For example when emulating ppc I got:
```
lrwxrwxrwx 1 davspi01 davspi01 0 Jul 24 12:08 exe -> /usr/bin/qemu-ppc64le
```
https://github.com/llvm/llvm-project/pull/211793
More information about the lldb-commits
mailing list