Skip to content

Commit 2a8cece

Browse files
authored
Skip GNU backtrace test on Arm 32-bit (#149493)
1 parent 5784119 commit 2a8cece

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lib/test/test_frame_pointer_unwind.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ def _frame_pointers_expected(machine):
8989
return None
9090

9191

92+
def _is_arm32_build():
93+
if sys.maxsize >= 2**32:
94+
return False
95+
96+
abi = " ".join(
97+
value for value in (
98+
sysconfig.get_config_var("MULTIARCH"),
99+
sysconfig.get_config_var("HOST_GNU_TYPE"),
100+
sysconfig.get_config_var("SOABI"),
101+
)
102+
if value
103+
).lower()
104+
return "arm" in abi
105+
106+
92107
def _build_stack_and_unwind(unwinder):
93108
import operator
94109

@@ -295,6 +310,10 @@ def test_manual_unwind_respects_frame_pointers(self):
295310
@support.requires_gil_enabled("test requires the GIL enabled")
296311
@unittest.skipIf(support.is_wasi, "test not supported on WASI")
297312
@unittest.skipUnless(sys.platform == "linux", "GNU backtrace unwinding test requires Linux")
313+
@unittest.skipIf(
314+
_is_arm32_build(),
315+
"GNU backtrace unwinding skipped on Arm 32-bit",
316+
)
298317
class GnuBacktraceUnwindTests(unittest.TestCase):
299318

300319
def setUp(self):

0 commit comments

Comments
 (0)