Skip to content

Fix a few lldb-server tests on Apple Silicon #3924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1535,17 +1535,18 @@ def single_step_only_steps_one_instruction(
# variable value
if re.match("s390x", arch):
expected_step_count = 2
# ARM64 requires "4" instructions: 2 to compute the address (adrp, add),
# one to materialize the constant (mov) and the store
# ARM64 requires "4" instructions: 2 to compute the address (adrp,
# add), one to materialize the constant (mov) and the store. Once
# addresses and constants are materialized, only one instruction is
# needed.
if re.match("arm64", arch):
expected_step_count = 4

self.assertEqual(step_count, expected_step_count)

# ARM64: Once addresses and constants are materialized, only one
# instruction is needed.
if re.match("arm64", arch):
expected_step_count = 1
before_materialization_step_count = 4
after_matrialization_step_count = 1
self.assertIn(step_count, [before_materialization_step_count,
after_matrialization_step_count])
expected_step_count = after_matrialization_step_count
else:
self.assertEqual(step_count, expected_step_count)

# Verify we hit the next state.
args["expected_g_c1"] = "0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def allocate(self, size, permissions):

@skipIf(oslist=no_match(supported_oses))
@skipIf(oslist=["linux"], archs=no_match(supported_linux_archs))
@expectedFailureDarwin(archs=["arm64", "arm64e"]) # Memory cannot be writable and executable
@expectedFailureAll(oslist=["windows"]) # Memory allocated with incorrect permissions
def test_supported(self):
"""Make sure (de)allocation works on platforms where it's supposed to
Expand Down