forked from OSchip/llvm-project
parent
99adfec0b1
commit
6e3dfa6025
|
@ -81,6 +81,9 @@ class APIDefaultConstructorTestCase(TestBase):
|
|||
if self.TraceOn():
|
||||
print obj
|
||||
self.assertFalse(obj)
|
||||
# Do fuzz testing on the invalid obj, it should not crash lldb.
|
||||
import sb_communication
|
||||
sb_communication.fuzz_obj(obj)
|
||||
|
||||
@python_api_test
|
||||
def test_SBCompileUnit(self):
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
"""
|
||||
Fuzz tests an object after the default construction to make sure it does not crash lldb.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import lldb
|
||||
|
||||
def fuzz_obj(obj):
|
||||
broadcaster = obj.GetBroadcaster()
|
||||
# Do fuzz testing on the broadcaster obj, it should not crash lldb.
|
||||
import sb_broadcaster
|
||||
sb_broadcaster.fuzz_obj(broadcaster)
|
||||
obj.AdoptFileDesriptor(0, False)
|
||||
obj.AdoptFileDesriptor(1, False)
|
||||
obj.AdoptFileDesriptor(2, False)
|
||||
obj.Connect("file:/tmp/myfile")
|
||||
obj.Disconnect()
|
||||
obj.IsConnected()
|
||||
obj.GetCloseOnEOF()
|
||||
obj.SetCloseOnEOF(True)
|
||||
obj.SetCloseOnEOF(False)
|
||||
#obj.Write(None, sys.maxint, None)
|
||||
#obj.Read(None, sys.maxint, 0xffffffff, None)
|
||||
obj.ReadThreadStart()
|
||||
obj.ReadThreadStop()
|
||||
obj.ReadThreadIsRunning()
|
||||
obj.SetReadThreadBytesReceivedCallback(None, None)
|
Loading…
Reference in New Issue