Skip to content

Commit b1d8f40

Browse files
committed
Only run the weird new try-to-read-too-much test on Darwin
I'm still getting linux CI bot failures for this test. It's not critical, and it depends on a failure mode that is true on Darwin but I was always gambling that it might fail in the same way on other systems.
1 parent 4a8cc28 commit b1d8f40

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

lldb/test/API/python_api/process/TestProcessAPI.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,21 @@ def test_read_memory(self):
7373
exe=False,
7474
startstr=b'x')
7575

76-
# Try to read an impossibly large amount of memory; swig
77-
# will try to malloc it and fail, we should get an error
78-
# result.
79-
error = lldb.SBError()
80-
bigsize = sys.maxsize - 8;
81-
content = process.ReadMemory(
82-
val.AddressOf().GetValueAsUnsigned(),
83-
bigsize, error)
84-
if error.Success():
85-
self.assertFalse(error.Success(), "SBProcessReadMemory claims to have "
86-
"successfully read 0x%x bytes" % bigsize)
87-
if self.TraceOn():
88-
print("Tried to read 0x%x bytes, got error message: %s" %
89-
(bigsize, error.GetCString()))
76+
if self.platformIsDarwin():
77+
# Try to read an impossibly large amount of memory; swig
78+
# will try to malloc it and fail, we should get an error
79+
# result.
80+
error = lldb.SBError()
81+
bigsize = sys.maxsize - 8;
82+
content = process.ReadMemory(
83+
val.AddressOf().GetValueAsUnsigned(),
84+
bigsize, error)
85+
if error.Success():
86+
self.assertFalse(error.Success(), "SBProcessReadMemory claims to have "
87+
"successfully read 0x%x bytes" % bigsize)
88+
if self.TraceOn():
89+
print("Tried to read 0x%x bytes, got error message: %s" %
90+
(bigsize, error.GetCString()))
9091

9192
# Read (char *)my_char_ptr.
9293
val = frame.FindValue("my_char_ptr", lldb.eValueTypeVariableGlobal)

0 commit comments

Comments
 (0)