Add fuzz calls for SBInputReader.
llvm-svn: 133972
This commit is contained in:
@@ -161,6 +161,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_inputreader
|
||||
sb_inputreader.fuzz_obj(obj)
|
||||
|
||||
@python_api_test
|
||||
def test_SBInstruction(self):
|
||||
|
||||
13
lldb/test/python_api/default-constructor/sb_inputreader.py
Normal file
13
lldb/test/python_api/default-constructor/sb_inputreader.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""
|
||||
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.Initialize(lldb.SBDebugger.Create(), None, None, 0, "$", "^", True)
|
||||
obj.IsActive()
|
||||
obj.IsDone()
|
||||
obj.SetIsDone(True)
|
||||
obj.GetGranularity()
|
||||
Reference in New Issue
Block a user