diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-06-24 22:53:12 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-06-24 22:53:12 +0000 |
commit | 57e34b21db38423e437e4cc97f56dbc468b583a7 (patch) | |
tree | 0762a27d2ebd0b8d9b18ac8181981bc0763dc7d6 /lldb/test/python_api/default-constructor/sb_broadcaster.py | |
parent | cbdfe811712b258e9d30232fddf43285c142a95c (diff) | |
download | bcm5719-llvm-57e34b21db38423e437e4cc97f56dbc468b583a7.tar.gz bcm5719-llvm-57e34b21db38423e437e4cc97f56dbc468b583a7.zip |
Add fuzz calls for SBBroadcaster.
llvm-svn: 133837
Diffstat (limited to 'lldb/test/python_api/default-constructor/sb_broadcaster.py')
-rw-r--r-- | lldb/test/python_api/default-constructor/sb_broadcaster.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/test/python_api/default-constructor/sb_broadcaster.py b/lldb/test/python_api/default-constructor/sb_broadcaster.py new file mode 100644 index 00000000000..14c7f29e181 --- /dev/null +++ b/lldb/test/python_api/default-constructor/sb_broadcaster.py @@ -0,0 +1,19 @@ +""" +Fuzz tests an object after the default construction to make sure it does not crash lldb. +""" + +import sys +import lldb + +def fuzz_obj(obj): + obj.BroadcastEventByType(lldb.eBreakpointEventTypeInvalidType, True) + obj.BroadcastEvent(lldb.SBEvent(), False) + listener = lldb.SBListener("fuzz_testing") + obj.AddInitialEventsToListener(listener, 0xffffffff) + obj.AddInitialEventsToListener(listener, 0) + obj.AddListener(listener, 0xffffffff) + obj.AddListener(listener, 0) + obj.GetName() + obj.EventTypeHasListeners(0) + obj.RemoveListener(listener, 0xffffffff) + obj.RemoveListener(listener, 0) |