forked from OSchip/llvm-project
parent
46b6646059
commit
3dc26e839c
|
@ -227,6 +227,16 @@ class APIDefaultConstructorTestCase(TestBase):
|
|||
import sb_process
|
||||
sb_process.fuzz_obj(obj)
|
||||
|
||||
@python_api_test
|
||||
def test_SBSection(self):
|
||||
obj = lldb.SBSection()
|
||||
if self.TraceOn():
|
||||
print obj
|
||||
self.assertFalse(obj)
|
||||
# Do fuzz testing on the invalid obj, it should not crash lldb.
|
||||
import sb_section
|
||||
sb_section.fuzz_obj(obj)
|
||||
|
||||
@python_api_test
|
||||
def test_SBStream(self):
|
||||
"""SBStream object is valid after default construction."""
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
"""
|
||||
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.IsValid()
|
||||
obj.GetName()
|
||||
obj.FindSubSection("hello_section_name")
|
||||
obj.GetNumSubSections()
|
||||
obj.GetSubSectionAtIndex(600)
|
||||
obj.GetFileAddress()
|
||||
obj.GetByteSize()
|
||||
obj.GetFileOffset()
|
||||
obj.GetFileByteSize()
|
||||
obj.GetSectionData(1000, 100)
|
||||
obj.GetSectionType()
|
||||
obj.GetDescription(lldb.SBStream())
|
Loading…
Reference in New Issue