Skip to content

Commit 2c329bb

Browse files
vogelsgesangadrian-prantl
authored andcommitted
[lldb-dap][test] Fix readMemory test (llvm#109057)
So far, the test case was also testing the offset -1. This test cases failed if the string is immediately at the beginning of the memory region, though, and the offset -1 hence belonged to a different memory region. The fix is rather straightforward: Passing an offset of -1 is not used by any actual clients of lldb-dap, anyway. As such, this commit simply removes the corresponding test case. (cherry picked from commit 620738e)
1 parent 037eab2 commit 2c329bb

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lldb/test/API/tools/lldb-dap/memory/TestDAP_memory.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ def test_memory_refs_set_variable(self):
7474
].keys(),
7575
)
7676

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

110-
# Use a negative offset
111-
mem = self.dap_server.request_readMemory(memref, -1, 6)["body"]
112-
self.assertEqual(b64decode(mem["data"])[1:], b"dead\0")
113-
114106
# Reads of size 0 are successful
115107
# VS Code sends those in order to check if a `memoryReference` can actually be dereferenced.
116108
mem = self.dap_server.request_readMemory(memref, 0, 0)

0 commit comments

Comments
 (0)