forked from OSchip/llvm-project
parent
f4105f5cfe
commit
06657625b8
|
@ -111,6 +111,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_error
|
||||
sb_error.fuzz_obj(obj)
|
||||
|
||||
@python_api_test
|
||||
def test_SBEvent(self):
|
||||
|
|
|
@ -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.GetCString()
|
||||
obj.Fail()
|
||||
obj.Success()
|
||||
obj.GetError()
|
||||
obj.GetType()
|
||||
obj.SetError(5, lldb.eErrorTypeGeneric)
|
||||
obj.SetErrorToErrno()
|
||||
obj.SetErrorToGenericError()
|
||||
obj.SetErrorString("xyz")
|
||||
obj.SetErrorStringWithFormat("%s!", "error")
|
||||
obj.GetDescription(lldb.SBStream())
|
Loading…
Reference in New Issue