Skip to content

[lldb-dap][test] Fix readMemory test #109057

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 1 commit into from
Sep 18, 2024
Merged
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
8 changes: 0 additions & 8 deletions lldb/test/API/tools/lldb-dap/memory/TestDAP_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ def test_memory_refs_set_variable(self):
].keys(),
)

# lldb-dap assumes that all reads will be within the same region. On Windows
# the target string is at the very start of a region so the -1 offset causes
# the read to only read from the previous region and only return 1 byte.
@skipIfWindows
def test_readMemory(self):
"""
Tests the 'readMemory' request
Expand All @@ -104,10 +100,6 @@ def test_readMemory(self):
mem = self.dap_server.request_readMemory(memref, 2, 3)["body"]
self.assertEqual(b64decode(mem["data"]), b"ad\0")

# Use a negative offset
mem = self.dap_server.request_readMemory(memref, -1, 6)["body"]
self.assertEqual(b64decode(mem["data"])[1:], b"dead\0")

# Reads of size 0 are successful
# VS-Code sends those in order to check if a `memoryReference` can actually be dereferenced.
mem = self.dap_server.request_readMemory(memref, 0, 0)
Expand Down
Loading