Files
clang-p2996/lldb/test/API/functionalities/unwind/ehframe/TestEhFrameUnwind.py
Jason Molenda 6d6feaf7e3 [lldb][NFC] update API tests which skip/expect-fail arm
The architectures provided to skipIf / expectedFail are regular
expressions (v. _match_decorator_property() in decorators.py
so on Darwin systems "arm64" would match the skips for "arm" (32-bit
Linux).  Update these to "arm$" to prevent this, and also update
three tests (TestBuiltinFormats.py, TestCrossDSOTailCalls.py,
TestCrossObjectTailCalls.py) that were skipped for arm64 via this
behavior, and need to be skipped or they will fail.

This was moviated by the new TestDynamicValue.py test which has
an expected-fail for arm, but the test was passing on arm64 Darwin
resulting in failure for the CIs.
2025-05-27 18:41:16 -07:00

48 lines
1.5 KiB
Python

"""
Test that we can backtrace correctly from Non ABI functions on the stack
"""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class EHFrameBasedUnwind(TestBase):
@skipUnlessPlatform(["linux"])
@skipIf(archs=["aarch64", "arm$", "i386", "i686"])
def test(self):
"""Test that we can backtrace correctly from Non ABI functions on the stack"""
self.build()
self.setTearDownCleanup()
exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
lldbutil.run_break_set_by_symbol(self, "func")
process = target.LaunchSimple(
["abc", "xyz"], None, self.get_process_working_directory()
)
if not process:
self.fail("SBTarget.Launch() failed")
if process.GetState() != lldb.eStateStopped:
self.fail(
"Process should be in the 'stopped' state, "
"instead the actual state is: '%s'"
% lldbutil.state_type_to_str(process.GetState())
)
stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
self.expect(stacktraces, exe=False, substrs=["(int)argc=3"])
self.runCmd("thread step-inst")
stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
self.expect(stacktraces, exe=False, substrs=["(int)argc=3"])