[Lldb-commits] [lldb] r191399 - Changed fuzz tests to not print their values (we only need to test if access to them does not crash).

Richard Mitton richard at codersnotes.com
Wed Sep 25 13:48:03 PDT 2013


Author: rmitton
Date: Wed Sep 25 15:48:03 2013
New Revision: 191399

URL: http://llvm.org/viewvc/llvm-project?rev=191399&view=rev
Log:
Changed fuzz tests to not print their values (we only need to test if access to them does not crash).
This fixes the 'No value' string appearing in the dotest results.

Modified:
    lldb/trunk/test/python_api/default-constructor/sb_breakpoint.py
    lldb/trunk/test/python_api/default-constructor/sb_compileunit.py
    lldb/trunk/test/python_api/default-constructor/sb_debugger.py
    lldb/trunk/test/python_api/default-constructor/sb_instructionlist.py
    lldb/trunk/test/python_api/default-constructor/sb_module.py
    lldb/trunk/test/python_api/default-constructor/sb_process.py
    lldb/trunk/test/python_api/default-constructor/sb_section.py
    lldb/trunk/test/python_api/default-constructor/sb_stringlist.py
    lldb/trunk/test/python_api/default-constructor/sb_target.py
    lldb/trunk/test/python_api/default-constructor/sb_thread.py
    lldb/trunk/test/python_api/default-constructor/sb_type.py
    lldb/trunk/test/python_api/default-constructor/sb_value.py
    lldb/trunk/test/python_api/default-constructor/sb_valuelist.py

Modified: lldb/trunk/test/python_api/default-constructor/sb_breakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_breakpoint.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_breakpoint.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_breakpoint.py Wed Sep 25 15:48:03 2013
@@ -32,4 +32,4 @@ def fuzz_obj(obj):
     obj.GetNumLocations()
     obj.GetDescription(lldb.SBStream())
     for bp_loc in obj:
-        print bp_loc
+        s = str(bp_loc)

Modified: lldb/trunk/test/python_api/default-constructor/sb_compileunit.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_compileunit.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_compileunit.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_compileunit.py Wed Sep 25 15:48:03 2013
@@ -12,4 +12,4 @@ def fuzz_obj(obj):
     obj.FindLineEntryIndex(0, 0xffffffff, None)
     obj.GetDescription(lldb.SBStream())
     for line_entry in obj:
-        print line_entry
+        s = str(line_entry)

Modified: lldb/trunk/test/python_api/default-constructor/sb_debugger.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_debugger.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_debugger.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_debugger.py Wed Sep 25 15:48:03 2013
@@ -56,4 +56,4 @@ def fuzz_obj(obj):
     obj.SetCloseInputOnEOF(False)
     obj.Clear()
     for target in obj:
-        print target
+        s = str(target)

Modified: lldb/trunk/test/python_api/default-constructor/sb_instructionlist.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_instructionlist.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_instructionlist.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_instructionlist.py Wed Sep 25 15:48:03 2013
@@ -14,4 +14,4 @@ def fuzz_obj(obj):
     obj.DumpEmulationForAllInstructions("armv7")
     obj.Clear()
     for inst in obj:
-        print inst
+        s = str(inst)

Modified: lldb/trunk/test/python_api/default-constructor/sb_module.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_module.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_module.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_module.py Wed Sep 25 15:48:03 2013
@@ -19,11 +19,11 @@ def fuzz_obj(obj):
     sc_list = obj.FindFunctions("my_func", lldb.eFunctionNameTypeAny)
     obj.FindGlobalVariables(lldb.SBTarget(), "my_global_var", 1)
     for section in obj.section_iter():
-        print section
+        s = str(section)
     for symbol in obj.symbol_in_section_iter(lldb.SBSection()):
-        print symbol
+        s = str(symbol)
     for symbol in obj:
-        print symbol
+        s = str(symbol)
     obj.GetAddressByteSize()
     obj.GetByteOrder()
     obj.GetTriple()

Modified: lldb/trunk/test/python_api/default-constructor/sb_process.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_process.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_process.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_process.py Wed Sep 25 15:48:03 2013
@@ -46,4 +46,4 @@ def fuzz_obj(obj):
     obj.Clear()
     obj.GetNumSupportedHardwareWatchpoints(error)
     for thread in obj:
-        print thread
+        s = str(thread)

Modified: lldb/trunk/test/python_api/default-constructor/sb_section.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_section.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_section.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_section.py Wed Sep 25 15:48:03 2013
@@ -19,4 +19,4 @@ def fuzz_obj(obj):
     obj.GetSectionType()
     obj.GetDescription(lldb.SBStream())
     for subsec in obj:
-        print subsec
+        s = str(subsec)

Modified: lldb/trunk/test/python_api/default-constructor/sb_stringlist.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_stringlist.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_stringlist.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_stringlist.py Wed Sep 25 15:48:03 2013
@@ -13,5 +13,5 @@ def fuzz_obj(obj):
     obj.GetSize()
     obj.GetStringAtIndex(0xffffffff)
     obj.Clear()
-    for str in obj:
-        print str
+    for n in obj:
+        s = str(n)

Modified: lldb/trunk/test/python_api/default-constructor/sb_target.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_target.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_target.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_target.py Wed Sep 25 15:48:03 2013
@@ -58,8 +58,8 @@ def fuzz_obj(obj):
     obj.GetDescription(lldb.SBStream(), lldb.eDescriptionLevelBrief)
     obj.Clear()
     for module in obj.module_iter():
-        print module
+        s = str(module)
     for bp in obj.breakpoint_iter():
-        print bp
+        s = str(bp)
     for wp in obj.watchpoint_iter():
-        print wp
+        s = str(wp)

Modified: lldb/trunk/test/python_api/default-constructor/sb_thread.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_thread.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_thread.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_thread.py Wed Sep 25 15:48:03 2013
@@ -34,4 +34,4 @@ def fuzz_obj(obj):
     obj.GetDescription(lldb.SBStream())
     obj.Clear()
     for frame in obj:
-        print frame
+        s = str(frame)

Modified: lldb/trunk/test/python_api/default-constructor/sb_type.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_type.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_type.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_type.py Wed Sep 25 15:48:03 2013
@@ -19,4 +19,4 @@ def fuzz_obj(obj):
     obj.IsPointerType(None)
     lldb.SBType.IsPointerType(None)
     for child_type in obj:
-        print child_type
+        s = str(child_type)

Modified: lldb/trunk/test/python_api/default-constructor/sb_value.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_value.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_value.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_value.py Wed Sep 25 15:48:03 2013
@@ -38,7 +38,7 @@ def fuzz_obj(obj):
     obj.Watch(True, True, False, error)
     obj.WatchPointee(True, False, True, error)
     for child_val in obj:
-        print child_val
+        s = str(child_val)
     error = lldb.SBError()
     obj.GetValueAsSigned (error, 0)
     obj.GetValueAsUnsigned (error, 0)

Modified: lldb/trunk/test/python_api/default-constructor/sb_valuelist.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/sb_valuelist.py?rev=191399&r1=191398&r2=191399&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/sb_valuelist.py (original)
+++ lldb/trunk/test/python_api/default-constructor/sb_valuelist.py Wed Sep 25 15:48:03 2013
@@ -11,4 +11,4 @@ def fuzz_obj(obj):
     obj.GetValueAtIndex(100)
     obj.FindValueObjectByUID(200)
     for val in obj:
-        print val
+        s = str(val)





More information about the lldb-commits mailing list