summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/default-constructor/sb_communication.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-06-24 23:16:27 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-06-24 23:16:27 +0000
commit6e3dfa6025c301df749adb1251a9ea592bffb391 (patch)
tree8c9f189eda35d71e6d80f3e5477eb4985c092772 /lldb/test/python_api/default-constructor/sb_communication.py
parent99adfec0b13153d6fbf5fc430423633c08a791e5 (diff)
downloadbcm5719-llvm-6e3dfa6025c301df749adb1251a9ea592bffb391.tar.gz
bcm5719-llvm-6e3dfa6025c301df749adb1251a9ea592bffb391.zip
Add fuzz calls for SBCommunication.
llvm-svn: 133839
Diffstat (limited to 'lldb/test/python_api/default-constructor/sb_communication.py')
-rw-r--r--lldb/test/python_api/default-constructor/sb_communication.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/test/python_api/default-constructor/sb_communication.py b/lldb/test/python_api/default-constructor/sb_communication.py
new file mode 100644
index 00000000000..fef3eabd909
--- /dev/null
+++ b/lldb/test/python_api/default-constructor/sb_communication.py
@@ -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)
OpenPOWER on IntegriCloud