[Lldb-commits] [lldb] r280751 - *** This commit represents a complete reformatting of the LLDB source code

Kate Stone via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 6 13:58:36 PDT 2016


Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test that the Python operating system pl
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class PluginPythonOSPlugin(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -31,9 +32,11 @@ class PluginPythonOSPlugin(TestBase):
         registers = frame.GetRegisters().GetValueAtIndex(0)
         reg_value = thread.GetThreadID() + 1
         for reg in registers:
-            self.assertTrue(reg.GetValueAsUnsigned() == reg_value, "Verify the registers contains the correct value")
+            self.assertTrue(
+                reg.GetValueAsUnsigned() == reg_value,
+                "Verify the registers contains the correct value")
             reg_value = reg_value + 1
-        
+
     def run_python_os_funcionality(self):
         """Test that the Python operating system plugin works correctly"""
 
@@ -47,52 +50,76 @@ class PluginPythonOSPlugin(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        # Set breakpoints inside and outside methods that take pointers to the containing struct.
-        lldbutil.run_break_set_by_source_regexp (self, "// Set breakpoint here")
+        # Set breakpoints inside and outside methods that take pointers to the
+        # containing struct.
+        lldbutil.run_break_set_by_source_regexp(self, "// Set breakpoint here")
 
-        # Register our shared libraries for remote targets so they get automatically uploaded
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
         arguments = None
-        environment = None 
+        environment = None
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (arguments, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            arguments, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
-        # Make sure there are no OS plug-in created thread when we first stop at our breakpoint in main
-        thread = process.GetThreadByID(0x111111111);
-        self.assertFalse (thread.IsValid(), "Make sure there is no thread 0x111111111 before we load the python OS plug-in");
-        thread = process.GetThreadByID(0x222222222);
-        self.assertFalse (thread.IsValid(), "Make sure there is no thread 0x222222222 before we load the python OS plug-in");
-        thread = process.GetThreadByID(0x333333333);
-        self.assertFalse (thread.IsValid(), "Make sure there is no thread 0x333333333 before we load the python OS plug-in");
-
+        # Make sure there are no OS plug-in created thread when we first stop
+        # at our breakpoint in main
+        thread = process.GetThreadByID(0x111111111)
+        self.assertFalse(
+            thread.IsValid(),
+            "Make sure there is no thread 0x111111111 before we load the python OS plug-in")
+        thread = process.GetThreadByID(0x222222222)
+        self.assertFalse(
+            thread.IsValid(),
+            "Make sure there is no thread 0x222222222 before we load the python OS plug-in")
+        thread = process.GetThreadByID(0x333333333)
+        self.assertFalse(
+            thread.IsValid(),
+            "Make sure there is no thread 0x333333333 before we load the python OS plug-in")
 
         # Now load the python OS plug-in which should update the thread list and we should have
-        # OS plug-in created threads with the IDs: 0x111111111, 0x222222222, 0x333333333
+        # OS plug-in created threads with the IDs: 0x111111111, 0x222222222,
+        # 0x333333333
         command = "settings set target.process.python-os-plugin-path '%s'" % python_os_plugin_path
         self.dbg.HandleCommand(command)
 
         # Verify our OS plug-in threads showed up
-        thread = process.GetThreadByID(0x111111111);
-        self.assertTrue (thread.IsValid(), "Make sure there is a thread 0x111111111 after we load the python OS plug-in");
+        thread = process.GetThreadByID(0x111111111)
+        self.assertTrue(
+            thread.IsValid(),
+            "Make sure there is a thread 0x111111111 after we load the python OS plug-in")
         self.verify_os_thread_registers(thread)
-        thread = process.GetThreadByID(0x222222222);
-        self.assertTrue (thread.IsValid(), "Make sure there is a thread 0x222222222 after we load the python OS plug-in");
+        thread = process.GetThreadByID(0x222222222)
+        self.assertTrue(
+            thread.IsValid(),
+            "Make sure there is a thread 0x222222222 after we load the python OS plug-in")
         self.verify_os_thread_registers(thread)
-        thread = process.GetThreadByID(0x333333333);
-        self.assertTrue (thread.IsValid(), "Make sure there is a thread 0x333333333 after we load the python OS plug-in");
+        thread = process.GetThreadByID(0x333333333)
+        self.assertTrue(
+            thread.IsValid(),
+            "Make sure there is a thread 0x333333333 after we load the python OS plug-in")
         self.verify_os_thread_registers(thread)
-        
-        # Now clear the OS plug-in path to make the OS plug-in created threads dissappear
-        self.dbg.HandleCommand("settings clear target.process.python-os-plugin-path")
-        
+
+        # Now clear the OS plug-in path to make the OS plug-in created threads
+        # dissappear
+        self.dbg.HandleCommand(
+            "settings clear target.process.python-os-plugin-path")
+
         # Verify the threads are gone after unloading the python OS plug-in
-        thread = process.GetThreadByID(0x111111111);
-        self.assertFalse (thread.IsValid(), "Make sure there is no thread 0x111111111 after we unload the python OS plug-in");
-        thread = process.GetThreadByID(0x222222222);
-        self.assertFalse (thread.IsValid(), "Make sure there is no thread 0x222222222 after we unload the python OS plug-in");
-        thread = process.GetThreadByID(0x333333333);
-        self.assertFalse (thread.IsValid(), "Make sure there is no thread 0x333333333 after we unload the python OS plug-in");
+        thread = process.GetThreadByID(0x111111111)
+        self.assertFalse(
+            thread.IsValid(),
+            "Make sure there is no thread 0x111111111 after we unload the python OS plug-in")
+        thread = process.GetThreadByID(0x222222222)
+        self.assertFalse(
+            thread.IsValid(),
+            "Make sure there is no thread 0x222222222 after we unload the python OS plug-in")
+        thread = process.GetThreadByID(0x333333333)
+        self.assertFalse(
+            thread.IsValid(),
+            "Make sure there is no thread 0x333333333 after we unload the python OS plug-in")
 
     def run_python_os_step(self):
         """Test that the Python operating system plugin works correctly and allows single stepping of a virtual thread that is backed by a real thread"""
@@ -107,44 +134,64 @@ class PluginPythonOSPlugin(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        # Set breakpoints inside and outside methods that take pointers to the containing struct.
-        lldbutil.run_break_set_by_source_regexp (self, "// Set breakpoint here")
+        # Set breakpoints inside and outside methods that take pointers to the
+        # containing struct.
+        lldbutil.run_break_set_by_source_regexp(self, "// Set breakpoint here")
 
-        # Register our shared libraries for remote targets so they get automatically uploaded
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
         arguments = None
-        environment = None 
+        environment = None
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (arguments, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            arguments, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
-        # Make sure there are no OS plug-in created thread when we first stop at our breakpoint in main
-        thread = process.GetThreadByID(0x111111111);
-        self.assertFalse (thread.IsValid(), "Make sure there is no thread 0x111111111 before we load the python OS plug-in");
-
+        # Make sure there are no OS plug-in created thread when we first stop
+        # at our breakpoint in main
+        thread = process.GetThreadByID(0x111111111)
+        self.assertFalse(
+            thread.IsValid(),
+            "Make sure there is no thread 0x111111111 before we load the python OS plug-in")
 
         # Now load the python OS plug-in which should update the thread list and we should have
-        # OS plug-in created threads with the IDs: 0x111111111, 0x222222222, 0x333333333
+        # OS plug-in created threads with the IDs: 0x111111111, 0x222222222,
+        # 0x333333333
         command = "settings set target.process.python-os-plugin-path '%s'" % python_os_plugin_path
         self.dbg.HandleCommand(command)
 
         # Verify our OS plug-in threads showed up
-        thread = process.GetThreadByID(0x111111111);
-        self.assertTrue (thread.IsValid(), "Make sure there is a thread 0x111111111 after we load the python OS plug-in");
+        thread = process.GetThreadByID(0x111111111)
+        self.assertTrue(
+            thread.IsValid(),
+            "Make sure there is a thread 0x111111111 after we load the python OS plug-in")
 
         frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid(), "Make sure we get a frame from thread 0x111111111")
+        self.assertTrue(
+            frame.IsValid(),
+            "Make sure we get a frame from thread 0x111111111")
         line_entry = frame.GetLineEntry()
 
-        self.assertTrue(line_entry.GetFileSpec().GetFilename() == 'main.c', "Make sure we stopped on line 5 in main.c")
-        self.assertTrue(line_entry.GetLine() == 5, "Make sure we stopped on line 5 in main.c")
+        self.assertTrue(
+            line_entry.GetFileSpec().GetFilename() == 'main.c',
+            "Make sure we stopped on line 5 in main.c")
+        self.assertTrue(
+            line_entry.GetLine() == 5,
+            "Make sure we stopped on line 5 in main.c")
 
-        # Now single step thread 0x111111111 and make sure it does what we need it to
+        # Now single step thread 0x111111111 and make sure it does what we need
+        # it to
         thread.StepOver()
-        
+
         frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid(), "Make sure we get a frame from thread 0x111111111")
+        self.assertTrue(
+            frame.IsValid(),
+            "Make sure we get a frame from thread 0x111111111")
         line_entry = frame.GetLineEntry()
-        
-        self.assertTrue(line_entry.GetFileSpec().GetFilename() == 'main.c', "Make sure we stepped from line 5 to line 6 in main.c")
-        self.assertTrue(line_entry.GetLine() == 6, "Make sure we stepped from line 5 to line 6 in main.c")
+
+        self.assertTrue(
+            line_entry.GetFileSpec().GetFilename() == 'main.c',
+            "Make sure we stepped from line 5 to line 6 in main.c")
+        self.assertTrue(line_entry.GetLine() == 6,
+                        "Make sure we stepped from line 5 to line 6 in main.c")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system.py Tue Sep  6 15:57:50 2016
@@ -3,21 +3,22 @@
 import lldb
 import struct
 
+
 class OperatingSystemPlugIn(object):
     """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
-    
+
     def __init__(self, process):
         '''Initialization needs a valid.SBProcess object.
-        
+
         This plug-in will get created after a live process is valid and has stopped for the
         first time.'''
         self.process = None
         self.registers = None
         self.threads = None
-        if type(process) is lldb.SBProcess and process.IsValid():
+        if isinstance(process, lldb.SBProcess) and process.IsValid():
             self.process = process
-            self.threads = None # Will be an dictionary containing info for each thread
-    
+            self.threads = None  # Will be an dictionary containing info for each thread
+
     def get_target(self):
         # NOTE: Don't use "lldb.target" when trying to get your target as the "lldb.target"
         # tracks the current target in the LLDB command interpreter which isn't the
@@ -26,11 +27,16 @@ class OperatingSystemPlugIn(object):
 
     def create_thread(self, tid, context):
         if tid == 0x444444444:
-            thread_info = { 'tid' : tid, 'name' : 'four'  , 'queue' : 'queue4', 'state' : 'stopped', 'stop_reason' : 'none' }
+            thread_info = {
+                'tid': tid,
+                'name': 'four',
+                'queue': 'queue4',
+                'state': 'stopped',
+                'stop_reason': 'none'}
             self.threads.append(thread_info)
             return thread_info
         return None
-        
+
     def get_thread_info(self):
         if not self.threads:
             # The sample dictionary below shows the values that can be returned for a thread
@@ -48,43 +54,75 @@ class OperatingSystemPlugIn(object):
             #   Specifying this key/value pair for a thread will avoid a call to get_register_data()
             #   and can be used when your registers are in a thread context structure that is contiguous
             #   in memory. Don't specify this if your register layout in memory doesn't match the layout
-            #   described by the dictionary returned from a call to the get_register_info() method.
-            self.threads = [
-                    { 'tid' : 0x111111111, 'name' : 'one'  , 'queue' : 'queue1', 'state' : 'stopped', 'stop_reason' : 'breakpoint'},
-                    { 'tid' : 0x222222222, 'name' : 'two'  , 'queue' : 'queue2', 'state' : 'stopped', 'stop_reason' : 'none'      },
-                    { 'tid' : 0x333333333, 'name' : 'three', 'queue' : 'queue3', 'state' : 'stopped', 'stop_reason' : 'trace'     }
-                ]
+            # described by the dictionary returned from a call to the
+            # get_register_info() method.
+            self.threads = [{'tid': 0x111111111,
+                             'name': 'one',
+                             'queue': 'queue1',
+                             'state': 'stopped',
+                             'stop_reason': 'breakpoint'},
+                            {'tid': 0x222222222,
+                             'name': 'two',
+                             'queue': 'queue2',
+                             'state': 'stopped',
+                             'stop_reason': 'none'},
+                            {'tid': 0x333333333,
+                             'name': 'three',
+                             'queue': 'queue3',
+                             'state': 'stopped',
+                             'stop_reason': 'trace'}]
         return self.threads
-    
+
     def get_register_info(self):
-        if self.registers == None:
-            self.registers = dict()            
+        if self.registers is None:
+            self.registers = dict()
             self.registers['sets'] = ['GPR']
             self.registers['registers'] = [
-                { 'name':'rax'       , 'bitsize' :  64, 'offset' :   0, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 0, 'dwarf' : 0},
-                { 'name':'rbx'       , 'bitsize' :  64, 'offset' :   8, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 3, 'dwarf' : 3},
-                { 'name':'rcx'       , 'bitsize' :  64, 'offset' :  16, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 2, 'dwarf' : 2, 'generic':'arg4', 'alt-name':'arg4', },
-                { 'name':'rdx'       , 'bitsize' :  64, 'offset' :  24, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 1, 'dwarf' : 1, 'generic':'arg3', 'alt-name':'arg3', },
-                { 'name':'rdi'       , 'bitsize' :  64, 'offset' :  32, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 5, 'dwarf' : 5, 'generic':'arg1', 'alt-name':'arg1', },
-                { 'name':'rsi'       , 'bitsize' :  64, 'offset' :  40, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 4, 'dwarf' : 4, 'generic':'arg2', 'alt-name':'arg2', },
-                { 'name':'rbp'       , 'bitsize' :  64, 'offset' :  48, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 6, 'dwarf' : 6, 'generic':'fp'  , 'alt-name':'fp', },
-                { 'name':'rsp'       , 'bitsize' :  64, 'offset' :  56, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 7, 'dwarf' : 7, 'generic':'sp'  , 'alt-name':'sp', },
-                { 'name':'r8'        , 'bitsize' :  64, 'offset' :  64, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 8, 'dwarf' : 8, 'generic':'arg5', 'alt-name':'arg5', },
-                { 'name':'r9'        , 'bitsize' :  64, 'offset' :  72, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 9, 'dwarf' : 9, 'generic':'arg6', 'alt-name':'arg6', },
-                { 'name':'r10'       , 'bitsize' :  64, 'offset' :  80, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 10, 'dwarf' : 10},
-                { 'name':'r11'       , 'bitsize' :  64, 'offset' :  88, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 11, 'dwarf' : 11},
-                { 'name':'r12'       , 'bitsize' :  64, 'offset' :  96, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 12, 'dwarf' : 12},
-                { 'name':'r13'       , 'bitsize' :  64, 'offset' : 104, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 13, 'dwarf' : 13},
-                { 'name':'r14'       , 'bitsize' :  64, 'offset' : 112, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 14, 'dwarf' : 14},
-                { 'name':'r15'       , 'bitsize' :  64, 'offset' : 120, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 15, 'dwarf' : 15},
-                { 'name':'rip'       , 'bitsize' :  64, 'offset' : 128, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 16, 'dwarf' : 16, 'generic':'pc', 'alt-name':'pc' },
-                { 'name':'rflags'    , 'bitsize' :  64, 'offset' : 136, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'generic':'flags', 'alt-name':'flags' },
-                { 'name':'cs'        , 'bitsize' :  64, 'offset' : 144, 'encoding':'uint'  , 'format':'hex'         , 'set': 0                          },
-                { 'name':'fs'        , 'bitsize' :  64, 'offset' : 152, 'encoding':'uint'  , 'format':'hex'         , 'set': 0                          },
-                { 'name':'gs'        , 'bitsize' :  64, 'offset' : 160, 'encoding':'uint'  , 'format':'hex'         , 'set': 0                          },
-                ]
+                {'name': 'rax', 'bitsize': 64, 'offset': 0, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 0, 'dwarf': 0},
+                {'name': 'rbx', 'bitsize': 64, 'offset': 8, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 3, 'dwarf': 3},
+                {'name': 'rcx', 'bitsize': 64, 'offset': 16, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 2, 'dwarf': 2, 'generic': 'arg4', 'alt-name': 'arg4', },
+                {'name': 'rdx', 'bitsize': 64, 'offset': 24, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 1, 'dwarf': 1, 'generic': 'arg3', 'alt-name': 'arg3', },
+                {'name': 'rdi', 'bitsize': 64, 'offset': 32, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 5, 'dwarf': 5, 'generic': 'arg1', 'alt-name': 'arg1', },
+                {'name': 'rsi', 'bitsize': 64, 'offset': 40, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 4, 'dwarf': 4, 'generic': 'arg2', 'alt-name': 'arg2', },
+                {'name': 'rbp', 'bitsize': 64, 'offset': 48, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 6, 'dwarf': 6, 'generic': 'fp', 'alt-name': 'fp', },
+                {'name': 'rsp', 'bitsize': 64, 'offset': 56, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 7, 'dwarf': 7, 'generic': 'sp', 'alt-name': 'sp', },
+                {'name': 'r8', 'bitsize': 64, 'offset': 64, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 8, 'dwarf': 8, 'generic': 'arg5', 'alt-name': 'arg5', },
+                {'name': 'r9', 'bitsize': 64, 'offset': 72, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 9, 'dwarf': 9, 'generic': 'arg6', 'alt-name': 'arg6', },
+                {'name': 'r10', 'bitsize': 64, 'offset': 80, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 10, 'dwarf': 10},
+                {'name': 'r11', 'bitsize': 64, 'offset': 88, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 11, 'dwarf': 11},
+                {'name': 'r12', 'bitsize': 64, 'offset': 96, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 12, 'dwarf': 12},
+                {'name': 'r13', 'bitsize': 64, 'offset': 104, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 13, 'dwarf': 13},
+                {'name': 'r14', 'bitsize': 64, 'offset': 112, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 14, 'dwarf': 14},
+                {'name': 'r15', 'bitsize': 64, 'offset': 120, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 15, 'dwarf': 15},
+                {'name': 'rip', 'bitsize': 64, 'offset': 128, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 16, 'dwarf': 16, 'generic': 'pc', 'alt-name': 'pc'},
+                {'name': 'rflags', 'bitsize': 64, 'offset': 136, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'generic': 'flags', 'alt-name': 'flags'},
+                {'name': 'cs', 'bitsize': 64, 'offset': 144, 'encoding': 'uint', 'format': 'hex', 'set': 0},
+                {'name': 'fs', 'bitsize': 64, 'offset': 152, 'encoding': 'uint', 'format': 'hex', 'set': 0},
+                {'name': 'gs', 'bitsize': 64, 'offset': 160, 'encoding': 'uint', 'format': 'hex', 'set': 0},
+            ]
         return self.registers
-            
+
     def get_register_data(self, tid):
-        return struct.pack('21Q',tid + 1,tid + 2,tid + 3,tid + 4,tid + 5,tid + 6,tid + 7,tid + 8,tid + 9,tid + 10,tid + 11,tid + 12,tid + 13,tid + 14,tid + 15,tid + 16,tid + 17,tid + 18,tid + 19,tid + 20,tid + 21);
-    
+        return struct.pack(
+            '21Q',
+            tid + 1,
+            tid + 2,
+            tid + 3,
+            tid + 4,
+            tid + 5,
+            tid + 6,
+            tid + 7,
+            tid + 8,
+            tid + 9,
+            tid + 10,
+            tid + 11,
+            tid + 12,
+            tid + 13,
+            tid + 14,
+            tid + 15,
+            tid + 16,
+            tid + 17,
+            tid + 18,
+            tid + 19,
+            tid + 20,
+            tid + 21)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system2.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system2.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/operating_system2.py Tue Sep  6 15:57:50 2016
@@ -3,21 +3,22 @@
 import lldb
 import struct
 
+
 class OperatingSystemPlugIn(object):
     """Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class"""
-    
+
     def __init__(self, process):
         '''Initialization needs a valid.SBProcess object.
-        
+
         This plug-in will get created after a live process is valid and has stopped for the
         first time.'''
         self.process = None
         self.registers = None
         self.threads = None
-        if type(process) is lldb.SBProcess and process.IsValid():
+        if isinstance(process, lldb.SBProcess) and process.IsValid():
             self.process = process
-            self.threads = None # Will be an dictionary containing info for each thread
-    
+            self.threads = None  # Will be an dictionary containing info for each thread
+
     def get_target(self):
         # NOTE: Don't use "lldb.target" when trying to get your target as the "lldb.target"
         # tracks the current target in the LLDB command interpreter which isn't the
@@ -26,11 +27,16 @@ class OperatingSystemPlugIn(object):
 
     def create_thread(self, tid, context):
         if tid == 0x444444444:
-            thread_info = { 'tid' : tid, 'name' : 'four'  , 'queue' : 'queue4', 'state' : 'stopped', 'stop_reason' : 'none' }
+            thread_info = {
+                'tid': tid,
+                'name': 'four',
+                'queue': 'queue4',
+                'state': 'stopped',
+                'stop_reason': 'none'}
             self.threads.append(thread_info)
             return thread_info
         return None
-        
+
     def get_thread_info(self):
         if not self.threads:
             # The sample dictionary below shows the values that can be returned for a thread
@@ -48,41 +54,63 @@ class OperatingSystemPlugIn(object):
             #   Specifying this key/value pair for a thread will avoid a call to get_register_data()
             #   and can be used when your registers are in a thread context structure that is contiguous
             #   in memory. Don't specify this if your register layout in memory doesn't match the layout
-            #   described by the dictionary returned from a call to the get_register_info() method.
+            # described by the dictionary returned from a call to the
+            # get_register_info() method.
             self.threads = [
-                    { 'tid' : 0x111111111, 'core' : 0 }
-                ]
+                {'tid': 0x111111111, 'core': 0}
+            ]
         return self.threads
-    
+
     def get_register_info(self):
-        if self.registers == None:
-            self.registers = dict()            
+        if self.registers is None:
+            self.registers = dict()
             self.registers['sets'] = ['GPR']
             self.registers['registers'] = [
-                { 'name':'rax'       , 'bitsize' :  64, 'offset' :   0, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 0, 'dwarf' : 0},
-                { 'name':'rbx'       , 'bitsize' :  64, 'offset' :   8, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 3, 'dwarf' : 3},
-                { 'name':'rcx'       , 'bitsize' :  64, 'offset' :  16, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 2, 'dwarf' : 2, 'generic':'arg4', 'alt-name':'arg4', },
-                { 'name':'rdx'       , 'bitsize' :  64, 'offset' :  24, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 1, 'dwarf' : 1, 'generic':'arg3', 'alt-name':'arg3', },
-                { 'name':'rdi'       , 'bitsize' :  64, 'offset' :  32, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 5, 'dwarf' : 5, 'generic':'arg1', 'alt-name':'arg1', },
-                { 'name':'rsi'       , 'bitsize' :  64, 'offset' :  40, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 4, 'dwarf' : 4, 'generic':'arg2', 'alt-name':'arg2', },
-                { 'name':'rbp'       , 'bitsize' :  64, 'offset' :  48, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 6, 'dwarf' : 6, 'generic':'fp'  , 'alt-name':'fp', },
-                { 'name':'rsp'       , 'bitsize' :  64, 'offset' :  56, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 7, 'dwarf' : 7, 'generic':'sp'  , 'alt-name':'sp', },
-                { 'name':'r8'        , 'bitsize' :  64, 'offset' :  64, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 8, 'dwarf' : 8, 'generic':'arg5', 'alt-name':'arg5', },
-                { 'name':'r9'        , 'bitsize' :  64, 'offset' :  72, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 9, 'dwarf' : 9, 'generic':'arg6', 'alt-name':'arg6', },
-                { 'name':'r10'       , 'bitsize' :  64, 'offset' :  80, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 10, 'dwarf' : 10},
-                { 'name':'r11'       , 'bitsize' :  64, 'offset' :  88, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 11, 'dwarf' : 11},
-                { 'name':'r12'       , 'bitsize' :  64, 'offset' :  96, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 12, 'dwarf' : 12},
-                { 'name':'r13'       , 'bitsize' :  64, 'offset' : 104, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 13, 'dwarf' : 13},
-                { 'name':'r14'       , 'bitsize' :  64, 'offset' : 112, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 14, 'dwarf' : 14},
-                { 'name':'r15'       , 'bitsize' :  64, 'offset' : 120, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 15, 'dwarf' : 15},
-                { 'name':'rip'       , 'bitsize' :  64, 'offset' : 128, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'gcc' : 16, 'dwarf' : 16, 'generic':'pc', 'alt-name':'pc' },
-                { 'name':'rflags'    , 'bitsize' :  64, 'offset' : 136, 'encoding':'uint'  , 'format':'hex'         , 'set': 0, 'generic':'flags', 'alt-name':'flags' },
-                { 'name':'cs'        , 'bitsize' :  64, 'offset' : 144, 'encoding':'uint'  , 'format':'hex'         , 'set': 0                          },
-                { 'name':'fs'        , 'bitsize' :  64, 'offset' : 152, 'encoding':'uint'  , 'format':'hex'         , 'set': 0                          },
-                { 'name':'gs'        , 'bitsize' :  64, 'offset' : 160, 'encoding':'uint'  , 'format':'hex'         , 'set': 0                          },
-                ]
+                {'name': 'rax', 'bitsize': 64, 'offset': 0, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 0, 'dwarf': 0},
+                {'name': 'rbx', 'bitsize': 64, 'offset': 8, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 3, 'dwarf': 3},
+                {'name': 'rcx', 'bitsize': 64, 'offset': 16, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 2, 'dwarf': 2, 'generic': 'arg4', 'alt-name': 'arg4', },
+                {'name': 'rdx', 'bitsize': 64, 'offset': 24, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 1, 'dwarf': 1, 'generic': 'arg3', 'alt-name': 'arg3', },
+                {'name': 'rdi', 'bitsize': 64, 'offset': 32, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 5, 'dwarf': 5, 'generic': 'arg1', 'alt-name': 'arg1', },
+                {'name': 'rsi', 'bitsize': 64, 'offset': 40, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 4, 'dwarf': 4, 'generic': 'arg2', 'alt-name': 'arg2', },
+                {'name': 'rbp', 'bitsize': 64, 'offset': 48, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 6, 'dwarf': 6, 'generic': 'fp', 'alt-name': 'fp', },
+                {'name': 'rsp', 'bitsize': 64, 'offset': 56, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 7, 'dwarf': 7, 'generic': 'sp', 'alt-name': 'sp', },
+                {'name': 'r8', 'bitsize': 64, 'offset': 64, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 8, 'dwarf': 8, 'generic': 'arg5', 'alt-name': 'arg5', },
+                {'name': 'r9', 'bitsize': 64, 'offset': 72, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 9, 'dwarf': 9, 'generic': 'arg6', 'alt-name': 'arg6', },
+                {'name': 'r10', 'bitsize': 64, 'offset': 80, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 10, 'dwarf': 10},
+                {'name': 'r11', 'bitsize': 64, 'offset': 88, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 11, 'dwarf': 11},
+                {'name': 'r12', 'bitsize': 64, 'offset': 96, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 12, 'dwarf': 12},
+                {'name': 'r13', 'bitsize': 64, 'offset': 104, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 13, 'dwarf': 13},
+                {'name': 'r14', 'bitsize': 64, 'offset': 112, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 14, 'dwarf': 14},
+                {'name': 'r15', 'bitsize': 64, 'offset': 120, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 15, 'dwarf': 15},
+                {'name': 'rip', 'bitsize': 64, 'offset': 128, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 16, 'dwarf': 16, 'generic': 'pc', 'alt-name': 'pc'},
+                {'name': 'rflags', 'bitsize': 64, 'offset': 136, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'generic': 'flags', 'alt-name': 'flags'},
+                {'name': 'cs', 'bitsize': 64, 'offset': 144, 'encoding': 'uint', 'format': 'hex', 'set': 0},
+                {'name': 'fs', 'bitsize': 64, 'offset': 152, 'encoding': 'uint', 'format': 'hex', 'set': 0},
+                {'name': 'gs', 'bitsize': 64, 'offset': 160, 'encoding': 'uint', 'format': 'hex', 'set': 0},
+            ]
         return self.registers
-            
+
     def get_register_data(self, tid):
-        return struct.pack('21Q',tid + 1,tid + 2,tid + 3,tid + 4,tid + 5,tid + 6,tid + 7,tid + 8,tid + 9,tid + 10,tid + 11,tid + 12,tid + 13,tid + 14,tid + 15,tid + 16,tid + 17,tid + 18,tid + 19,tid + 20,tid + 21);
-    
+        return struct.pack(
+            '21Q',
+            tid + 1,
+            tid + 2,
+            tid + 3,
+            tid + 4,
+            tid + 5,
+            tid + 6,
+            tid + 7,
+            tid + 8,
+            tid + 9,
+            tid + 10,
+            tid + 11,
+            tid + 12,
+            tid + 13,
+            tid + 14,
+            tid + 15,
+            tid + 16,
+            tid + 17,
+            tid + 18,
+            tid + 19,
+            tid + 20,
+            tid + 21)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/linux-core/TestLinuxCore.py Tue Sep  6 15:57:50 2016
@@ -12,18 +12,19 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class LinuxCoreTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
     mydir = TestBase.compute_mydir(__file__)
 
-    _i386_pid   = 32306
+    _i386_pid = 32306
     _x86_64_pid = 32259
-    _s390x_pid  = 1045
+    _s390x_pid = 1045
 
-    _i386_regions   = 4
+    _i386_regions = 4
     _x86_64_regions = 5
-    _s390x_regions  = 2
+    _s390x_regions = 2
 
     def test_i386(self):
         """Test that lldb can read the process information from an i386 linux core file."""
@@ -33,8 +34,9 @@ class LinuxCoreTestCase(TestBase):
         """Test that lldb can read the process information from an x86_64 linux core file."""
         self.do_test("x86_64", self._x86_64_pid, self._x86_64_regions)
 
-    # This seems to hang on non-s390x platforms for some reason.  Disabling for now.
-    @skipIf(archs=no_match(['s390x'])) 
+    # This seems to hang on non-s390x platforms for some reason.  Disabling
+    # for now.
+    @skipIf(archs=no_match(['s390x']))
     def test_s390x(self):
         """Test that lldb can read the process information from an s390x linux core file."""
         self.do_test("s390x", self._s390x_pid, self._s390x_regions)
@@ -43,7 +45,7 @@ class LinuxCoreTestCase(TestBase):
         """Test that we read the information from the core correctly even if we have a running
         process with the same PID around"""
         try:
-            shutil.copyfile("x86_64.out",  "x86_64-pid.out")
+            shutil.copyfile("x86_64.out", "x86_64-pid.out")
             shutil.copyfile("x86_64.core", "x86_64-pid.core")
             with open("x86_64-pid.core", "r+b") as f:
                 # These are offsets into the NT_PRSTATUS and NT_PRPSINFO structures in the note
@@ -51,9 +53,14 @@ class LinuxCoreTestCase(TestBase):
                 # as well. (Notes can be viewed with readelf --notes.)
                 for pid_offset in [0x1c4, 0x320]:
                     f.seek(pid_offset)
-                    self.assertEqual(struct.unpack("<I", f.read(4))[0], self._x86_64_pid)
+                    self.assertEqual(
+                        struct.unpack(
+                            "<I",
+                            f.read(4))[0],
+                        self._x86_64_pid)
 
-                    # We insert our own pid, and make sure the test still works.
+                    # We insert our own pid, and make sure the test still
+                    # works.
                     f.seek(pid_offset)
                     f.write(struct.pack("<I", os.getpid()))
             self.do_test("x86_64-pid", os.getpid(), self._x86_64_regions)
@@ -72,10 +79,15 @@ class LinuxCoreTestCase(TestBase):
 
         altframe = altprocess.GetSelectedThread().GetFrameAtIndex(0)
         self.assertEqual(altframe.GetFunctionName(), "_start")
-        self.assertEqual(altframe.GetLineEntry().GetLine(), line_number("altmain.c", "Frame _start"))
+        self.assertEqual(
+            altframe.GetLineEntry().GetLine(),
+            line_number(
+                "altmain.c",
+                "Frame _start"))
 
         error = lldb.SBError()
-        F = altprocess.ReadCStringFromMemory(altframe.FindVariable("F").GetValueAsUnsigned(), 256, error)
+        F = altprocess.ReadCStringFromMemory(
+            altframe.FindVariable("F").GetValueAsUnsigned(), 256, error)
         self.assertTrue(error.Success())
         self.assertEqual(F, "_start")
 
@@ -90,33 +102,40 @@ class LinuxCoreTestCase(TestBase):
         region = lldb.SBMemoryRegionInfo()
 
         # Check we have the right number of regions.
-        self.assertEqual(region_list.GetSize(), region_count);
+        self.assertEqual(region_list.GetSize(), region_count)
 
         # Check that getting a region beyond the last in the list fails.
-        self.assertFalse(region_list.GetMemoryRegionAtIndex(region_count, region));
+        self.assertFalse(
+            region_list.GetMemoryRegionAtIndex(
+                region_count, region))
 
         # Check each region is valid.
         for i in range(region_list.GetSize()):
             # Check we can actually get this region.
             self.assertTrue(region_list.GetMemoryRegionAtIndex(i, region))
 
-            #Every region in the list should be mapped.
+            # Every region in the list should be mapped.
             self.assertTrue(region.IsMapped())
 
-            # Test the address at the start of a region returns it's enclosing region.
+            # Test the address at the start of a region returns it's enclosing
+            # region.
             begin_address = region.GetRegionBase()
             region_at_begin = lldb.SBMemoryRegionInfo()
             error = process.GetMemoryRegionInfo(begin_address, region_at_begin)
             self.assertEqual(region, region_at_begin)
 
-            # Test an address in the middle of a region returns it's enclosing region.
-            middle_address = (region.GetRegionBase() + region.GetRegionEnd()) / 2l
+            # Test an address in the middle of a region returns it's enclosing
+            # region.
+            middle_address = (region.GetRegionBase() +
+                              region.GetRegionEnd()) / 2
             region_at_middle = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(middle_address, region_at_middle)
+            error = process.GetMemoryRegionInfo(
+                middle_address, region_at_middle)
             self.assertEqual(region, region_at_middle)
 
-            # Test the address at the end of a region returns it's enclosing region.
-            end_address = region.GetRegionEnd() - 1l
+            # Test the address at the end of a region returns it's enclosing
+            # region.
+            end_address = region.GetRegionEnd() - 1
             region_at_end = lldb.SBMemoryRegionInfo()
             error = process.GetMemoryRegionInfo(end_address, region_at_end)
             self.assertEqual(region, region_at_end)
@@ -124,18 +143,24 @@ class LinuxCoreTestCase(TestBase):
             # Check that quering the end address does not return this region but
             # the next one.
             next_region = lldb.SBMemoryRegionInfo()
-            error = process.GetMemoryRegionInfo(region.GetRegionEnd(), next_region)
+            error = process.GetMemoryRegionInfo(
+                region.GetRegionEnd(), next_region)
             self.assertNotEqual(region, next_region)
-            self.assertEqual(region.GetRegionEnd(), next_region.GetRegionBase())
+            self.assertEqual(
+                region.GetRegionEnd(),
+                next_region.GetRegionBase())
 
         # Check that query beyond the last region returns an unmapped region
         # that ends at LLDB_INVALID_ADDRESS
         last_region = lldb.SBMemoryRegionInfo()
         region_list.GetMemoryRegionAtIndex(region_count - 1, last_region)
         end_region = lldb.SBMemoryRegionInfo()
-        error = process.GetMemoryRegionInfo(last_region.GetRegionEnd(), end_region)
+        error = process.GetMemoryRegionInfo(
+            last_region.GetRegionEnd(), end_region)
         self.assertFalse(end_region.IsMapped())
-        self.assertEqual(last_region.GetRegionEnd(), end_region.GetRegionBase())
+        self.assertEqual(
+            last_region.GetRegionEnd(),
+            end_region.GetRegionBase())
         self.assertEqual(end_region.GetRegionEnd(), lldb.LLDB_INVALID_ADDRESS)
 
     def do_test(self, filename, pid, region_count):
@@ -155,8 +180,10 @@ class LinuxCoreTestCase(TestBase):
             self.assertTrue(frame)
             self.assertEqual(frame.GetFunctionName(), backtrace[i])
             self.assertEqual(frame.GetLineEntry().GetLine(),
-                    line_number("main.c", "Frame " + backtrace[i]))
-            self.assertEqual(frame.FindVariable("F").GetValueAsUnsigned(), ord(backtrace[i][0]))
+                             line_number("main.c", "Frame " + backtrace[i]))
+            self.assertEqual(
+                frame.FindVariable("F").GetValueAsUnsigned(), ord(
+                    backtrace[i][0]))
 
         self.check_memory_regions(process, region_count)
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py Tue Sep  6 15:57:50 2016
@@ -11,6 +11,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class MiniDumpTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -35,12 +36,13 @@ class MiniDumpTestCase(TestBase):
         self.dbg.CreateTarget("")
         self.target = self.dbg.GetSelectedTarget()
         self.process = self.target.LoadCore("fizzbuzz_no_heap.dmp")
-        # This process crashed due to an access violation (0xc0000005) in its one and only thread.
+        # This process crashed due to an access violation (0xc0000005) in its
+        # one and only thread.
         self.assertEqual(self.process.GetNumThreads(), 1)
         thread = self.process.GetThreadAtIndex(0)
         self.assertEqual(thread.GetStopReason(), lldb.eStopReasonException)
-        stop_description = thread.GetStopDescription(256);
-        self.assertTrue("0xc0000005" in stop_description);
+        stop_description = thread.GetStopDescription(256)
+        self.assertTrue("0xc0000005" in stop_description)
 
     @skipUnlessWindows  # for now mini-dump debugging is limited to Windows hosts
     @no_debug_info_test
@@ -72,7 +74,8 @@ class MiniDumpTestCase(TestBase):
             # Set a breakpoint and capture a mini dump.
             target = self.dbg.CreateTarget(exe)
             breakpoint = target.BreakpointCreateByName("bar")
-            process = target.LaunchSimple(None, None, self.get_process_working_directory())
+            process = target.LaunchSimple(
+                None, None, self.get_process_working_directory())
             self.assertEqual(process.GetState(), lldb.eStateStopped)
             self.assertTrue(process.SaveCore(core))
             self.assertTrue(os.path.isfile(core))
@@ -83,7 +86,7 @@ class MiniDumpTestCase(TestBase):
             process = target.LoadCore(core)
             thread = process.GetThreadAtIndex(0)
 
-            expected_stack = { 0: 'bar', 1: 'foo', 2: 'main' }
+            expected_stack = {0: 'bar', 1: 'foo', 2: 'main'}
             self.assertGreaterEqual(thread.GetNumFrames(), len(expected_stack))
             for index, name in iteritems(expected_stack):
                 frame = thread.GetFrameAtIndex(index)
@@ -108,7 +111,8 @@ class MiniDumpTestCase(TestBase):
             # Set a breakpoint and capture a mini dump.
             target = self.dbg.CreateTarget(exe)
             breakpoint = target.BreakpointCreateByName("bar")
-            process = target.LaunchSimple(None, None, self.get_process_working_directory())
+            process = target.LaunchSimple(
+                None, None, self.get_process_working_directory())
             self.assertEqual(process.GetState(), lldb.eStateStopped)
             self.assertTrue(process.SaveCore(core))
             self.assertTrue(os.path.isfile(core))

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py Tue Sep  6 15:57:50 2016
@@ -16,6 +16,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class Wow64MiniDumpTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -66,7 +67,8 @@ class Wow64MiniDumpTestCase(TestBase):
         # In the dump, none of the threads are stopped, so we cannot use
         # lldbutil.get_stopped_thread.
         thread = process.GetThreadAtIndex(0)
-        # The crash is in main, so there should be at least one frame on the stack.
+        # The crash is in main, so there should be at least one frame on the
+        # stack.
         self.assertGreaterEqual(thread.GetNumFrames(), 1)
         frame = thread.GetFrameAtIndex(0)
         self.assertTrue(frame.IsValid())

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py Tue Sep  6 15:57:50 2016
@@ -5,8 +5,8 @@ Test process attach.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -14,6 +14,7 @@ from lldbsuite.test import lldbutil
 
 exe_name = "ProcessAttach"  # Must match Makefile
 
+
 class ProcessAttachTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py Tue Sep  6 15:57:50 2016
@@ -5,7 +5,6 @@ Test denied process attach.
 from __future__ import print_function
 
 
-
 import os
 import time
 import lldb
@@ -15,6 +14,7 @@ from lldbsuite.test import lldbutil
 
 exe_name = 'AttachDenied'  # Must match Makefile
 
+
 class AttachDeniedTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -28,8 +28,11 @@ class AttachDeniedTestCase(TestBase):
 
         # Use a file as a synchronization point between test and inferior.
         pid_file_path = lldbutil.append_to_process_working_directory(
-                "pid_file_%d" % (int(time.time())))
-        self.addTearDownHook(lambda: self.run_platform_command("rm %s" % (pid_file_path)))
+            "pid_file_%d" % (int(time.time())))
+        self.addTearDownHook(
+            lambda: self.run_platform_command(
+                "rm %s" %
+                (pid_file_path)))
 
         # Spawn a new process
         popen = self.spawnSubprocess(exe, [pid_file_path])
@@ -38,5 +41,5 @@ class AttachDeniedTestCase(TestBase):
         pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
 
         self.expect('process attach -p ' + pid,
-                    startstr = 'error: attach failed:',
-                    error = True)
+                    startstr='error: attach failed:',
+                    error=True)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py Tue Sep  6 15:57:50 2016
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
@@ -21,8 +20,8 @@ class ChangeProcessGroupTestCase(TestBas
         # Find the line number to break for main.c.
         self.line = line_number('main.c', '// Set breakpoint here')
 
-    @skipIfFreeBSD # Times out on FreeBSD llvm.org/pr23731
-    @skipIfWindows # setpgid call does not exist on Windows
+    @skipIfFreeBSD  # Times out on FreeBSD llvm.org/pr23731
+    @skipIfWindows  # setpgid call does not exist on Windows
     @expectedFailureAndroid("http://llvm.org/pr23762", api_levels=[16])
     def test_setpgid(self):
         self.build()
@@ -30,8 +29,11 @@ class ChangeProcessGroupTestCase(TestBas
 
         # Use a file as a synchronization point between test and inferior.
         pid_file_path = lldbutil.append_to_process_working_directory(
-                "pid_file_%d" % (int(time.time())))
-        self.addTearDownHook(lambda: self.run_platform_command("rm %s" % (pid_file_path)))
+            "pid_file_%d" % (int(time.time())))
+        self.addTearDownHook(
+            lambda: self.run_platform_command(
+                "rm %s" %
+                (pid_file_path)))
 
         popen = self.spawnSubprocess(exe, [pid_file_path])
         self.addTearDownHook(self.cleanupSubprocesses)
@@ -57,19 +59,20 @@ class ChangeProcessGroupTestCase(TestBas
         self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
 
         # set a breakpoint just before the setpgid() call
-        lldbutil.run_break_set_by_file_and_line(self, 'main.c', self.line, num_expected_locations=-1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, 'main.c', self.line, num_expected_locations=-1)
 
         thread = process.GetSelectedThread()
 
         # release the child from its loop
         value = thread.GetSelectedFrame().EvaluateExpression("release_child_flag = 1")
-        self.assertTrue(value.IsValid() and value.GetValueAsUnsigned(0) == 1);
+        self.assertTrue(value.IsValid() and value.GetValueAsUnsigned(0) == 1)
         process.Continue()
 
         # make sure the child's process group id is different from its pid
         value = thread.GetSelectedFrame().EvaluateExpression("(int)getpgid(0)")
         self.assertTrue(value.IsValid())
-        self.assertNotEqual(value.GetValueAsUnsigned(0), int(pid));
+        self.assertNotEqual(value.GetValueAsUnsigned(0), int(pid))
 
         # step over the setpgid() call
         thread.StepOver()
@@ -79,7 +82,7 @@ class ChangeProcessGroupTestCase(TestBas
         # this also checks that we are still in full control of the child
         value = thread.GetSelectedFrame().EvaluateExpression("(int)getpgid(0)")
         self.assertTrue(value.IsValid())
-        self.assertEqual(value.GetValueAsUnsigned(0), int(pid));
+        self.assertEqual(value.GetValueAsUnsigned(0), int(pid))
 
         # run to completion
         process.Continue()

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py Tue Sep  6 15:57:50 2016
@@ -15,6 +15,7 @@ from lldbsuite.test import lldbutil
 
 import six
 
+
 class ProcessLaunchTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -29,12 +30,12 @@ class ProcessLaunchTestCase(TestBase):
         TestBase.tearDown(self)
 
     @not_remote_testsuite_ready
-    def test_io (self):
+    def test_io(self):
         """Test that process launch I/O redirection flags work properly."""
-        self.build ()
-        exe = os.path.join (os.getcwd(), "a.out")
+        self.build()
+        exe = os.path.join(os.getcwd(), "a.out")
         self.expect("file " + exe,
-                    patterns = [ "Current executable set to .*a.out" ])
+                    patterns=["Current executable set to .*a.out"])
 
         in_file = "input-file.txt"
         out_file = "output-test.out"
@@ -42,23 +43,24 @@ class ProcessLaunchTestCase(TestBase):
 
         # Make sure the output files do not exist before launching the process
         try:
-            os.remove (out_file)
+            os.remove(out_file)
         except OSError:
             pass
 
         try:
-            os.remove (err_file)
+            os.remove(err_file)
         except OSError:
             pass
 
-        launch_command = "process launch -i " + in_file + " -o " + out_file + " -e " + err_file
+        launch_command = "process launch -i " + \
+            in_file + " -o " + out_file + " -e " + err_file
 
         if lldb.remote_platform:
             self.runCmd('platform put-file "{local}" "{remote}"'.format(
                 local=in_file, remote=in_file))
 
-        self.expect (launch_command,
-                     patterns = [ "Process .* launched: .*a.out" ])
+        self.expect(launch_command,
+                    patterns=["Process .* launched: .*a.out"])
 
         if lldb.remote_platform:
             self.runCmd('platform get-file "{remote}" "{local}"'.format(
@@ -71,33 +73,33 @@ class ProcessLaunchTestCase(TestBase):
 
         # Check to see if the 'stdout' file was created
         try:
-            out_f = open (out_file)
+            out_f = open(out_file)
         except IOError:
             success = False
             err_msg = err_msg + "   ERROR: stdout file was not created.\n"
         else:
             # Check to see if the 'stdout' file contains the right output
-            line = out_f.readline ();
+            line = out_f.readline()
             if line != "This should go to stdout.\n":
                 success = False
                 err_msg = err_msg + "    ERROR: stdout file does not contain correct output.\n"
-                out_f.close();
+                out_f.close()
 
         # Try to delete the 'stdout' file
         try:
-            os.remove (out_file)
+            os.remove(out_file)
         except OSError:
             pass
 
         # Check to see if the 'stderr' file was created
         try:
-            err_f = open (err_file)
+            err_f = open(err_file)
         except IOError:
             success = False
             err_msg = err_msg + "     ERROR:  stderr file was not created.\n"
         else:
             # Check to see if the 'stderr' file contains the right output
-            line = err_f.readline ()
+            line = err_f.readline()
             if line != "This should go to stderr.\n":
                 success = False
                 err_msg = err_msg + "    ERROR: stderr file does not contain correct output.\n\
@@ -106,23 +108,24 @@ class ProcessLaunchTestCase(TestBase):
 
         # Try to delete the 'stderr' file
         try:
-            os.remove (err_file)
+            os.remove(err_file)
         except OSError:
             pass
 
         if not success:
-            self.fail (err_msg)
+            self.fail(err_msg)
 
     # rdar://problem/9056462
-    # The process launch flag '-w' for setting the current working directory not working?
+    # The process launch flag '-w' for setting the current working directory
+    # not working?
     @not_remote_testsuite_ready
     @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20265")
-    def test_set_working_dir (self):
+    def test_set_working_dir(self):
         """Test that '-w dir' sets the working dir when running the inferior."""
-        d = {'CXX_SOURCES' : 'print_cwd.cpp'}
+        d = {'CXX_SOURCES': 'print_cwd.cpp'}
         self.build(dictionary=d)
         self.setTearDownCleanup(d)
-        exe = os.path.join (os.getcwd(), "a.out")
+        exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe)
 
         mywd = 'my_working_dir'
@@ -135,26 +138,26 @@ class ProcessLaunchTestCase(TestBase):
 
         # Make sure the output files do not exist before launching the process
         try:
-            os.remove (out_file_path)
-            os.remove (err_file_path)
+            os.remove(out_file_path)
+            os.remove(err_file_path)
         except OSError:
             pass
 
         # Check that we get an error when we have a nonexisting path
-        launch_command = "process launch -w %s -o %s -e %s" % (my_working_dir_path + 'z',
-                                                               out_file_path,
-                                                               err_file_path)
+        launch_command = "process launch -w %s -o %s -e %s" % (
+            my_working_dir_path + 'z', out_file_path, err_file_path)
 
-        self.expect(launch_command, error=True,
-                patterns = ["error:.* No such file or directory: %sz" % my_working_dir_path])
+        self.expect(
+            launch_command, error=True, patterns=[
+                "error:.* No such file or directory: %sz" %
+                my_working_dir_path])
 
         # Really launch the process
-        launch_command = "process launch -w %s -o %s -e %s" % (my_working_dir_path,
-                                                               out_file_path,
-                                                               err_file_path)
+        launch_command = "process launch -w %s -o %s -e %s" % (
+            my_working_dir_path, out_file_path, err_file_path)
 
         self.expect(launch_command,
-                    patterns = [ "Process .* launched: .*a.out" ])
+                    patterns=["Process .* launched: .*a.out"])
 
         success = True
         err_msg = ""
@@ -167,13 +170,13 @@ class ProcessLaunchTestCase(TestBase):
             err_msg = err_msg + "ERROR: stdout file was not created.\n"
         else:
             # Check to see if the 'stdout' file contains the right output
-            line = out_f.readline();
+            line = out_f.readline()
             if self.TraceOn():
                 print("line:", line)
             if not re.search(mywd, line):
                 success = False
                 err_msg = err_msg + "The current working directory was not set correctly.\n"
-                out_f.close();
+                out_f.close()
 
         # Try to delete the 'stdout' and 'stderr' files
         try:
@@ -186,24 +189,31 @@ class ProcessLaunchTestCase(TestBase):
         if not success:
             self.fail(err_msg)
 
-    def test_environment_with_special_char (self):
+    def test_environment_with_special_char(self):
         """Test that environment variables containing '*' and '}' are handled correctly by the inferior."""
         source = 'print_env.cpp'
-        d = {'CXX_SOURCES' : source}
+        d = {'CXX_SOURCES': source}
         self.build(dictionary=d)
         self.setTearDownCleanup(d)
-        exe = os.path.join (os.getcwd(), "a.out")
+        exe = os.path.join(os.getcwd(), "a.out")
 
         evil_var = 'INIT*MIDDLE}TAIL'
 
         target = self.dbg.CreateTarget(exe)
         main_source_spec = lldb.SBFileSpec(source)
-        breakpoint = target.BreakpointCreateBySourceRegex('// Set breakpoint here.', main_source_spec)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            '// Set breakpoint here.', main_source_spec)
 
-        process = target.LaunchSimple(None, ['EVIL=' + evil_var], self.get_process_working_directory())
-        self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
+        process = target.LaunchSimple(None,
+                                      ['EVIL=' + evil_var],
+                                      self.get_process_working_directory())
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
         self.assertEqual(len(threads), 1)
         frame = threads[0].GetFrameAtIndex(0)
         sbvalue = frame.EvaluateExpression("evil")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py Tue Sep  6 15:57:50 2016
@@ -4,12 +4,14 @@ Test saving a core file (or mini dump).
 
 from __future__ import print_function
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ProcessSaveCoreTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,7 +24,8 @@ class ProcessSaveCoreTestCase(TestBase):
         exe = os.path.join(os.getcwd(), "a.out")
         core = os.path.join(os.getcwd(), "core.dmp")
         target = self.dbg.CreateTarget(exe)
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertNotEqual(process.GetState(), lldb.eStateStopped)
         error = process.SaveCore(core)
         self.assertTrue(error.Fail())
@@ -37,7 +40,8 @@ class ProcessSaveCoreTestCase(TestBase):
         try:
             target = self.dbg.CreateTarget(exe)
             breakpoint = target.BreakpointCreateByName("bar")
-            process = target.LaunchSimple(None, None, self.get_process_working_directory())
+            process = target.LaunchSimple(
+                None, None, self.get_process_working_directory())
             self.assertEqual(process.GetState(), lldb.eStateStopped)
             self.assertTrue(process.SaveCore(core))
             self.assertTrue(os.path.isfile(core))
@@ -47,8 +51,13 @@ class ProcessSaveCoreTestCase(TestBase):
             # the executable in the module list.
             target = self.dbg.CreateTarget(None)
             process = target.LoadCore(core)
-            files = [target.GetModuleAtIndex(i).GetFileSpec() for i in range(0, target.GetNumModules())]
-            paths = [os.path.join(f.GetDirectory(), f.GetFilename()) for f in files]
+            files = [
+                target.GetModuleAtIndex(i).GetFileSpec() for i in range(
+                    0, target.GetNumModules())]
+            paths = [
+                os.path.join(
+                    f.GetDirectory(),
+                    f.GetFilename()) for f in files]
             self.assertTrue(exe in paths)
 
         finally:
@@ -56,5 +65,3 @@ class ProcessSaveCoreTestCase(TestBase):
             self.assertTrue(self.dbg.DeleteTarget(target))
             if (os.path.isfile(core)):
                 os.unlink(core)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py Tue Sep  6 15:57:50 2016
@@ -10,6 +10,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestPtrRefs(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,24 +21,29 @@ class TestPtrRefs(TestBase):
         self.build()
         exe_name = 'a.out'
         exe = os.path.join(os.getcwd(), exe_name)
-    
+
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        main_file_spec = lldb.SBFileSpec ('main.c')
-        breakpoint = target.BreakpointCreateBySourceRegex('break', main_file_spec)
+        main_file_spec = lldb.SBFileSpec('main.c')
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'break', main_file_spec)
         self.assertTrue(breakpoint and
                         breakpoint.GetNumLocations() == 1,
                         VALID_BREAKPOINT)
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # Frame #0 should be on self.line1 and the break condition should hold.
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            thread.IsValid(),
+            "There should be a thread stopped due to breakpoint condition")
 
-        frame = thread.GetFrameAtIndex(0)       
+        frame = thread.GetFrameAtIndex(0)
 
         self.dbg.HandleCommand("script import lldb.macosx.heap")
-        self.expect("ptr_refs my_ptr", substrs=["malloc", "stack"]);
+        self.expect("ptr_refs my_ptr", substrs=["malloc", "stack"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,13 @@ Test lldb data formatter subsystem.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class ValueObjectRecursionTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,14 +27,15 @@ class ValueObjectRecursionTestCase(TestB
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # This is the function to remove the custom formats in order to have a
         # clean slate for the next test case.
@@ -47,13 +49,21 @@ class ValueObjectRecursionTestCase(TestB
         root = self.frame().FindVariable("root")
         child = root.GetChildAtIndex(1)
         if self.TraceOn():
-             print(root)
-             print(child)
-        for i in range(0,15000):
-             child = child.GetChildAtIndex(1)
+            print(root)
+            print(child)
+        for i in range(0, 15000):
+            child = child.GetChildAtIndex(1)
         if self.TraceOn():
-             print(child)
-        self.assertTrue(child.IsValid(),"could not retrieve the deep ValueObject")
-        self.assertTrue(child.GetChildAtIndex(0).IsValid(),"the deep ValueObject has no value")
-        self.assertTrue(child.GetChildAtIndex(0).GetValueAsUnsigned() != 0,"the deep ValueObject has a zero value")
-        self.assertTrue(child.GetChildAtIndex(1).GetValueAsUnsigned() != 0, "the deep ValueObject has no next")
+            print(child)
+        self.assertTrue(
+            child.IsValid(),
+            "could not retrieve the deep ValueObject")
+        self.assertTrue(
+            child.GetChildAtIndex(0).IsValid(),
+            "the deep ValueObject has no value")
+        self.assertTrue(
+            child.GetChildAtIndex(0).GetValueAsUnsigned() != 0,
+            "the deep ValueObject has a zero value")
+        self.assertTrue(
+            child.GetChildAtIndex(1).GetValueAsUnsigned() != 0,
+            "the deep ValueObject has no next")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/register/TestRegisters.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,16 @@ Test the 'register' command.
 from __future__ import print_function
 
 
-
-import os, sys, time
+import os
+import sys
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class RegisterCommandsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -36,19 +38,24 @@ class RegisterCommandsTestCase(TestBase)
         self.log_enable("registers")
 
         self.expect("register read -a", MISSING_EXPECTED_REGISTERS,
-            substrs = ['registers were unavailable'], matching = False)
+                    substrs=['registers were unavailable'], matching=False)
 
         if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
             self.runCmd("register read xmm0")
-            self.runCmd("register read ymm15") # may be available
+            self.runCmd("register read ymm15")  # may be available
         elif self.getArchitecture() in ['arm']:
             self.runCmd("register read s0")
-            self.runCmd("register read q15") # may be available
+            self.runCmd("register read q15")  # may be available
 
-        self.expect("register read -s 3", substrs = ['invalid register set index: 3'], error = True)
+        self.expect(
+            "register read -s 3",
+            substrs=['invalid register set index: 3'],
+            error=True)
 
     @skipIfiOSSimulator
-    @skipIfTargetAndroid(archs=["i386"]) # Writing of mxcsr register fails, presumably due to a kernel/hardware problem
+    # Writing of mxcsr register fails, presumably due to a kernel/hardware
+    # problem
+    @skipIfTargetAndroid(archs=["i386"])
     @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
     def test_fp_register_write(self):
         """Test commands that write to registers, in particular floating-point registers."""
@@ -56,8 +63,9 @@ class RegisterCommandsTestCase(TestBase)
         self.fp_register_write()
 
     @skipIfiOSSimulator
-    @expectedFailureAndroid(archs=["i386"]) # "register read fstat" always return 0xffff
-    @skipIfFreeBSD    #llvm.org/pr25057
+    # "register read fstat" always return 0xffff
+    @expectedFailureAndroid(archs=["i386"])
+    @skipIfFreeBSD  # llvm.org/pr25057
     @skipIf(archs=no_match(['amd64', 'i386', 'x86_64']))
     def test_fp_special_purpose_register_read(self):
         """Test commands that read fpu special purpose registers."""
@@ -78,12 +86,16 @@ class RegisterCommandsTestCase(TestBase)
             gpr = "r0"
             vector = "q0"
 
-        self.expect("expr/x $%s" % gpr, substrs = ['unsigned int', ' = 0x'])
-        self.expect("expr $%s" % vector, substrs = ['vector_type'])
-        self.expect("expr (unsigned int)$%s[0]" % vector, substrs = ['unsigned int'])
+        self.expect("expr/x $%s" % gpr, substrs=['unsigned int', ' = 0x'])
+        self.expect("expr $%s" % vector, substrs=['vector_type'])
+        self.expect(
+            "expr (unsigned int)$%s[0]" %
+            vector, substrs=['unsigned int'])
 
         if self.getArchitecture() in ['amd64', 'x86_64']:
-            self.expect("expr -- ($rax & 0xffffffff) == $eax", substrs = ['true'])
+            self.expect(
+                "expr -- ($rax & 0xffffffff) == $eax",
+                substrs=['true'])
 
     @skipIfiOSSimulator
     @skipIf(archs=no_match(['amd64', 'x86_64']))
@@ -112,13 +124,14 @@ class RegisterCommandsTestCase(TestBase)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break in main().
-        lldbutil.run_break_set_by_symbol (self, "main", num_expected_locations=-1)
+        lldbutil.run_break_set_by_symbol(
+            self, "main", num_expected_locations=-1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped', 'stop reason = breakpoint'])
+                    substrs=['stopped', 'stop reason = breakpoint'])
 
     # platform specific logging of the specified category
     def log_enable(self, category):
@@ -126,7 +139,7 @@ class RegisterCommandsTestCase(TestBase)
         # platform as logging is host side.
         self.platform = ""
         if sys.platform.startswith("darwin"):
-            self.platform = "" # TODO: add support for "log enable darwin registers"
+            self.platform = ""  # TODO: add support for "log enable darwin registers"
 
         if sys.platform.startswith("freebsd"):
             self.platform = "freebsd"
@@ -139,7 +152,14 @@ class RegisterCommandsTestCase(TestBase)
 
         if self.platform != "":
             self.log_file = os.path.join(os.getcwd(), 'TestRegisters.log')
-            self.runCmd("log enable " + self.platform + " " + str(category) + " registers -v -f " + self.log_file, RUN_SUCCEEDED)
+            self.runCmd(
+                "log enable " +
+                self.platform +
+                " " +
+                str(category) +
+                " registers -v -f " +
+                self.log_file,
+                RUN_SUCCEEDED)
             if not self.has_teardown:
                 def remove_log(self):
                     if os.path.exists(self.log_file):
@@ -147,15 +167,24 @@ class RegisterCommandsTestCase(TestBase)
                 self.has_teardown = True
                 self.addTearDownHook(remove_log)
 
-    def write_and_read(self, frame, register, new_value, must_exist = True):
+    def write_and_read(self, frame, register, new_value, must_exist=True):
         value = frame.FindValue(register, lldb.eValueTypeRegister)
         if must_exist:
-            self.assertTrue(value.IsValid(), "finding a value for register " + register)
+            self.assertTrue(
+                value.IsValid(),
+                "finding a value for register " +
+                register)
         elif not value.IsValid():
-            return # If register doesn't exist, skip this test
+            return  # If register doesn't exist, skip this test
 
         self.runCmd("register write " + register + " \'" + new_value + "\'")
-        self.expect("register read " + register, substrs = [register + ' = ', new_value])
+        self.expect(
+            "register read " +
+            register,
+            substrs=[
+                register +
+                ' = ',
+                new_value])
 
     def fp_special_purpose_register_read(self):
         exe = os.path.join(os.getcwd(), "a.out")
@@ -165,12 +194,14 @@ class RegisterCommandsTestCase(TestBase)
         self.assertTrue(target, VALID_TARGET)
 
         # Launch the process and stop.
-        self.expect ("run", PROCESS_STOPPED, substrs = ['stopped'])
+        self.expect("run", PROCESS_STOPPED, substrs=['stopped'])
 
         # Check stop reason; Should be either signal SIGTRAP or EXC_BREAKPOINT
         output = self.res.GetOutput()
         matched = False
-        substrs = ['stop reason = EXC_BREAKPOINT', 'stop reason = signal SIGTRAP']
+        substrs = [
+            'stop reason = EXC_BREAKPOINT',
+            'stop reason = signal SIGTRAP']
         for str1 in substrs:
             matched = output.find(str1) != -1
             with recording(self, False) as sbuf:
@@ -202,30 +233,39 @@ class RegisterCommandsTestCase(TestBase)
         reg_value_ftag_initial = value.GetValueAsUnsigned(error, 0)
 
         self.assertTrue(error.Success(), "reading a value for ftag")
-        fstat_top_pointer_initial = (reg_value_fstat_initial & 0x3800)>>11
+        fstat_top_pointer_initial = (reg_value_fstat_initial & 0x3800) >> 11
 
         # Execute 'si' aka 'thread step-inst' instruction 5 times and with
         # every execution verify the value of fstat and ftag registers
-        for x in range(0,5):
-            # step into the next instruction to push a value on 'st' register stack
-            self.runCmd ("si", RUN_SUCCEEDED)
+        for x in range(0, 5):
+            # step into the next instruction to push a value on 'st' register
+            # stack
+            self.runCmd("si", RUN_SUCCEEDED)
 
-            # Verify fstat and save it to be used for verification in next execution of 'si' command
+            # Verify fstat and save it to be used for verification in next
+            # execution of 'si' command
             if not (reg_value_fstat_initial & 0x3800):
-                self.expect("register read fstat",
-                    substrs = ['fstat' + ' = ', str("0x%0.4x" %((reg_value_fstat_initial & ~(0x3800))| 0x3800))])
-                reg_value_fstat_initial = ((reg_value_fstat_initial & ~(0x3800))| 0x3800)
+                self.expect("register read fstat", substrs=[
+                            'fstat' + ' = ', str("0x%0.4x" % ((reg_value_fstat_initial & ~(0x3800)) | 0x3800))])
+                reg_value_fstat_initial = (
+                    (reg_value_fstat_initial & ~(0x3800)) | 0x3800)
                 fstat_top_pointer_initial = 7
-            else :
-                self.expect("register read fstat",
-                    substrs = ['fstat' + ' = ', str("0x%0.4x" % (reg_value_fstat_initial - 0x0800))])
+            else:
+                self.expect("register read fstat", substrs=[
+                            'fstat' + ' = ', str("0x%0.4x" % (reg_value_fstat_initial - 0x0800))])
                 reg_value_fstat_initial = (reg_value_fstat_initial - 0x0800)
                 fstat_top_pointer_initial -= 1
 
-            # Verify ftag and save it to be used for verification in next execution of 'si' command
-            self.expect("register read ftag",
-                substrs = ['ftag' + ' = ', str("0x%0.2x" % (reg_value_ftag_initial | (1<< fstat_top_pointer_initial)))])
-            reg_value_ftag_initial = reg_value_ftag_initial | (1<< fstat_top_pointer_initial)
+            # Verify ftag and save it to be used for verification in next
+            # execution of 'si' command
+            self.expect(
+                "register read ftag", substrs=[
+                    'ftag' + ' = ', str(
+                        "0x%0.2x" %
+                        (reg_value_ftag_initial | (
+                            1 << fstat_top_pointer_initial)))])
+            reg_value_ftag_initial = reg_value_ftag_initial | (
+                1 << fstat_top_pointer_initial)
 
     def fp_register_write(self):
         exe = os.path.join(os.getcwd(), "a.out")
@@ -234,13 +274,17 @@ class RegisterCommandsTestCase(TestBase)
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        lldbutil.run_break_set_by_symbol (self, "main", num_expected_locations=-1)
+        lldbutil.run_break_set_by_symbol(
+            self, "main", num_expected_locations=-1)
 
         # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
 
         thread = process.GetThreadAtIndex(0)
         self.assertTrue(thread.IsValid(), "current thread is valid")
@@ -251,12 +295,12 @@ class RegisterCommandsTestCase(TestBase)
         if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
             reg_list = [
                 # reg          value        must-have
-                ("fcw",       "0x0000ff0e", False),
-                ("fsw",       "0x0000ff0e", False),
-                ("ftw",       "0x0000ff0e", False),
-                ("ip",        "0x0000ff0e", False),
-                ("dp",        "0x0000ff0e", False),
-                ("mxcsr",     "0x0000ff0e", False),
+                ("fcw", "0x0000ff0e", False),
+                ("fsw", "0x0000ff0e", False),
+                ("ftw", "0x0000ff0e", False),
+                ("ip", "0x0000ff0e", False),
+                ("dp", "0x0000ff0e", False),
+                ("mxcsr", "0x0000ff0e", False),
                 ("mxcsrmask", "0x0000ff0e", False),
             ]
 
@@ -266,31 +310,52 @@ class RegisterCommandsTestCase(TestBase)
             elif currentFrame.FindRegister("stmm0").IsValid():
                 st0regname = "stmm0"
             if st0regname is not None:
-                #                reg          value                                                                               must-have
-                reg_list.append((st0regname, "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00}",                               True))
-                reg_list.append(("xmm0",     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True))
-                reg_list.append(("xmm15",    "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}", False))
+                # reg          value
+                # must-have
+                reg_list.append(
+                    (st0regname, "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00}", True))
+                reg_list.append(
+                    ("xmm0",
+                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}",
+                     True))
+                reg_list.append(
+                    ("xmm15",
+                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
+                     False))
         elif self.getArchitecture() in ['arm']:
             reg_list = [
-                # reg      value                                                                               must-have
-                ("fpscr", "0xfbf79f9f",                                                                        True),
-                ("s0",    "1.25",                                                                              True),
-                ("s31",   "0.75",                                                                              True),
-                ("d1",    "123",                                                                               True),
-                ("d17",   "987",                                                                               False),
-                ("q1",    "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
-                ("q14",   "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}", False),
+                # reg      value
+                # must-have
+                ("fpscr", "0xfbf79f9f", True),
+                ("s0", "1.25", True),
+                ("s31", "0.75", True),
+                ("d1", "123", True),
+                ("d17", "987", False),
+                ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
+                ("q14",
+                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
+                 False),
             ]
 
         for (reg, val, must) in reg_list:
             self.write_and_read(currentFrame, reg, val, must)
 
         if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            self.runCmd("register write " + st0regname + " \"{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}\"")
-            self.expect("register read " + st0regname + " --format f", substrs = [st0regname + ' = 0'])
-
-            has_avx = False 
-            registerSets = currentFrame.GetRegisters() # Returns an SBValueList.
+            self.runCmd(
+                "register write " +
+                st0regname +
+                " \"{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}\"")
+            self.expect(
+                "register read " +
+                st0regname +
+                " --format f",
+                substrs=[
+                    st0regname +
+                    ' = 0'])
+
+            has_avx = False
+            # Returns an SBValueList.
+            registerSets = currentFrame.GetRegisters()
             for registerSet in registerSets:
                 if 'advanced vector extensions' in registerSet.GetName().lower():
                     has_avx = True
@@ -300,7 +365,7 @@ class RegisterCommandsTestCase(TestBase)
                 new_value = "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x0d 0x0e 0x0f}"
                 self.write_and_read(currentFrame, "ymm0", new_value)
                 self.write_and_read(currentFrame, "ymm7", new_value)
-                self.expect("expr $ymm0", substrs = ['vector_type'])
+                self.expect("expr $ymm0", substrs=['vector_type'])
             else:
                 self.runCmd("register read ymm0")
 
@@ -308,22 +373,24 @@ class RegisterCommandsTestCase(TestBase)
         """Test convenience registers."""
         self.common_setup()
 
-        # The command "register read -a" does output a derived register like eax...
+        # The command "register read -a" does output a derived register like
+        # eax...
         self.expect("register read -a", matching=True,
-            substrs = ['eax'])
+                    substrs=['eax'])
 
         # ...however, the vanilla "register read" command should not output derived registers like eax.
         self.expect("register read", matching=False,
-            substrs = ['eax'])
-        
+                    substrs=['eax'])
+
         # Test reading of rax and eax.
         self.expect("register read rax eax",
-            substrs = ['rax = 0x', 'eax = 0x'])
+                    substrs=['rax = 0x', 'eax = 0x'])
 
-        # Now write rax with a unique bit pattern and test that eax indeed represents the lower half of rax.
+        # Now write rax with a unique bit pattern and test that eax indeed
+        # represents the lower half of rax.
         self.runCmd("register write rax 0x1234567887654321")
         self.expect("register read rax 0x1234567887654321",
-            substrs = ['0x1234567887654321'])
+                    substrs=['0x1234567887654321'])
 
     def convenience_registers_with_process_attach(self, test_16bit_regs):
         """Test convenience registers after a 'process attach'."""
@@ -343,8 +410,8 @@ class RegisterCommandsTestCase(TestBase)
 
         if self.getArchitecture() in ['amd64', 'x86_64']:
             self.expect("expr -- ($rax & 0xffffffff) == $eax",
-                substrs = ['true'])
+                        substrs=['true'])
 
         if test_16bit_regs:
             self.expect("expr -- $ax == (($ah << 8) | $al)",
-                substrs = ['true'])
+                        substrs=['true'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py Tue Sep  6 15:57:50 2016
@@ -4,7 +4,6 @@ Test that argdumper is a viable launchin
 from __future__ import print_function
 
 
-
 import lldb
 import os
 import time
@@ -12,45 +11,51 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestRerun(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def test (self):
+    def test(self):
         self.build()
-        exe = os.path.join (os.getcwd(), "a.out")
-        
+        exe = os.path.join(os.getcwd(), "a.out")
+
         self.runCmd("target create %s" % exe)
-        
+
         # Create the target
         target = self.dbg.CreateTarget(exe)
-        
+
         # Create any breakpoints we need
-        breakpoint = target.BreakpointCreateBySourceRegex ('break here', lldb.SBFileSpec ("main.cpp", False))
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'break here', lldb.SBFileSpec("main.cpp", False))
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
         self.runCmd("process launch 1 2 3")
 
         process = self.process()
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, breakpoint)
-        self.assertIsNotNone(thread, "Process should be stopped at a breakpoint in main")
+        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertIsNotNone(
+            thread, "Process should be stopped at a breakpoint in main")
         self.assertTrue(thread.IsValid(), "Stopped thread is not valid")
 
         self.expect("frame variable argv[1]", substrs=['1'])
         self.expect("frame variable argv[2]", substrs=['2'])
         self.expect("frame variable argv[3]", substrs=['3'])
-        
+
         # Let program exit
         self.runCmd("continue")
-        
+
         # Re-run with no args and make sure we still run with 1 2 3 as arguments as
         # they should have been stored in "target.run-args"
         self.runCmd("process launch")
 
         process = self.process()
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, breakpoint)
+        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
+            process, breakpoint)
 
-        self.assertIsNotNone(thread, "Process should be stopped at a breakpoint in main");
+        self.assertIsNotNone(
+            thread, "Process should be stopped at a breakpoint in main")
         self.assertTrue(thread.IsValid(), "Stopped thread is not valid")
 
         self.expect("frame variable argv[1]", substrs=['1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py Tue Sep  6 15:57:50 2016
@@ -5,21 +5,33 @@ Test getting return-values correctly whe
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ReturnValueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["macosx","freebsd"], archs=["i386"])
-    @expectedFailureAll(oslist=["linux"], compiler="clang", compiler_version=["<=", "3.6"], archs=["i386"])
-    @expectedFailureAll(bugnumber="llvm.org/pr25785", hostoslist=["windows"], compiler="gcc", archs=["i386"], triple='.*-android')
+    @expectedFailureAll(oslist=["macosx", "freebsd"], archs=["i386"])
+    @expectedFailureAll(
+        oslist=["linux"],
+        compiler="clang",
+        compiler_version=[
+            "<=",
+            "3.6"],
+        archs=["i386"])
+    @expectedFailureAll(
+        bugnumber="llvm.org/pr25785",
+        hostoslist=["windows"],
+        compiler="gcc",
+        archs=["i386"],
+        triple='.*-android')
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
     @add_test_categories(['pyapi'])
     def test_with_python(self):
@@ -35,7 +47,8 @@ class ReturnValueTestCase(TestBase):
         self.assertTrue(inner_sint_bkpt, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        self.process = self.target.LaunchSimple (None, None, self.get_process_working_directory())
+        self.process = self.target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(self.process, PROCESS_IS_VALID)
 
@@ -44,168 +57,178 @@ class ReturnValueTestCase(TestBase):
                         STOPPED_DUE_TO_BREAKPOINT)
 
         # Now finish, and make sure the return value is correct.
-        thread = lldbutil.get_stopped_thread (self.process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
 
         # inner_sint returns the variable value, so capture that here:
-        in_int = thread.GetFrameAtIndex(0).FindVariable ("value").GetValueAsSigned(error)
-        self.assertTrue (error.Success())
+        in_int = thread.GetFrameAtIndex(0).FindVariable(
+            "value").GetValueAsSigned(error)
+        self.assertTrue(error.Success())
 
-        thread.StepOut();
+        thread.StepOut()
 
-        self.assertTrue (self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
+        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
 
         frame = thread.GetFrameAtIndex(0)
         fun_name = frame.GetFunctionName()
-        self.assertTrue (fun_name == "outer_sint")
+        self.assertTrue(fun_name == "outer_sint")
 
         return_value = thread.GetStopReturnValue()
-        self.assertTrue (return_value.IsValid())
+        self.assertTrue(return_value.IsValid())
 
         ret_int = return_value.GetValueAsSigned(error)
-        self.assertTrue (error.Success())
-        self.assertTrue (in_int == ret_int)
+        self.assertTrue(error.Success())
+        self.assertTrue(in_int == ret_int)
 
-        # Run again and we will stop in inner_sint the second time outer_sint is called.  
-        #Then test stepping out two frames at once:
+        # Run again and we will stop in inner_sint the second time outer_sint is called.
+        # Then test stepping out two frames at once:
 
         self.process.Continue()
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process, inner_sint_bkpt)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            self.process, inner_sint_bkpt)
         self.assertTrue(len(thread_list) == 1)
         thread = thread_list[0]
 
         # We are done with the inner_sint breakpoint:
-        self.target.BreakpointDelete (inner_sint_bkpt.GetID())
+        self.target.BreakpointDelete(inner_sint_bkpt.GetID())
 
         frame = thread.GetFrameAtIndex(1)
-        fun_name = frame.GetFunctionName ()
-        self.assertTrue (fun_name == "outer_sint")
-        in_int = frame.FindVariable ("value").GetValueAsSigned(error)
-        self.assertTrue (error.Success())
+        fun_name = frame.GetFunctionName()
+        self.assertTrue(fun_name == "outer_sint")
+        in_int = frame.FindVariable("value").GetValueAsSigned(error)
+        self.assertTrue(error.Success())
 
-        thread.StepOutOfFrame (frame)
+        thread.StepOutOfFrame(frame)
 
-        self.assertTrue (self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
+        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
         frame = thread.GetFrameAtIndex(0)
         fun_name = frame.GetFunctionName()
-        self.assertTrue (fun_name == "main")
+        self.assertTrue(fun_name == "main")
 
         ret_value = thread.GetStopReturnValue()
-        self.assertTrue (return_value.IsValid())
-        ret_int = ret_value.GetValueAsSigned (error)
-        self.assertTrue (error.Success())
-        self.assertTrue (2 * in_int == ret_int)
-        
+        self.assertTrue(return_value.IsValid())
+        ret_int = ret_value.GetValueAsSigned(error)
+        self.assertTrue(error.Success())
+        self.assertTrue(2 * in_int == ret_int)
+
         # Now try some simple returns that have different types:
-        inner_float_bkpt = self.target.BreakpointCreateByName("inner_float", exe)
+        inner_float_bkpt = self.target.BreakpointCreateByName(
+            "inner_float", exe)
         self.assertTrue(inner_float_bkpt, VALID_BREAKPOINT)
         self.process.Continue()
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process, inner_float_bkpt)
-        self.assertTrue (len(thread_list) == 1)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            self.process, inner_float_bkpt)
+        self.assertTrue(len(thread_list) == 1)
         thread = thread_list[0]
 
-        self.target.BreakpointDelete (inner_float_bkpt.GetID())
+        self.target.BreakpointDelete(inner_float_bkpt.GetID())
 
         frame = thread.GetFrameAtIndex(0)
-        in_value = frame.FindVariable ("value")
-        in_float = float (in_value.GetValue())
+        in_value = frame.FindVariable("value")
+        in_float = float(in_value.GetValue())
         thread.StepOut()
 
-        self.assertTrue (self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
+        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
 
         frame = thread.GetFrameAtIndex(0)
         fun_name = frame.GetFunctionName()
-        self.assertTrue (fun_name == "outer_float")
+        self.assertTrue(fun_name == "outer_float")
 
         return_value = thread.GetStopReturnValue()
-        self.assertTrue (return_value.IsValid())
-        return_float = float (return_value.GetValue())
+        self.assertTrue(return_value.IsValid())
+        return_float = float(return_value.GetValue())
 
         self.assertTrue(in_float == return_float)
 
-        self.return_and_test_struct_value ("return_one_int")
-        self.return_and_test_struct_value ("return_two_int")
-        self.return_and_test_struct_value ("return_three_int")
-        self.return_and_test_struct_value ("return_four_int")
-        self.return_and_test_struct_value ("return_five_int")
-        
-        self.return_and_test_struct_value ("return_two_double")
-        self.return_and_test_struct_value ("return_one_double_two_float")
-        self.return_and_test_struct_value ("return_one_int_one_float_one_int")
-        
-        self.return_and_test_struct_value ("return_one_pointer")
-        self.return_and_test_struct_value ("return_two_pointer")
-        self.return_and_test_struct_value ("return_one_float_one_pointer")
-        self.return_and_test_struct_value ("return_one_int_one_pointer")
-        self.return_and_test_struct_value ("return_three_short_one_float")
-
-        self.return_and_test_struct_value ("return_one_int_one_double")
-        self.return_and_test_struct_value ("return_one_int_one_double_one_int")
-        self.return_and_test_struct_value ("return_one_short_one_double_one_short")
-        self.return_and_test_struct_value ("return_one_float_one_int_one_float")
-        self.return_and_test_struct_value ("return_two_float")
-        # I am leaving out the packed test until we have a way to tell CLANG 
+        self.return_and_test_struct_value("return_one_int")
+        self.return_and_test_struct_value("return_two_int")
+        self.return_and_test_struct_value("return_three_int")
+        self.return_and_test_struct_value("return_four_int")
+        self.return_and_test_struct_value("return_five_int")
+
+        self.return_and_test_struct_value("return_two_double")
+        self.return_and_test_struct_value("return_one_double_two_float")
+        self.return_and_test_struct_value("return_one_int_one_float_one_int")
+
+        self.return_and_test_struct_value("return_one_pointer")
+        self.return_and_test_struct_value("return_two_pointer")
+        self.return_and_test_struct_value("return_one_float_one_pointer")
+        self.return_and_test_struct_value("return_one_int_one_pointer")
+        self.return_and_test_struct_value("return_three_short_one_float")
+
+        self.return_and_test_struct_value("return_one_int_one_double")
+        self.return_and_test_struct_value("return_one_int_one_double_one_int")
+        self.return_and_test_struct_value(
+            "return_one_short_one_double_one_short")
+        self.return_and_test_struct_value("return_one_float_one_int_one_float")
+        self.return_and_test_struct_value("return_two_float")
+        # I am leaving out the packed test until we have a way to tell CLANG
         # about alignment when reading DWARF for packed types.
         #self.return_and_test_struct_value ("return_one_int_one_double_packed")
-        self.return_and_test_struct_value ("return_one_int_one_long")
+        self.return_and_test_struct_value("return_one_int_one_long")
 
         # icc and gcc don't support this extension.
         if self.getCompiler().endswith('clang'):
-            self.return_and_test_struct_value ("return_vector_size_float32_8")
-            self.return_and_test_struct_value ("return_vector_size_float32_16")
-            self.return_and_test_struct_value ("return_vector_size_float32_32")
-            self.return_and_test_struct_value ("return_ext_vector_size_float32_2")
-            self.return_and_test_struct_value ("return_ext_vector_size_float32_4")
-            self.return_and_test_struct_value ("return_ext_vector_size_float32_8")
+            self.return_and_test_struct_value("return_vector_size_float32_8")
+            self.return_and_test_struct_value("return_vector_size_float32_16")
+            self.return_and_test_struct_value("return_vector_size_float32_32")
+            self.return_and_test_struct_value(
+                "return_ext_vector_size_float32_2")
+            self.return_and_test_struct_value(
+                "return_ext_vector_size_float32_4")
+            self.return_and_test_struct_value(
+                "return_ext_vector_size_float32_8")
 
-    def return_and_test_struct_value (self, func_name):
+    def return_and_test_struct_value(self, func_name):
         """Pass in the name of the function to return from - takes in value, returns value."""
-        
+
         # Set the breakpoint, run to it, finish out.
-        bkpt = self.target.BreakpointCreateByName (func_name)
-        self.assertTrue (bkpt.GetNumResolvedLocations() > 0)
+        bkpt = self.target.BreakpointCreateByName(func_name)
+        self.assertTrue(bkpt.GetNumResolvedLocations() > 0)
 
-        self.process.Continue ()
+        self.process.Continue()
 
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process, bkpt)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            self.process, bkpt)
 
-        self.assertTrue (len(thread_list) == 1)
+        self.assertTrue(len(thread_list) == 1)
         thread = thread_list[0]
 
-        self.target.BreakpointDelete (bkpt.GetID())
+        self.target.BreakpointDelete(bkpt.GetID())
+
+        in_value = thread.GetFrameAtIndex(0).FindVariable("value")
 
-        in_value = thread.GetFrameAtIndex(0).FindVariable ("value")
-        
-        self.assertTrue (in_value.IsValid())
+        self.assertTrue(in_value.IsValid())
         num_in_children = in_value.GetNumChildren()
 
         # This is a little hokey, but if we don't get all the children now, then
         # once we've stepped we won't be able to get them?
-        
+
         for idx in range(0, num_in_children):
-            in_child = in_value.GetChildAtIndex (idx)
+            in_child = in_value.GetChildAtIndex(idx)
             in_child_str = in_child.GetValue()
 
         thread.StepOut()
-        
-        self.assertTrue (self.process.GetState() == lldb.eStateStopped)
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
+
+        self.assertTrue(self.process.GetState() == lldb.eStateStopped)
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
 
         # Assuming all these functions step out to main.  Could figure out the caller dynamically
         # if that would add something to the test.
         frame = thread.GetFrameAtIndex(0)
         fun_name = frame.GetFunctionName()
-        self.assertTrue (fun_name == "main")
+        self.assertTrue(fun_name == "main")
 
         frame = thread.GetFrameAtIndex(0)
         ret_value = thread.GetStopReturnValue()
 
-        self.assertTrue (ret_value.IsValid())
+        self.assertTrue(ret_value.IsValid())
 
         num_ret_children = ret_value.GetNumChildren()
-        self.assertTrue (num_in_children == num_ret_children)
+        self.assertTrue(num_in_children == num_ret_children)
         for idx in range(0, num_ret_children):
             in_child = in_value.GetChildAtIndex(idx)
             ret_child = ret_value.GetChildAtIndex(idx)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Set the contents of variables and regist
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class SetDataTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,41 +24,48 @@ class SetDataTestCase(TestBase):
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
-        self.runCmd("br s -p First");
-        self.runCmd("br s -p Second");
+        self.runCmd("br s -p First")
+        self.runCmd("br s -p Second")
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         self.expect("p myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['2'])
+                    substrs=['2'])
 
         process = self.dbg.GetSelectedTarget().GetProcess()
         frame = process.GetSelectedThread().GetFrameAtIndex(0)
 
         x = frame.FindVariable("myFoo").GetChildMemberWithName("x")
 
-        my_data = lldb.SBData.CreateDataFromSInt32Array(lldb.eByteOrderLittle, 8, [4])
+        my_data = lldb.SBData.CreateDataFromSInt32Array(
+            lldb.eByteOrderLittle, 8, [4])
         err = lldb.SBError()
 
-        self.assertTrue (x.SetData(my_data, err))
+        self.assertTrue(x.SetData(my_data, err))
 
         self.runCmd("continue")
 
         self.expect("p myFoo.x", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['4'])
+                    substrs=['4'])
 
         frame = process.GetSelectedThread().GetFrameAtIndex(0)
 
         x = frame.FindVariable("string")
 
         if process.GetAddressByteSize() == 8:
-            my_data = lldb.SBData.CreateDataFromUInt64Array(process.GetByteOrder(), 8, [0])
+            my_data = lldb.SBData.CreateDataFromUInt64Array(
+                process.GetByteOrder(), 8, [0])
         else:
-            my_data = lldb.SBData.CreateDataFromUInt32Array(process.GetByteOrder(), 4, [0])
-        
+            my_data = lldb.SBData.CreateDataFromUInt32Array(
+                process.GetByteOrder(), 4, [0])
+
         err = lldb.SBError()
 
-        self.assertTrue (x.SetData(my_data, err))
+        self.assertTrue(x.SetData(my_data, err))
 
-        self.expect("fr var -d run-target string", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['NSString *', 'nil'])
+        self.expect(
+            "fr var -d run-target string",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'NSString *',
+                'nil'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py Tue Sep  6 15:57:50 2016
@@ -3,8 +3,9 @@
 from __future__ import print_function
 
 
-
-import os, time, signal
+import os
+import time
+import signal
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -21,8 +22,10 @@ class SendSignalTestCase(TestBase):
         # Find the line number to break inside main().
         self.line = line_number('main.c', 'Put breakpoint here')
 
-    @expectedFailureAll(oslist=['freebsd'], bugnumber="llvm.org/pr23318: does not report running state")
-    @skipIfWindows # Windows does not support signals
+    @expectedFailureAll(
+        oslist=['freebsd'],
+        bugnumber="llvm.org/pr23318: does not report running state")
+    @skipIfWindows  # Windows does not support signals
     def test_with_run_command(self):
         """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process."""
         self.build()
@@ -57,14 +60,17 @@ class SendSignalTestCase(TestBase):
 
         self.runCmd("process handle -n False -p True -s True SIGUSR1")
 
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid(), "We hit the first breakpoint.")
 
         # After resuming the process, send it a SIGUSR1 signal.
 
         self.setAsync(True)
 
-        self.assertTrue(process_listener.IsValid(), "Got a good process listener")
+        self.assertTrue(
+            process_listener.IsValid(),
+            "Got a good process listener")
 
         # Disable our breakpoint, we don't want to hit it anymore...
         breakpoint.SetEnabled(False)
@@ -88,9 +94,12 @@ class SendSignalTestCase(TestBase):
         self.assertTrue(len(threads) == 1, "One thread stopped for a signal.")
         thread = threads[0]
 
-        self.assertTrue(thread.GetStopReasonDataCount() >= 1, "There was data in the event.")
-        self.assertTrue(thread.GetStopReasonDataAtIndex(0) == lldbutil.get_signal_number('SIGUSR1'),
-                "The stop signal was SIGUSR1")
+        self.assertTrue(
+            thread.GetStopReasonDataCount() >= 1,
+            "There was data in the event.")
+        self.assertTrue(
+            thread.GetStopReasonDataAtIndex(0) == lldbutil.get_signal_number('SIGUSR1'),
+            "The stop signal was SIGUSR1")
 
     def match_state(self, process_listener, expected_state):
         num_seconds = 5

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py Tue Sep  6 15:57:50 2016
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-
 import os
 import re
 
@@ -17,9 +16,11 @@ class HandleSegvTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfWindows # signals do not exist on Windows
+    @skipIfWindows  # signals do not exist on Windows
     @skipIfDarwin
-    @expectedFailureAll(oslist=['freebsd'], bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
+    @expectedFailureAll(
+        oslist=['freebsd'],
+        bugnumber="llvm.org/pr23699 SIGSEGV is reported as exception, not signal")
     def test_inferior_handle_sigsegv(self):
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
@@ -29,15 +30,21 @@ class HandleSegvTestCase(TestBase):
         self.assertTrue(target, VALID_TARGET)
 
         # launch
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
         self.assertEqual(process.GetState(), lldb.eStateStopped)
         signo = process.GetUnixSignals().GetSignalNumberFromName("SIGSEGV")
 
         thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(thread and thread.IsValid(), "Thread should be stopped due to a signal")
-        self.assertTrue(thread.GetStopReasonDataCount() >= 1, "There was data in the event.")
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0), signo, "The stop signal was SIGSEGV")
+        self.assertTrue(
+            thread and thread.IsValid(),
+            "Thread should be stopped due to a signal")
+        self.assertTrue(
+            thread.GetStopReasonDataCount() >= 1,
+            "There was data in the event.")
+        self.assertEqual(thread.GetStopReasonDataAtIndex(0),
+                         signo, "The stop signal was SIGSEGV")
 
         # Continue until we exit.
         process.Continue()

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py Tue Sep  6 15:57:50 2016
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-
 import os
 import lldb
 import re
@@ -13,7 +12,7 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
 
- at skipIfWindows # signals do not exist on Windows
+ at skipIfWindows  # signals do not exist on Windows
 class RaiseTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,9 +20,10 @@ class RaiseTestCase(TestBase):
     def test_sigstop(self):
         self.build()
         self.signal_test('SIGSTOP', False)
-        # passing of SIGSTOP is not correctly handled, so not testing that scenario: https://llvm.org/bugs/show_bug.cgi?id=23574
+        # passing of SIGSTOP is not correctly handled, so not testing that
+        # scenario: https://llvm.org/bugs/show_bug.cgi?id=23574
 
-    @skipIfDarwin # darwin does not support real time signals
+    @skipIfDarwin  # darwin does not support real time signals
     @skipIfTargetAndroid()
     def test_sigsigrtmin(self):
         self.build()
@@ -31,20 +31,25 @@ class RaiseTestCase(TestBase):
 
     def launch(self, target, signal):
         # launch the process, do not stop at entry point.
-        process = target.LaunchSimple([signal], None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            [signal], None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
         self.assertEqual(process.GetState(), lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "Thread should be stopped due to a breakpoint")
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            thread.IsValid(),
+            "Thread should be stopped due to a breakpoint")
         return process
 
     def set_handle(self, signal, pass_signal, stop_at_signal, notify_signal):
         return_obj = lldb.SBCommandReturnObject()
         self.dbg.GetCommandInterpreter().HandleCommand(
-                "process handle %s -p %s -s %s -n %s" % (signal, pass_signal, stop_at_signal, notify_signal),
-                return_obj)
-        self.assertTrue (return_obj.Succeeded() == True, "Setting signal handling failed")
-
+            "process handle %s -p %s -s %s -n %s" %
+            (signal, pass_signal, stop_at_signal, notify_signal), return_obj)
+        self.assertTrue(
+            return_obj.Succeeded(),
+            "Setting signal handling failed")
 
     def signal_test(self, signal, test_passing):
         """Test that we handle inferior raising signals"""
@@ -61,9 +66,12 @@ class RaiseTestCase(TestBase):
 
         # retrieve default signal disposition
         return_obj = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand("process handle %s " % signal, return_obj)
-        match = re.match('NAME *PASS *STOP *NOTIFY.*(false|true) *(false|true) *(false|true)',
-                return_obj.GetOutput(), re.IGNORECASE | re.DOTALL)
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle %s " % signal, return_obj)
+        match = re.match(
+            'NAME *PASS *STOP *NOTIFY.*(false|true) *(false|true) *(false|true)',
+            return_obj.GetOutput(),
+            re.IGNORECASE | re.DOTALL)
         if not match:
             self.fail('Unable to retrieve default signal disposition.')
         default_pass = match.group(1)
@@ -75,10 +83,14 @@ class RaiseTestCase(TestBase):
         process.Continue()
         self.assertEqual(process.GetState(), lldb.eStateStopped)
         thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(thread.IsValid(), "Thread should be stopped due to a signal")
-        self.assertTrue(thread.GetStopReasonDataCount() >= 1, "There was data in the event.")
+        self.assertTrue(
+            thread.IsValid(),
+            "Thread should be stopped due to a signal")
+        self.assertTrue(
+            thread.GetStopReasonDataCount() >= 1,
+            "There was data in the event.")
         self.assertEqual(thread.GetStopReasonDataAtIndex(0), signo,
-                "The stop signal was %s" % signal)
+                         "The stop signal was %s" % signal)
 
         # Continue until we exit.
         process.Continue()
@@ -88,18 +100,27 @@ class RaiseTestCase(TestBase):
         # launch again
         process = self.launch(target, signal)
 
-        # Make sure we do not stop at the signal. We should still get the notification.
+        # Make sure we do not stop at the signal. We should still get the
+        # notification.
         self.set_handle(signal, "false", "false", "true")
-        self.expect("process continue", substrs=["stopped and restarted", signal])
+        self.expect(
+            "process continue",
+            substrs=[
+                "stopped and restarted",
+                signal])
         self.assertEqual(process.GetState(), lldb.eStateExited)
         self.assertEqual(process.GetExitStatus(), 0)
 
         # launch again
         process = self.launch(target, signal)
 
-        # Make sure we do not stop at the signal, and we do not get the notification.
+        # Make sure we do not stop at the signal, and we do not get the
+        # notification.
         self.set_handle(signal, "false", "false", "false")
-        self.expect("process continue", substrs=["stopped and restarted"], matching=False)
+        self.expect(
+            "process continue",
+            substrs=["stopped and restarted"],
+            matching=False)
         self.assertEqual(process.GetState(), lldb.eStateExited)
         self.assertEqual(process.GetExitStatus(), 0)
 
@@ -116,11 +137,17 @@ class RaiseTestCase(TestBase):
         process.Continue()
         self.assertEqual(process.GetState(), lldb.eStateStopped)
         thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(thread.IsValid(), "Thread should be stopped due to a signal")
-        self.assertTrue(thread.GetStopReasonDataCount() >= 1, "There was data in the event.")
-        self.assertEqual(thread.GetStopReasonDataAtIndex(0),
-                process.GetUnixSignals().GetSignalNumberFromName(signal),
-                "The stop signal was %s" % signal)
+        self.assertTrue(
+            thread.IsValid(),
+            "Thread should be stopped due to a signal")
+        self.assertTrue(
+            thread.GetStopReasonDataCount() >= 1,
+            "There was data in the event.")
+        self.assertEqual(
+            thread.GetStopReasonDataAtIndex(0),
+            process.GetUnixSignals().GetSignalNumberFromName(signal),
+            "The stop signal was %s" %
+            signal)
 
         # Continue until we exit. The process should receive the signal.
         process.Continue()
@@ -133,7 +160,11 @@ class RaiseTestCase(TestBase):
         # Make sure we do not stop at the signal. We should still get the notification. Process
         # should receive the signal.
         self.set_handle(signal, "true", "false", "true")
-        self.expect("process continue", substrs=["stopped and restarted", signal])
+        self.expect(
+            "process continue",
+            substrs=[
+                "stopped and restarted",
+                signal])
         self.assertEqual(process.GetState(), lldb.eStateExited)
         self.assertEqual(process.GetExitStatus(), signo)
 
@@ -143,14 +174,20 @@ class RaiseTestCase(TestBase):
         # Make sure we do not stop at the signal, and we do not get the notification. Process
         # should receive the signal.
         self.set_handle(signal, "true", "false", "false")
-        self.expect("process continue", substrs=["stopped and restarted"], matching=False)
+        self.expect(
+            "process continue",
+            substrs=["stopped and restarted"],
+            matching=False)
         self.assertEqual(process.GetState(), lldb.eStateExited)
         self.assertEqual(process.GetExitStatus(), signo)
 
         # reset signal handling to default
         self.set_handle(signal, default_pass, default_stop, default_notify)
 
-    @expectedFailureAll(oslist=["linux"]+getDarwinOSTriples(), bugnumber="llvm.org/pr20231")
+    @expectedFailureAll(
+        oslist=["linux"] +
+        getDarwinOSTriples(),
+        bugnumber="llvm.org/pr20231")
     def test_restart_bug(self):
         """Test that we catch a signal in the edge case where the process receives it while we are
         about to interrupt it"""
@@ -167,16 +204,16 @@ class RaiseTestCase(TestBase):
         self.dbg.SetAsync(True)
         error = lldb.SBError()
         listener = lldb.SBListener("my listener")
-        process = target.Launch (listener,
-                ["SIGSTOP"], # argv
-                None,        # envp
-                None,        # stdin_path
-                None,        # stdout_path
-                None,        # stderr_path
-                None,        # working directory
-                0,           # launch flags
-                False,       # Stop at entry
-                error)       # error
+        process = target.Launch(listener,
+                                ["SIGSTOP"],  # argv
+                                None,        # envp
+                                None,        # stdin_path
+                                None,        # stdout_path
+                                None,        # stderr_path
+                                None,        # working directory
+                                0,           # launch flags
+                                False,       # Stop at entry
+                                error)       # error
 
         self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
 
@@ -187,12 +224,18 @@ class RaiseTestCase(TestBase):
         # The last WaitForEvent call will time out after 2 seconds.
         while listener.WaitForEvent(2, event):
             if self.TraceOn():
-                print("Process changing state to:", self.dbg.StateAsCString(process.GetStateFromEvent(event)))
+                print(
+                    "Process changing state to:",
+                    self.dbg.StateAsCString(
+                        process.GetStateFromEvent(event)))
 
         # now the process should be stopped
-        self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
-        self.assertEqual(len(lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)), 1,
-                "A thread should be stopped at breakpoint")
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
+        self.assertEqual(len(lldbutil.get_threads_stopped_at_breakpoint(
+            process, bkpt)), 1, "A thread should be stopped at breakpoint")
 
         # Remove all breakpoints. This makes sure we don't have to single-step over them when we
         # resume the process below
@@ -200,23 +243,32 @@ class RaiseTestCase(TestBase):
 
         # resume the process and immediately try to set another breakpoint. When using the remote
         # stub, this will trigger a request to stop the process just as it is about to stop
-        # naturally due to a SIGSTOP signal it raises. Make sure we do not lose this signal.
+        # naturally due to a SIGSTOP signal it raises. Make sure we do not lose
+        # this signal.
         process.Continue()
-        self.assertTrue(target.BreakpointCreateByName("handler").IsValid(), VALID_BREAKPOINT)
+        self.assertTrue(target.BreakpointCreateByName(
+            "handler").IsValid(), VALID_BREAKPOINT)
 
         # Clear the events again
         while listener.WaitForEvent(2, event):
             if self.TraceOn():
-                print("Process changing state to:", self.dbg.StateAsCString(process.GetStateFromEvent(event)))
+                print(
+                    "Process changing state to:",
+                    self.dbg.StateAsCString(
+                        process.GetStateFromEvent(event)))
 
         # The process should be stopped due to a signal
         self.assertEqual(process.GetState(), lldb.eStateStopped)
         thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
-        self.assertTrue(thread.IsValid(), "Thread should be stopped due to a signal")
-        self.assertTrue(thread.GetStopReasonDataCount() >= 1, "There was data in the event.")
+        self.assertTrue(
+            thread.IsValid(),
+            "Thread should be stopped due to a signal")
+        self.assertTrue(
+            thread.GetStopReasonDataCount() >= 1,
+            "There was data in the event.")
         signo = process.GetUnixSignals().GetSignalNumberFromName("SIGSTOP")
         self.assertEqual(thread.GetStopReasonDataAtIndex(0), signo,
-                "The stop signal was %s" % signal)
+                         "The stop signal was %s" % signal)
 
         # We are done
         process.Kill()

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/single-quote-in-filename-to-lldb/TestSingleQuoteInFilename.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,13 @@ Test the lldb command line takes a filen
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class SingleQuoteInCommandLineTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -27,7 +27,9 @@ class SingleQuoteInCommandLineTestCase(T
         except:
             pass
 
-    @expectedFailureAll(hostoslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    @expectedFailureAll(
+        hostoslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     @no_debug_info_test
     def test_lldb_invocation_with_single_quote_in_filename(self):
         """Test that 'lldb my_file_name' works where my_file_name is a string with a single quote char in it."""
@@ -39,7 +41,9 @@ class SingleQuoteInCommandLineTestCase(T
         prompt = "(lldb) "
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('%s %s "%s"' % (lldbtest_config.lldbExec, self.lldbOption, self.myexe))
+        self.child = pexpect.spawn(
+            '%s %s "%s"' %
+            (lldbtest_config.lldbExec, self.lldbOption, self.myexe))
         child = self.child
         child.setecho(True)
         # Turn on logging for input/output to/from the child.
@@ -58,7 +62,7 @@ class SingleQuoteInCommandLineTestCase(T
         # stop further logging.
         child.logfile_send = None
         child.logfile_read = None
-        
+
         with open('child_send.txt', 'r') as fs:
             if self.TraceOn():
                 print("\n\nContents of child_send.txt:")
@@ -70,4 +74,4 @@ class SingleQuoteInCommandLineTestCase(T
                 print(from_child)
 
             self.expect(from_child, exe=False,
-                substrs = ["Current executable set to"])
+                        substrs=["Current executable set to"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py Tue Sep  6 15:57:50 2016
@@ -5,7 +5,6 @@ Test thread step-in, step-over and step-
 from __future__ import print_function
 
 
-
 import os
 import re
 import sys
@@ -15,6 +14,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ReturnValueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -27,8 +27,15 @@ class ReturnValueTestCase(TestBase):
         self.do_step_out_past_nodebug()
 
     @add_test_categories(['pyapi'])
-    @decorators.expectedFailureAll(compiler="gcc", bugnumber="llvm.org/pr28549")
-    @decorators.expectedFailureAll(compiler="clang", compiler_version=[">=", "3.9"], archs=["i386"], bugnumber="llvm.org/pr28549")
+    @decorators.expectedFailureAll(
+        compiler="gcc", bugnumber="llvm.org/pr28549")
+    @decorators.expectedFailureAll(
+        compiler="clang",
+        compiler_version=[
+            ">=",
+            "3.9"],
+        archs=["i386"],
+        bugnumber="llvm.org/pr28549")
     def test_step_over_with_python(self):
         """Test stepping over using avoid-no-debug with dwarf."""
         self.build()
@@ -36,82 +43,111 @@ class ReturnValueTestCase(TestBase):
         self.do_step_over_past_nodebug()
 
     @add_test_categories(['pyapi'])
-    @decorators.expectedFailureAll(compiler="gcc", bugnumber="llvm.org/pr28549")
-    @decorators.expectedFailureAll(compiler="clang", compiler_version=[">=", "3.9"], archs=["i386"], bugnumber="llvm.org/pr28549")
+    @decorators.expectedFailureAll(
+        compiler="gcc", bugnumber="llvm.org/pr28549")
+    @decorators.expectedFailureAll(
+        compiler="clang",
+        compiler_version=[
+            ">=",
+            "3.9"],
+        archs=["i386"],
+        bugnumber="llvm.org/pr28549")
     def test_step_in_with_python(self):
         """Test stepping in using avoid-no-debug with dwarf."""
         self.build()
         self.get_to_starting_point()
         self.do_step_in_past_nodebug()
 
-    def setUp (self):
+    def setUp(self):
         TestBase.setUp(self)
         self.main_source = "with-debug.c"
         self.main_source_spec = lldb.SBFileSpec("with-debug.c")
-        self.dbg.HandleCommand ("settings set target.process.thread.step-out-avoid-nodebug true")
+        self.dbg.HandleCommand(
+            "settings set target.process.thread.step-out-avoid-nodebug true")
 
-    def tearDown (self):
-        self.dbg.HandleCommand ("settings set target.process.thread.step-out-avoid-nodebug false")
+    def tearDown(self):
+        self.dbg.HandleCommand(
+            "settings set target.process.thread.step-out-avoid-nodebug false")
         TestBase.tearDown(self)
 
-    def hit_correct_line (self, pattern):
-        target_line = line_number (self.main_source, pattern)
-        self.assertTrue (target_line != 0, "Could not find source pattern " + pattern)
+    def hit_correct_line(self, pattern):
+        target_line = line_number(self.main_source, pattern)
+        self.assertTrue(
+            target_line != 0,
+            "Could not find source pattern " +
+            pattern)
         cur_line = self.thread.frames[0].GetLineEntry().GetLine()
-        self.assertTrue (cur_line == target_line, "Stepped to line %d instead of expected %d with pattern '%s'."%(cur_line, target_line, pattern))
+        self.assertTrue(
+            cur_line == target_line,
+            "Stepped to line %d instead of expected %d with pattern '%s'." %
+            (cur_line,
+             target_line,
+             pattern))
 
-    def hit_correct_function (self, pattern):
+    def hit_correct_function(self, pattern):
         name = self.thread.frames[0].GetFunctionName()
-        self.assertTrue (pattern in name, "Got to '%s' not the expected function '%s'."%(name, pattern))
+        self.assertTrue(
+            pattern in name, "Got to '%s' not the expected function '%s'." %
+            (name, pattern))
 
-    def get_to_starting_point (self):
+    def get_to_starting_point(self):
         exe = os.path.join(os.getcwd(), "a.out")
         error = lldb.SBError()
 
         self.target = self.dbg.CreateTarget(exe)
         self.assertTrue(self.target, VALID_TARGET)
 
-        inner_bkpt = self.target.BreakpointCreateBySourceRegex("Stop here and step out of me", self.main_source_spec)
+        inner_bkpt = self.target.BreakpointCreateBySourceRegex(
+            "Stop here and step out of me", self.main_source_spec)
         self.assertTrue(inner_bkpt, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        self.process = self.target.LaunchSimple (None, None, self.get_process_working_directory())
+        self.process = self.target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(self.process, PROCESS_IS_VALID)
 
         # Now finish, and make sure the return value is correct.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (self.process, inner_bkpt)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            self.process, inner_bkpt)
         self.assertTrue(len(threads) == 1, "Stopped at inner breakpoint.")
         self.thread = threads[0]
 
     def do_step_out_past_nodebug(self):
         # The first step out takes us to the called_from_nodebug frame, just to make sure setting
-        # step-out-avoid-nodebug doesn't change the behavior in frames with debug info.
+        # step-out-avoid-nodebug doesn't change the behavior in frames with
+        # debug info.
         self.thread.StepOut()
-        self.hit_correct_line ("intermediate_return_value = called_from_nodebug_actual(some_value)")
+        self.hit_correct_line(
+            "intermediate_return_value = called_from_nodebug_actual(some_value)")
         self.thread.StepOut()
-        self.hit_correct_line ("int return_value = no_debug_caller(5, called_from_nodebug)")
+        self.hit_correct_line(
+            "int return_value = no_debug_caller(5, called_from_nodebug)")
 
-    def do_step_over_past_nodebug (self):
+    def do_step_over_past_nodebug(self):
         self.thread.StepOver()
-        self.hit_correct_line ("intermediate_return_value = called_from_nodebug_actual(some_value)")
+        self.hit_correct_line(
+            "intermediate_return_value = called_from_nodebug_actual(some_value)")
         self.thread.StepOver()
-        self.hit_correct_line ("return intermediate_return_value")
+        self.hit_correct_line("return intermediate_return_value")
         self.thread.StepOver()
         # Note, lldb doesn't follow gdb's distinction between "step-out" and "step-over/step-in"
         # when exiting a frame.  In all cases we leave the pc at the point where we exited the
         # frame.  In gdb, step-over/step-in move to the end of the line they stepped out to.
         # If we ever change this we will need to fix this test.
-        self.hit_correct_line ("int return_value = no_debug_caller(5, called_from_nodebug)")
+        self.hit_correct_line(
+            "int return_value = no_debug_caller(5, called_from_nodebug)")
 
-    def do_step_in_past_nodebug (self):
+    def do_step_in_past_nodebug(self):
         self.thread.StepInto()
-        self.hit_correct_line ("intermediate_return_value = called_from_nodebug_actual(some_value)")
+        self.hit_correct_line(
+            "intermediate_return_value = called_from_nodebug_actual(some_value)")
         self.thread.StepInto()
-        self.hit_correct_line ("return intermediate_return_value")
+        self.hit_correct_line("return intermediate_return_value")
         self.thread.StepInto()
         # Note, lldb doesn't follow gdb's distinction between "step-out" and "step-over/step-in"
         # when exiting a frame.  In all cases we leave the pc at the point where we exited the
         # frame.  In gdb, step-over/step-in move to the end of the line they stepped out to.
         # If we ever change this we will need to fix this test.
-        self.hit_correct_line ("int return_value = no_debug_caller(5, called_from_nodebug)")
+        self.hit_correct_line(
+            "int return_value = no_debug_caller(5, called_from_nodebug)")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookCmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookCmd.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookCmd.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookCmd.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,13 @@ Test lldb target stop-hook command.
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class StopHookCmdTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,9 +20,15 @@ class StopHookCmdTestCase(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line numbers inside main.cpp.
-        self.begl = line_number('main.cpp', '// Set breakpoint here to test target stop-hook.')
-        self.endl = line_number('main.cpp', '// End of the line range for which stop-hook is to be run.')
-        self.line = line_number('main.cpp', '// Another breakpoint which is outside of the stop-hook range.')
+        self.begl = line_number(
+            'main.cpp',
+            '// Set breakpoint here to test target stop-hook.')
+        self.endl = line_number(
+            'main.cpp',
+            '// End of the line range for which stop-hook is to be run.')
+        self.line = line_number(
+            'main.cpp',
+            '// Another breakpoint which is outside of the stop-hook range.')
 
     @no_debug_info_test
     def test_not_crashing_if_no_target(self):
@@ -35,32 +41,37 @@ class StopHookCmdTestCase(TestBase):
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.begl, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.begl, num_expected_locations=1, loc_exact=True)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
-        self.runCmd("target stop-hook add -f main.cpp -l %d -e %d -o 'expr ptr'" % (self.begl, self.endl))
+        self.runCmd(
+            "target stop-hook add -f main.cpp -l %d -e %d -o 'expr ptr'" %
+            (self.begl, self.endl))
 
         self.expect('target stop-hook list', 'Stop Hook added successfully',
-            substrs = ['State: enabled',
-                       'expr ptr'])
+                    substrs=['State: enabled',
+                             'expr ptr'])
 
         self.runCmd('target stop-hook disable')
 
         self.expect('target stop-hook list', 'Stop Hook disabled successfully',
-            substrs = ['State: disabled',
-                       'expr ptr'])
+                    substrs=['State: disabled',
+                             'expr ptr'])
 
         self.runCmd('target stop-hook enable')
 
         self.expect('target stop-hook list', 'Stop Hook enabled successfully',
-            substrs = ['State: enabled',
-                       'expr ptr'])
+                    substrs=['State: enabled',
+                             'expr ptr'])
 
         self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear auto-confirm"))
 
         self.runCmd('target stop-hook delete')
 
         self.expect('target stop-hook list', 'Stop Hook deleted successfully',
-            substrs = ['No stop hooks.'])
+                    substrs=['No stop hooks.'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py Tue Sep  6 15:57:50 2016
@@ -5,7 +5,6 @@ Test lldb target stop-hook mechanism to
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
@@ -13,6 +12,7 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbutil
 
+
 class StopHookMechanismTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,14 +21,24 @@ class StopHookMechanismTestCase(TestBase
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line numbers inside main.cpp.
-        self.begl = line_number('main.cpp', '// Set breakpoint here to test target stop-hook.')
-        self.endl = line_number('main.cpp', '// End of the line range for which stop-hook is to be run.')
-        self.correct_step_line = line_number ('main.cpp', '// We should stop here after stepping.')
-        self.line = line_number('main.cpp', '// Another breakpoint which is outside of the stop-hook range.')
-
-    @skipIfFreeBSD # llvm.org/pr15037
-    @expectedFlakeyLinux('llvm.org/pr15037') # stop-hooks sometimes fail to fire on Linux
-    @expectedFailureAll(hostoslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+        self.begl = line_number(
+            'main.cpp',
+            '// Set breakpoint here to test target stop-hook.')
+        self.endl = line_number(
+            'main.cpp',
+            '// End of the line range for which stop-hook is to be run.')
+        self.correct_step_line = line_number(
+            'main.cpp', '// We should stop here after stepping.')
+        self.line = line_number(
+            'main.cpp',
+            '// Another breakpoint which is outside of the stop-hook range.')
+
+    @skipIfFreeBSD  # llvm.org/pr15037
+    # stop-hooks sometimes fail to fire on Linux
+    @expectedFlakeyLinux('llvm.org/pr15037')
+    @expectedFailureAll(
+        hostoslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test(self):
         """Test the stop-hook mechanism."""
         self.build()
@@ -40,7 +50,8 @@ class StopHookMechanismTestCase(TestBase
         add_prompt1 = "> "
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('%s %s' % (lldbtest_config.lldbExec, self.lldbOption))
+        self.child = pexpect.spawn('%s %s' %
+                                   (lldbtest_config.lldbExec, self.lldbOption))
         child = self.child
         # Turn on logging for what the child sends back.
         if self.TraceOn():
@@ -48,11 +59,17 @@ class StopHookMechanismTestCase(TestBase
 
         if lldb.remote_platform:
             child.expect_exact(prompt)
-            child.sendline('platform select %s' % lldb.remote_platform.GetName())
+            child.sendline(
+                'platform select %s' %
+                lldb.remote_platform.GetName())
             child.expect_exact(prompt)
-            child.sendline('platform connect %s' % configuration.lldb_platform_url)
+            child.sendline(
+                'platform connect %s' %
+                configuration.lldb_platform_url)
             child.expect_exact(prompt)
-            child.sendline('platform settings -w %s' % configuration.lldb_platform_working_dir)
+            child.sendline(
+                'platform settings -w %s' %
+                configuration.lldb_platform_working_dir)
 
         child.expect_exact(prompt)
         child.sendline('target create %s' % exe)
@@ -63,7 +80,9 @@ class StopHookMechanismTestCase(TestBase
         child.expect_exact(prompt)
         child.sendline('breakpoint set -f main.cpp -l %d' % self.line)
         child.expect_exact(prompt)
-        child.sendline('target stop-hook add -f main.cpp -l %d -e %d' % (self.begl, self.endl))
+        child.sendline(
+            'target stop-hook add -f main.cpp -l %d -e %d' %
+            (self.begl, self.endl))
         child.expect_exact(add_prompt)
         child.expect_exact(add_prompt1)
         child.sendline('expr ptr')
@@ -72,10 +91,12 @@ class StopHookMechanismTestCase(TestBase
         child.expect_exact(prompt)
         child.sendline('target stop-hook list')
 
-        # Now run the program, expect to stop at the first breakpoint which is within the stop-hook range.
+        # Now run the program, expect to stop at the first breakpoint which is
+        # within the stop-hook range.
         child.expect_exact(prompt)
         child.sendline('run')
-        # Make sure we see the stop hook text from the stop of the process from the run hitting the first breakpoint
+        # Make sure we see the stop hook text from the stop of the process from
+        # the run hitting the first breakpoint
         child.expect_exact('(void *) $')
         child.expect_exact(prompt)
         child.sendline('thread step-over')
@@ -91,13 +112,16 @@ class StopHookMechanismTestCase(TestBase
         print('expecting "%s"' % at_line)
         child.expect_exact(at_line)
 
-        # Now continue the inferior, we'll stop at another breakpoint which is outside the stop-hook range.
+        # Now continue the inferior, we'll stop at another breakpoint which is
+        # outside the stop-hook range.
         child.sendline('process continue')
-        child.expect_exact('// Another breakpoint which is outside of the stop-hook range.')
-        #self.DebugPExpect(child)
+        child.expect_exact(
+            '// Another breakpoint which is outside of the stop-hook range.')
+        # self.DebugPExpect(child)
         child.sendline('thread step-over')
-        child.expect_exact('// Another breakpoint which is outside of the stop-hook range.')
-        #self.DebugPExpect(child)
+        child.expect_exact(
+            '// Another breakpoint which is outside of the stop-hook range.')
+        # self.DebugPExpect(child)
         # Verify that the 'Stop Hooks' mechanism is NOT BEING fired off.
         self.expect(child.before, exe=False, matching=False,
-            substrs = ['(void *) $'])
+                    substrs=['(void *) $'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test that lldb stop-hook works for multi
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import configuration
 from lldbsuite.test import lldbutil
 
+
 class StopHookForMultipleThreadsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,15 +24,22 @@ class StopHookForMultipleThreadsTestCase
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.first_stop = line_number(self.source, '// Set break point at this line, and add a stop-hook.')
-        self.thread_function = line_number(self.source, '// Break here to test that the stop-hook mechanism works for multiple threads.')
-        # Build dictionary to have unique executable names for each test method.
+        self.first_stop = line_number(
+            self.source, '// Set break point at this line, and add a stop-hook.')
+        self.thread_function = line_number(
+            self.source,
+            '// Break here to test that the stop-hook mechanism works for multiple threads.')
+        # Build dictionary to have unique executable names for each test
+        # method.
         self.exe_name = self.testMethodName
         self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
 
     @expectedFlakeyFreeBSD("llvm.org/pr15037")
-    @expectedFlakeyLinux("llvm.org/pr15037") # stop hooks sometimes fail to fire on Linux
-    @expectedFailureAll(hostoslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
+    # stop hooks sometimes fail to fire on Linux
+    @expectedFlakeyLinux("llvm.org/pr15037")
+    @expectedFailureAll(
+        hostoslist=["windows"],
+        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_stop_hook_multiple_threads(self):
         """Test that lldb stop-hook works for multiple threads."""
         self.build(dictionary=self.d)
@@ -42,7 +50,8 @@ class StopHookForMultipleThreadsTestCase
         prompt = "(lldb) "
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawn('%s %s' % (lldbtest_config.lldbExec, self.lldbOption))
+        self.child = pexpect.spawn('%s %s' %
+                                   (lldbtest_config.lldbExec, self.lldbOption))
         child = self.child
         # Turn on logging for what the child sends back.
         if self.TraceOn():
@@ -50,11 +59,17 @@ class StopHookForMultipleThreadsTestCase
 
         if lldb.remote_platform:
             child.expect_exact(prompt)
-            child.sendline('platform select %s' % lldb.remote_platform.GetName())
+            child.sendline(
+                'platform select %s' %
+                lldb.remote_platform.GetName())
             child.expect_exact(prompt)
-            child.sendline('platform connect %s' % configuration.lldb_platform_url)
+            child.sendline(
+                'platform connect %s' %
+                configuration.lldb_platform_url)
             child.expect_exact(prompt)
-            child.sendline('platform settings -w %s' % configuration.lldb_platform_working_dir)
+            child.sendline(
+                'platform settings -w %s' %
+                configuration.lldb_platform_working_dir)
 
         child.expect_exact(prompt)
         child.sendline('target create %s' % exe)
@@ -63,17 +78,23 @@ class StopHookForMultipleThreadsTestCase
         child.expect_exact(prompt)
         child.sendline('breakpoint set -f main.cpp -l %d' % self.first_stop)
         child.expect_exact(prompt)
-        child.sendline('breakpoint set -f main.cpp -l %d' % self.thread_function)
+        child.sendline(
+            'breakpoint set -f main.cpp -l %d' %
+            self.thread_function)
         child.expect_exact(prompt)
 
-        # Now run the program, expect to stop at the first breakpoint which is within the stop-hook range.
+        # Now run the program, expect to stop at the first breakpoint which is
+        # within the stop-hook range.
         child.sendline('run')
-        child.expect_exact("Process")   # 'Process 2415 launched', 'Process 2415 stopped'
+        # 'Process 2415 launched', 'Process 2415 stopped'
+        child.expect_exact("Process")
         child.expect_exact(prompt)
-        child.sendline('target stop-hook add -o "frame variable --show-globals g_val"')
-        child.expect_exact("Stop hook") # 'Stop hook #1 added.'
+        child.sendline(
+            'target stop-hook add -o "frame variable --show-globals g_val"')
+        child.expect_exact("Stop hook")  # 'Stop hook #1 added.'
         child.expect_exact(prompt)
 
-        # Continue and expect to find the output emitted by the firing of our stop hook.
+        # Continue and expect to find the output emitted by the firing of our
+        # stop hook.
         child.sendline('continue')
         child.expect_exact('(uint32_t) ::g_val = ')

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,13 @@ Test some target commands: create, list,
 from __future__ import print_function
 
 
-
 import lldb
 import sys
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class targetCommandTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -80,17 +80,19 @@ class targetCommandTestCase(TestBase):
                     # We will start from (index + 1) ....
                     base = int(match.group(1), 10) + 1
                     #print("base is:", base)
-                    break;
+                    break
 
         self.runCmd("target create " + exe_a, CURRENT_EXECUTABLE_SET)
         self.runCmd("run", RUN_SUCCEEDED)
 
         self.runCmd("target create " + exe_b, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line (self, 'b.c', self.line_b, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, 'b.c', self.line_b, num_expected_locations=1, loc_exact=True)
         self.runCmd("run", RUN_SUCCEEDED)
 
         self.runCmd("target create " + exe_c, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line (self, 'c.c', self.line_c, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, 'c.c', self.line_c, num_expected_locations=1, loc_exact=True)
         self.runCmd("run", RUN_SUCCEEDED)
 
         self.runCmd("target list")
@@ -100,13 +102,13 @@ class targetCommandTestCase(TestBase):
 
         self.runCmd("target select %d" % (base + 2))
         self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['c.c:%d' % self.line_c,
-                       'stop reason = breakpoint'])
+                    substrs=['c.c:%d' % self.line_c,
+                             'stop reason = breakpoint'])
 
         self.runCmd("target select %d" % (base + 1))
         self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['b.c:%d' % self.line_b,
-                       'stop reason = breakpoint'])
+                    substrs=['b.c:%d' % self.line_b,
+                             'stop reason = breakpoint'])
 
         self.runCmd("target list")
 
@@ -114,89 +116,160 @@ class targetCommandTestCase(TestBase):
         """Exercise 'target variable' command before and after starting the inferior."""
         self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET)
 
-        self.expect("target variable my_global_char", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["my_global_char", "'X'"])
-        self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['my_global_str', '"abc"'])
-        self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['my_static_int', '228'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
         self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs = ['"abc"'])
+                    substrs=['"abc"'])
         self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs = ['"abc"'])
-        self.expect("target variable *my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['a'])
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
 
         self.runCmd("b main")
         self.runCmd("run")
-        
-        self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['my_global_str', '"abc"'])
-        self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['my_static_int', '228'])
+
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
         self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs = ['"abc"'])
+                    substrs=['"abc"'])
         self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs = ['"abc"'])
-        self.expect("target variable *my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['a'])
-        self.expect("target variable my_global_char", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ["my_global_char", "'X'"])
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
 
         self.runCmd("c")
 
         # rdar://problem/9763907
         # 'target variable' command fails if the target program has been run
-        self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['my_global_str', '"abc"'])
-        self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['my_static_int', '228'])
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
         self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs = ['"abc"'])
+                    substrs=['"abc"'])
         self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs = ['"abc"'])
-        self.expect("target variable *my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['a'])
-        self.expect("target variable my_global_char", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ["my_global_char", "'X'"])
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
 
     def do_target_variable_command_no_fail(self, exe_name):
         """Exercise 'target variable' command before and after starting the inferior."""
         self.runCmd("file " + exe_name, CURRENT_EXECUTABLE_SET)
 
-        self.expect("target variable my_global_char", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["my_global_char", "'X'"])
-        self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['my_global_str', '"abc"'])
-        self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['my_static_int', '228'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
         self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs = ['"abc"'])
+                    substrs=['"abc"'])
         self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs = ['"abc"'])
-        self.expect("target variable *my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['a'])
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
 
         self.runCmd("b main")
         self.runCmd("run")
-        
+
         # New feature: you don't need to specify the variable(s) to 'target vaiable'.
-        # It will find all the global and static variables in the current compile unit.
+        # It will find all the global and static variables in the current
+        # compile unit.
         self.expect("target variable",
-            substrs = ['my_global_char',
-                       'my_global_str',
-                       'my_global_str_ptr',
-                       'my_static_int'])
-
-        self.expect("target variable my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['my_global_str', '"abc"'])
-        self.expect("target variable my_static_int", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['my_static_int', '228'])
+                    substrs=['my_global_char',
+                             'my_global_str',
+                             'my_global_str_ptr',
+                             'my_static_int'])
+
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
         self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs = ['"abc"'])
+                    substrs=['"abc"'])
         self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs = ['"abc"'])
-        self.expect("target variable *my_global_str", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['a'])
-        self.expect("target variable my_global_char", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ["my_global_char", "'X'"])
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/TestNumThreads.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,13 @@ Test number of threads.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class NumberOfThreadsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -28,18 +29,23 @@ class NumberOfThreadsTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint with 1 location.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1)
 
         # The breakpoint list should show 3 locations.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.line])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.line])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Stopped once.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ["stop reason = breakpoint 1."])
+                    substrs=["stop reason = breakpoint 1."])
 
         # Get the target process
         target = self.dbg.GetSelectedTarget()
@@ -50,4 +56,6 @@ class NumberOfThreadsTestCase(TestBase):
 
         # Using std::thread may involve extra threads, so we assert that there are
         # at least 4 rather than exactly 4.
-        self.assertTrue(num_threads >= 4, 'Number of expected threads and actual threads do not match.')
+        self.assertTrue(
+            num_threads >= 4,
+            'Number of expected threads and actual threads do not match.')

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py Tue Sep  6 15:57:50 2016
@@ -2,13 +2,15 @@
 Test regression for Bug 25251.
 """
 
-import os, time
+import os
+import time
 import unittest2
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class BreakpointAfterJoinTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -17,11 +19,13 @@ class BreakpointAfterJoinTestCase(TestBa
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number for our breakpoint.
-        self.breakpoint = line_number('ParallelTask.cpp', '// Set breakpoint here')
-    
-    @skipIfTargetAndroid(archs=["arm"]) # The android-arm compiler can't compile the inferior
-                                        # because of an issue around std::future.
-                                        # TODO: Change the test to don't depend on std::future<T>
+        self.breakpoint = line_number(
+            'ParallelTask.cpp', '// Set breakpoint here')
+
+    # The android-arm compiler can't compile the inferior
+    @skipIfTargetAndroid(archs=["arm"])
+    # because of an issue around std::future.
+    # TODO: Change the test to don't depend on std::future<T>
     def test(self):
         """Test breakpoint handling after a thread join."""
         self.build(dictionary=self.getBuildFlags())
@@ -30,23 +34,28 @@ class BreakpointAfterJoinTestCase(TestBa
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint
-        lldbutil.run_break_set_by_file_and_line (self, "ParallelTask.cpp", self.breakpoint, num_expected_locations=-1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "ParallelTask.cpp", self.breakpoint, num_expected_locations=-1)
 
         # The breakpoint list should show 1 location.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'ParallelTask.cpp', line = %d, exact_match = 0" % self.breakpoint])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'ParallelTask.cpp', line = %d, exact_match = 0" %
+                self.breakpoint])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # This should not result in a segmentation fault
         self.expect("thread backtrace all", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ["stop reason = breakpoint 1."])
+                    substrs=["stop reason = breakpoint 1."])
 
         # Run to completion
         self.runCmd("continue")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test number of threads.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class BreakpointAfterJoinTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,9 +23,15 @@ class BreakpointAfterJoinTestCase(TestBa
         # Find the line number for our breakpoint.
         self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18190 thread states not properly maintained")
     def test(self):
         """Test breakpoint handling after a thread join."""
         self.build(dictionary=self.getBuildFlags())
@@ -33,19 +40,24 @@ class BreakpointAfterJoinTestCase(TestBa
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
         # The breakpoint list should show 1 location.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.breakpoint])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.breakpoint])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Get the target process
         target = self.dbg.GetSelectedTarget()
@@ -59,12 +71,15 @@ class BreakpointAfterJoinTestCase(TestBa
         num_threads = process.GetNumThreads()
 
         # Make sure we see at least six threads
-        self.assertTrue(num_threads >= 6, 'Number of expected threads and actual threads do not match.')
+        self.assertTrue(
+            num_threads >= 6,
+            'Number of expected threads and actual threads do not match.')
 
         # Make sure all threads are stopped
         for i in range(0, num_threads):
-            self.assertTrue(process.GetThreadAtIndex(i).IsStopped(),
-                            "Thread {0} didn't stop during breakpoint.".format(i))
+            self.assertTrue(
+                process.GetThreadAtIndex(i).IsStopped(),
+                "Thread {0} didn't stop during breakpoint.".format(i))
 
         # Run to completion
         self.runCmd("continue")
@@ -75,4 +90,6 @@ class BreakpointAfterJoinTestCase(TestBa
             self.runCmd("process status")
 
         # At this point, the inferior process should have exited.
-        self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
+        self.assertTrue(
+            process.GetState() == lldb.eStateExited,
+            PROCESS_EXITED)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/TestConcurrentBreakpointDelayBreakpointOneSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/TestConcurrentBreakpointDelayBreakpointOneSignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/TestConcurrentBreakpointDelayBreakpointOneSignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_delay_breakpoint_one_signal/TestConcurrentBreakpointDelayBreakpointOneSignal.py Tue Sep  6 15:57:50 2016
@@ -12,13 +12,12 @@ class ConcurrentBreakpointDelayBreakpoin
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_breakpoint_delay_breakpoint_one_signal(self):
         """Test two threads that trigger a breakpoint (one with a 1 second delay) and one signal thread. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_breakpoint_threads=1,
                                num_delay_breakpoint_threads=1,
                                num_signal_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/TestConcurrentBreakpointOneDelayBreakpointThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/TestConcurrentBreakpointOneDelayBreakpointThreads.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/TestConcurrentBreakpointOneDelayBreakpointThreads.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoint_one_delay_breakpoint_threads/TestConcurrentBreakpointOneDelayBreakpointThreads.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,11 @@ class ConcurrentBreakpointOneDelayBreakp
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_breakpoint_one_delay_breakpoint_threads(self):
         """Test threads that trigger a breakpoint where one thread has a 1 second delay. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_breakpoint_threads=1,
                                num_delay_breakpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/breakpoints_delayed_breakpoint_one_watchpoint/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py Tue Sep  6 15:57:50 2016
@@ -8,18 +8,18 @@ from lldbsuite.test.lldbtest import Test
 
 
 @skipIfWindows
-class ConcurrentBreakpointsDelayedBreakpointOneWatchpoint(ConcurrentEventsBase):
+class ConcurrentBreakpointsDelayedBreakpointOneWatchpoint(
+        ConcurrentEventsBase):
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_breakpoints_delayed_breakpoint_one_watchpoint(self):
         """Test a breakpoint, a delayed breakpoint, and one watchpoint thread. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_breakpoint_threads=1,
                                num_delay_breakpoint_threads=1,
                                num_watchpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/TestConcurrentCrashWithBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/TestConcurrentCrashWithBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/TestConcurrentCrashWithBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_break/TestConcurrentCrashWithBreak.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,10 @@ class ConcurrentCrashWithBreak(Concurren
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_crash_with_break(self):
         """ Test a thread that crashes while another thread hits a breakpoint."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_crash_threads=1, num_breakpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/TestConcurrentCrashWithSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/TestConcurrentCrashWithSignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/TestConcurrentCrashWithSignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_signal/TestConcurrentCrashWithSignal.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,10 @@ class ConcurrentCrashWithSignal(Concurre
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_crash_with_signal(self):
         """ Test a thread that crashes while another thread generates a signal."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_crash_threads=1, num_signal_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint/TestConcurrentCrashWithWatchpoint.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,11 @@ class ConcurrentCrashWithWatchpoint(Conc
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_crash_with_watchpoint(self):
         """ Test a thread that crashes while another thread hits a watchpoint."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_crash_threads=1, num_watchpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/crash_with_watchpoint_breakpoint_signal/TestConcurrentCrashWithWatchpointBreakpointSignal.py Tue Sep  6 15:57:50 2016
@@ -12,9 +12,10 @@ class ConcurrentCrashWithWatchpointBreak
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_crash_with_watchpoint_breakpoint_signal(self):
         """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """
         self.build(dictionary=self.getBuildFlags())
@@ -22,5 +23,3 @@ class ConcurrentCrashWithWatchpointBreak
                                num_breakpoint_threads=1,
                                num_signal_threads=1,
                                num_watchpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/TestConcurrentDelaySignalBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/TestConcurrentDelaySignalBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/TestConcurrentDelaySignalBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_break/TestConcurrentDelaySignalBreak.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,12 @@ class ConcurrentDelaySignalBreak(Concurr
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_delay_signal_break(self):
         """Test (1-second delay) signal and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=1, num_delay_signal_threads=1)
-
-
+        self.do_thread_actions(
+            num_breakpoint_threads=1,
+            num_delay_signal_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_signal_watch/TestConcurrentDelaySignalWatch.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,13 @@ class ConcurrentDelaySignalWatch(Concurr
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_delay_signal_watch(self):
         """Test a watchpoint and a (1 second delay) signal in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_delay_signal_threads=1, num_watchpoint_threads=1)
-
-
+        self.do_thread_actions(
+            num_delay_signal_threads=1,
+            num_watchpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delay_watch_break/TestConcurrentDelayWatchBreak.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,13 @@ class ConcurrentDelayWatchBreak(Concurre
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_delay_watch_break(self):
         """Test (1-second delay) watchpoint and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=1, num_delay_watchpoint_threads=1)
-
-
+        self.do_thread_actions(
+            num_breakpoint_threads=1,
+            num_delay_watchpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/TestConcurrentDelayedCrashWithBreakpointSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/TestConcurrentDelayedCrashWithBreakpointSignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/TestConcurrentDelayedCrashWithBreakpointSignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_signal/TestConcurrentDelayedCrashWithBreakpointSignal.py Tue Sep  6 15:57:50 2016
@@ -12,13 +12,12 @@ class ConcurrentDelayedCrashWithBreakpoi
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_delayed_crash_with_breakpoint_signal(self):
         """ Test a thread with a delayed crash while other threads generate a signal and hit a breakpoint. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_delay_crash_threads=1,
                                num_breakpoint_threads=1,
                                num_signal_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/delayed_crash_with_breakpoint_watchpoint/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py Tue Sep  6 15:57:50 2016
@@ -12,14 +12,13 @@ class ConcurrentDelayedCrashWithBreakpoi
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_delayed_crash_with_breakpoint_watchpoint(self):
         """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_delay_crash_threads=1,
                                num_breakpoint_threads=1,
                                num_watchpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/TestConcurrentManyBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/TestConcurrentManyBreakpoints.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/TestConcurrentManyBreakpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_breakpoints/TestConcurrentManyBreakpoints.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,12 @@ class ConcurrentManyBreakpoints(Concurre
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @unittest2.skipIf(
+        TestBase.skipLongRunningTest(),
+        "Skip this long running test")
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_many_breakpoints(self):
         """Test 100 breakpoints from 100 threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_breakpoint_threads=100)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/TestConcurrentManyCrash.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/TestConcurrentManyCrash.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/TestConcurrentManyCrash.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_crash/TestConcurrentManyCrash.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,12 @@ class ConcurrentManyCrash(ConcurrentEven
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @unittest2.skipIf(
+        TestBase.skipLongRunningTest(),
+        "Skip this long running test")
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_many_crash(self):
         """Test 100 threads that cause a segfault."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_crash_threads=100)
-
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/TestConcurrentManySignals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/TestConcurrentManySignals.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/TestConcurrentManySignals.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_signals/TestConcurrentManySignals.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,12 @@ class ConcurrentManySignals(ConcurrentEv
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @unittest2.skipIf(
+        TestBase.skipLongRunningTest(),
+        "Skip this long running test")
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_many_signals(self):
         """Test 100 signals from 100 threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_signal_threads=100)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/many_watchpoints/TestConcurrentManyWatchpoints.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,12 @@ class ConcurrentManyWatchpoints(Concurre
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @unittest2.skipIf(
+        TestBase.skipLongRunningTest(),
+        "Skip this long running test")
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_many_watchpoints(self):
         """Test 100 watchpoints from 100 threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_watchpoint_threads=100)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/n_watch_n_break/TestConcurrentNWatchNBreak.py Tue Sep  6 15:57:50 2016
@@ -12,14 +12,12 @@ class ConcurrentNWatchNBreak(ConcurrentE
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_n_watch_n_break(self):
         """Test with 5 watchpoint and breakpoint threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_watchpoint_threads=5,
                                num_breakpoint_threads=5)
-
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/TestConcurrentSignalBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/TestConcurrentSignalBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/TestConcurrentSignalBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_break/TestConcurrentSignalBreak.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,10 @@ class ConcurrentSignalBreak(ConcurrentEv
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_signal_break(self):
         """Test signal and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_breakpoint_threads=1, num_signal_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/TestConcurrentSignalDelayBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/TestConcurrentSignalDelayBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/TestConcurrentSignalDelayBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_break/TestConcurrentSignalDelayBreak.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,12 @@ class ConcurrentSignalDelayBreak(Concurr
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_signal_delay_break(self):
         """Test signal and a (1 second delay) breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_delay_breakpoint_threads=1, num_signal_threads=1)
-
-
-
+        self.do_thread_actions(
+            num_delay_breakpoint_threads=1,
+            num_signal_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_delay_watch/TestConcurrentSignalDelayWatch.py Tue Sep  6 15:57:50 2016
@@ -12,13 +12,13 @@ class ConcurrentSignalDelayWatch(Concurr
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_signal_delay_watch(self):
         """Test a (1 second delay) watchpoint and a signal in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_signal_threads=1, num_delay_watchpoint_threads=1)
-
-
-
+        self.do_thread_actions(
+            num_signal_threads=1,
+            num_delay_watchpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_n_watch_n_break/TestConcurrentSignalNWatchNBreak.py Tue Sep  6 15:57:50 2016
@@ -12,14 +12,13 @@ class ConcurrentSignalNWatchNBreak(Concu
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_signal_n_watch_n_break(self):
         """Test one signal thread with 5 watchpoint and breakpoint threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_signal_threads=1,
                                num_watchpoint_threads=5,
                                num_breakpoint_threads=5)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch/TestConcurrentSignalWatch.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,11 @@ class ConcurrentSignalWatch(ConcurrentEv
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_signal_watch(self):
         """Test a watchpoint and a signal in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_signal_threads=1, num_watchpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/signal_watch_break/TestConcurrentSignalWatchBreak.py Tue Sep  6 15:57:50 2016
@@ -12,14 +12,13 @@ class ConcurrentSignalWatchBreak(Concurr
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_signal_watch_break(self):
         """Test a signal/watchpoint/breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_signal_threads=1,
                                num_watchpoint_threads=1,
                                num_breakpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/TestConcurrentTwoBreakpointThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/TestConcurrentTwoBreakpointThreads.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/TestConcurrentTwoBreakpointThreads.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoint_threads/TestConcurrentTwoBreakpointThreads.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,10 @@ class ConcurrentTwoBreakpointThreads(Con
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_breakpoint_threads(self):
         """Test two threads that trigger a breakpoint. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_breakpoint_threads=2)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/TestConcurrentTwoBreakpointsOneDelaySignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/TestConcurrentTwoBreakpointsOneDelaySignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/TestConcurrentTwoBreakpointsOneDelaySignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_delay_signal/TestConcurrentTwoBreakpointsOneDelaySignal.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,12 @@ class ConcurrentTwoBreakpointsOneDelaySi
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_breakpoints_one_delay_signal(self):
         """Test two threads that trigger a breakpoint and one (1 second delay) signal thread. """
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=2, num_delay_signal_threads=1)
-
-
+        self.do_thread_actions(
+            num_breakpoint_threads=2,
+            num_delay_signal_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/TestConcurrentTwoBreakpointsOneSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/TestConcurrentTwoBreakpointsOneSignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/TestConcurrentTwoBreakpointsOneSignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_signal/TestConcurrentTwoBreakpointsOneSignal.py Tue Sep  6 15:57:50 2016
@@ -12,11 +12,10 @@ class ConcurrentTwoBreakpointsOneSignal(
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    @skipIfFreeBSD  # timing out on buildbot
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_breakpoints_one_signal(self):
         """Test two threads that trigger a breakpoint and one signal thread. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_breakpoint_threads=2, num_signal_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_breakpoints_one_watchpoint/TestConcurrentTwoBreakpointsOneWatchpoint.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,13 @@ class ConcurrentTwoBreakpointsOneWatchpo
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_breakpoints_one_watchpoint(self):
         """Test two threads that trigger a breakpoint and one watchpoint thread. """
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=2, num_watchpoint_threads=1)
-
-
+        self.do_thread_actions(
+            num_breakpoint_threads=2,
+            num_watchpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoint_threads/TestConcurrentTwoWatchpointThreads.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,11 @@ class ConcurrentTwoWatchpointThreads(Con
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_watchpoint_threads(self):
         """Test two threads that trigger a watchpoint. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_watchpoint_threads=2)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_breakpoint/TestConcurrentTwoWatchpointsOneBreakpoint.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,13 @@ class ConcurrentTwoWatchpointsOneBreakpo
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_watchpoints_one_breakpoint(self):
         """Test two threads that trigger a watchpoint and one breakpoint thread. """
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=2, num_breakpoint_threads=1)
-
-
+        self.do_thread_actions(
+            num_watchpoint_threads=2,
+            num_breakpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_delay_breakpoint/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,13 @@ class ConcurrentTwoWatchpointsOneDelayBr
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_watchpoints_one_delay_breakpoint(self):
         """Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_watchpoint_threads=2, num_delay_breakpoint_threads=1)
-
-
+        self.do_thread_actions(
+            num_watchpoint_threads=2,
+            num_delay_breakpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/two_watchpoints_one_signal/TestConcurrentTwoWatchpointsOneSignal.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,11 @@ class ConcurrentTwoWatchpointsOneSignal(
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_two_watchpoints_one_signal(self):
         """Test two threads that trigger a watchpoint and one signal thread. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_watchpoint_threads=2, num_signal_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break/TestConcurrentWatchBreak.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,13 @@ class ConcurrentWatchBreak(ConcurrentEve
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_watch_break(self):
         """Test watchpoint and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_breakpoint_threads=1, num_watchpoint_threads=1)
-
-
+        self.do_thread_actions(
+            num_breakpoint_threads=1,
+            num_watchpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watch_break_delay/TestConcurrentWatchBreakDelay.py Tue Sep  6 15:57:50 2016
@@ -12,12 +12,13 @@ class ConcurrentWatchBreakDelay(Concurre
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_watch_break_delay(self):
         """Test watchpoint and a (1 second delay) breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
-        self.do_thread_actions(num_delay_breakpoint_threads=1, num_watchpoint_threads=1)
-
-
+        self.do_thread_actions(
+            num_delay_breakpoint_threads=1,
+            num_watchpoint_threads=1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_delay_watchpoint_one_breakpoint/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py Tue Sep  6 15:57:50 2016
@@ -12,14 +12,13 @@ class ConcurrentWatchpointDelayWatchpoin
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_watchpoint_delay_watchpoint_one_breakpoint(self):
         """Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_watchpoint_threads=1,
                                num_delay_watchpoint_threads=1,
                                num_breakpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/watchpoint_with_delay_watchpoint_threads/TestConcurrentWatchpointWithDelayWatchpointThreads.py Tue Sep  6 15:57:50 2016
@@ -12,13 +12,12 @@ class ConcurrentWatchpointWithDelayWatch
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # timing out on buildbot
+    @skipIfFreeBSD  # timing out on buildbot
     @skipIfRemoteDueToDeadlock
-    @expectedFailureAll(triple = '^mips') # Atomic sequences are not supported yet for MIPS in LLDB.
+    # Atomic sequences are not supported yet for MIPS in LLDB.
+    @expectedFailureAll(triple='^mips')
     def test_watchpoint_with_delay_watchpoint_threads(self):
         """Test two threads that trigger a watchpoint where one thread has a 1 second delay. """
         self.build(dictionary=self.getBuildFlags())
         self.do_thread_actions(num_watchpoint_threads=1,
                                num_delay_watchpoint_threads=1)
-
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,13 @@ Test that step-inst over a crash behaves
 from __future__ import print_function
 
 
-
 import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CreateDuringStepTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,8 +22,12 @@ class CreateDuringStepTestCase(TestBase)
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
     @expectedFailureAndroid("llvm.org/pr24497", archs=['arm', 'aarch64'])
-    @expectedFailureAll(oslist=["linux"], archs=["arm"], bugnumber="llvm.org/pr24497")
-    @expectedFailureAll(triple = re.compile('^mips'))    # IO error due to breakpoint at invalid address
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=["arm"],
+        bugnumber="llvm.org/pr24497")
+    # IO error due to breakpoint at invalid address
+    @expectedFailureAll(triple=re.compile('^mips'))
     def test_step_inst_with(self):
         """Test thread creation during step-inst handling."""
         self.build(dictionary=self.getBuildFlags())
@@ -32,21 +36,34 @@ class CreateDuringStepTestCase(TestBase)
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target and target.IsValid(), "Target is valid")
 
-        self.bp_num = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+        self.bp_num = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
         # Run the program.
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
 
         # The stop reason should be breakpoint.
-        self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid(), STOPPED_DUE_TO_BREAKPOINT)
 
         # Keep stepping until the inferior crashes
         while process.GetState() == lldb.eStateStopped and not lldbutil.is_thread_crashed(self, thread):
             thread.StepInstruction(False)
 
-        self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED)
-        self.assertTrue(lldbutil.is_thread_crashed(self, thread), "Thread has crashed")
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
+        self.assertTrue(
+            lldbutil.is_thread_crashed(
+                self,
+                thread),
+            "Thread has crashed")
         process.Kill()

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py Tue Sep  6 15:57:50 2016
@@ -5,31 +5,33 @@ Test thread creation after process attac
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CreateAfterAttachTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # Hangs.  May be the same as Linux issue llvm.org/pr16229 but
-                   # not yet investigated.  Revisit once required functionality
-                   # is implemented for FreeBSD.
-    @skipIfWindows # Occasionally hangs on Windows, may be same as other issues.
+    @skipIfFreeBSD  # Hangs.  May be the same as Linux issue llvm.org/pr16229 but
+    # not yet investigated.  Revisit once required functionality
+    # is implemented for FreeBSD.
+    # Occasionally hangs on Windows, may be same as other issues.
+    @skipIfWindows
     @skipIfiOSSimulator
     def test_create_after_attach_with_popen(self):
         """Test thread creation after process attach."""
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))
         self.create_after_attach(use_fork=False)
 
-    @skipIfFreeBSD # Hangs. Revisit once required functionality is implemented
-                   # for FreeBSD.
+    @skipIfFreeBSD  # Hangs. Revisit once required functionality is implemented
+    # for FreeBSD.
     @skipIfRemote
-    @skipIfWindows # Windows doesn't have fork.
+    @skipIfWindows  # Windows doesn't have fork.
     @skipIfiOSSimulator
     def test_create_after_attach_with_fork(self):
         """Test thread creation after process attach."""
@@ -66,13 +68,16 @@ class CreateAfterAttachTestCase(TestBase
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_1, num_expected_locations=1)
 
         # This should create a breakpoint in the second child thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_2, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_2, num_expected_locations=1)
 
         # This should create a breakpoint in the first child thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_3, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_3, num_expected_locations=1)
 
         # Note:  With std::thread, we cannot rely on particular thread numbers.  Using
         # std::thread may cause the program to spin up a thread pool (and it does on
@@ -83,10 +88,10 @@ class CreateAfterAttachTestCase(TestBase
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       '* thread #',
-                       'main',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             '* thread #',
+                             'main',
+                             'stop reason = breakpoint'])
 
         # Change a variable to escape the loop
         self.runCmd("expression main_thread_continue = 1")
@@ -96,10 +101,10 @@ class CreateAfterAttachTestCase(TestBase
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       '* thread #',
-                       'thread_2_func',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             '* thread #',
+                             'thread_2_func',
+                             'stop reason = breakpoint'])
 
         # Change a variable to escape the loop
         self.runCmd("expression child_thread_continue = 1")
@@ -110,13 +115,15 @@ class CreateAfterAttachTestCase(TestBase
         # The stop reason of the thread should be breakpoint.
         # Thread 3 may or may not have already exited.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       '* thread #',
-                       'thread_1_func',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             '* thread #',
+                             'thread_1_func',
+                             'stop reason = breakpoint'])
 
         # Run to completion
         self.runCmd("continue")
 
         # At this point, the inferior process should have exited.
-        self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
+        self.assertTrue(
+            process.GetState() == lldb.eStateExited,
+            PROCESS_EXITED)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py Tue Sep  6 15:57:50 2016
@@ -5,43 +5,74 @@ Test number of threads.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CreateDuringStepTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18190 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     def test_step_inst(self):
         """Test thread creation during step-inst handling."""
         self.build(dictionary=self.getBuildFlags())
-        self.create_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step')
-
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+        self.create_during_step_base(
+            "thread step-inst -m all-threads",
+            'stop reason = instruction step')
+
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18190 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     def test_step_over(self):
         """Test thread creation during step-over handling."""
         self.build(dictionary=self.getBuildFlags())
-        self.create_during_step_base("thread step-over -m all-threads", 'stop reason = step over')
-
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+        self.create_during_step_base(
+            "thread step-over -m all-threads",
+            'stop reason = step over')
+
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18190 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     def test_step_in(self):
         """Test thread creation during step-in handling."""
         self.build(dictionary=self.getBuildFlags())
-        self.create_during_step_base("thread step-in -m all-threads", 'stop reason = step in')
+        self.create_during_step_base(
+            "thread step-in -m all-threads",
+            'stop reason = step in')
 
     def setUp(self):
         # Call super's setUp().
@@ -56,19 +87,24 @@ class CreateDuringStepTestCase(TestBase)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the stepping thread.
-        self.bp_num = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+        self.bp_num = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
         # The breakpoint list should show 1 location.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, locations = 1" % self.breakpoint])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, locations = 1" %
+                self.breakpoint])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Get the target process
         target = self.dbg.GetSelectedTarget()
@@ -78,15 +114,21 @@ class CreateDuringStepTestCase(TestBase)
         num_threads = process.GetNumThreads()
 
         # Make sure we see only two threads
-        self.assertTrue(num_threads == 2, 'Number of expected threads and actual threads do not match.')
+        self.assertTrue(
+            num_threads == 2,
+            'Number of expected threads and actual threads do not match.')
 
         # Get the thread objects
         thread1 = process.GetThreadAtIndex(0)
         thread2 = process.GetThreadAtIndex(1)
 
         # Make sure both threads are stopped
-        self.assertTrue(thread1.IsStopped(), "Thread 1 didn't stop during breakpoint")
-        self.assertTrue(thread2.IsStopped(), "Thread 2 didn't stop during breakpoint")
+        self.assertTrue(
+            thread1.IsStopped(),
+            "Thread 1 didn't stop during breakpoint")
+        self.assertTrue(
+            thread2.IsStopped(),
+            "Thread 2 didn't stop during breakpoint")
 
         # Find the thread that is stopped at the breakpoint
         stepping_thread = None
@@ -95,7 +137,10 @@ class CreateDuringStepTestCase(TestBase)
             if expected_bp_desc in thread.GetStopDescription(100):
                 stepping_thread = thread
                 break
-        self.assertTrue(stepping_thread != None, "unable to find thread stopped at %s" % expected_bp_desc)
+        self.assertTrue(
+            stepping_thread is not None,
+            "unable to find thread stopped at %s" %
+            expected_bp_desc)
         current_line = self.breakpoint
         # Keep stepping until we've reached our designated continue point
         while current_line != self.continuepoint:
@@ -108,21 +153,31 @@ class CreateDuringStepTestCase(TestBase)
             current_line = frame.GetLineEntry().GetLine()
 
             # Make sure we're still where we thought we were
-            self.assertTrue(current_line >= self.breakpoint, "Stepped to unexpected line, " + str(current_line))
-            self.assertTrue(current_line <= self.continuepoint, "Stepped to unexpected line, " + str(current_line))
+            self.assertTrue(
+                current_line >= self.breakpoint,
+                "Stepped to unexpected line, " +
+                str(current_line))
+            self.assertTrue(
+                current_line <= self.continuepoint,
+                "Stepped to unexpected line, " +
+                str(current_line))
 
         # Update the number of threads
         num_threads = process.GetNumThreads()
 
         # Check to see that we increased the number of threads as expected
-        self.assertTrue(num_threads == 3, 'Number of expected threads and actual threads do not match after thread exit.')
+        self.assertTrue(
+            num_threads == 3,
+            'Number of expected threads and actual threads do not match after thread exit.')
 
         self.expect("thread list", 'Process state is stopped due to step',
-                substrs = ['stopped',
-                           step_stop_reason])
+                    substrs=['stopped',
+                             step_stop_reason])
 
         # Run to completion
         self.runCmd("process continue")
 
         # At this point, the inferior process should have exited.
-        self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
+        self.assertTrue(
+            process.GetState() == lldb.eStateExited,
+            PROCESS_EXITED)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test number of threads.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExitDuringBreakpointTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,10 +23,18 @@ class ExitDuringBreakpointTestCase(TestB
         # Find the line number for our breakpoint.
         self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18190 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     def test(self):
         """Test thread exit during breakpoint handling."""
         self.build(dictionary=self.getBuildFlags())
@@ -33,19 +42,24 @@ class ExitDuringBreakpointTestCase(TestB
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
         # The breakpoint list should show 1 location.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, locations = 1" % self.breakpoint])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, locations = 1" %
+                self.breakpoint])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Get the target process
         target = self.dbg.GetSelectedTarget()
@@ -59,7 +73,9 @@ class ExitDuringBreakpointTestCase(TestB
         num_threads = process.GetNumThreads()
 
         # Make sure we see at least five threads
-        self.assertTrue(num_threads >= 5, 'Number of expected threads and actual threads do not match.')
+        self.assertTrue(
+            num_threads >= 5,
+            'Number of expected threads and actual threads do not match.')
 
         # Get the thread objects
         thread1 = process.GetThreadAtIndex(0)
@@ -69,14 +85,26 @@ class ExitDuringBreakpointTestCase(TestB
         thread5 = process.GetThreadAtIndex(4)
 
         # Make sure all threads are stopped
-        self.assertTrue(thread1.IsStopped(), "Thread 1 didn't stop during breakpoint")
-        self.assertTrue(thread2.IsStopped(), "Thread 2 didn't stop during breakpoint")
-        self.assertTrue(thread3.IsStopped(), "Thread 3 didn't stop during breakpoint")
-        self.assertTrue(thread4.IsStopped(), "Thread 4 didn't stop during breakpoint")
-        self.assertTrue(thread5.IsStopped(), "Thread 5 didn't stop during breakpoint")
+        self.assertTrue(
+            thread1.IsStopped(),
+            "Thread 1 didn't stop during breakpoint")
+        self.assertTrue(
+            thread2.IsStopped(),
+            "Thread 2 didn't stop during breakpoint")
+        self.assertTrue(
+            thread3.IsStopped(),
+            "Thread 3 didn't stop during breakpoint")
+        self.assertTrue(
+            thread4.IsStopped(),
+            "Thread 4 didn't stop during breakpoint")
+        self.assertTrue(
+            thread5.IsStopped(),
+            "Thread 5 didn't stop during breakpoint")
 
         # Run to completion
         self.runCmd("continue")
 
         # At this point, the inferior process should have exited.
-        self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
+        self.assertTrue(
+            process.GetState() == lldb.eStateExited,
+            PROCESS_EXITED)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py Tue Sep  6 15:57:50 2016
@@ -5,34 +5,41 @@ Test number of threads.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ExitDuringStepTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
+    @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
     def test(self):
         """Test thread exit during step handling."""
         self.build(dictionary=self.getBuildFlags())
-        self.exit_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step')
+        self.exit_during_step_base(
+            "thread step-inst -m all-threads",
+            'stop reason = instruction step')
 
-    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
+    @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
     def test_step_over(self):
         """Test thread exit during step-over handling."""
         self.build(dictionary=self.getBuildFlags())
-        self.exit_during_step_base("thread step-over -m all-threads", 'stop reason = step over')
+        self.exit_during_step_base(
+            "thread step-over -m all-threads",
+            'stop reason = step over')
 
-    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
+    @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
     def test_step_in(self):
         """Test thread exit during step-in handling."""
         self.build(dictionary=self.getBuildFlags())
-        self.exit_during_step_base("thread step-in -m all-threads", 'stop reason = step in')
+        self.exit_during_step_base(
+            "thread step-in -m all-threads",
+            'stop reason = step in')
 
     def setUp(self):
         # Call super's setUp().
@@ -47,19 +54,24 @@ class ExitDuringStepTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        self.bp_num = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+        self.bp_num = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
         # The breakpoint list should show 1 location.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.breakpoint])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.breakpoint])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Get the target process
         target = self.dbg.GetSelectedTarget()
@@ -67,14 +79,23 @@ class ExitDuringStepTestCase(TestBase):
 
         num_threads = process.GetNumThreads()
         # Make sure we see all three threads
-        self.assertGreaterEqual(num_threads, 3, 'Number of expected threads and actual threads do not match.')
-
-        stepping_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(process, self.bp_num)
-        self.assertIsNotNone(stepping_thread, "Could not find a thread stopped at the breakpoint")
+        self.assertGreaterEqual(
+            num_threads,
+            3,
+            'Number of expected threads and actual threads do not match.')
+
+        stepping_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
+            process, self.bp_num)
+        self.assertIsNotNone(
+            stepping_thread,
+            "Could not find a thread stopped at the breakpoint")
 
         current_line = self.breakpoint
         stepping_frame = stepping_thread.GetFrameAtIndex(0)
-        self.assertEqual(current_line, stepping_frame.GetLineEntry().GetLine(), "Starting line for stepping doesn't match breakpoint line.")
+        self.assertEqual(
+            current_line,
+            stepping_frame.GetLineEntry().GetLine(),
+            "Starting line for stepping doesn't match breakpoint line.")
 
         # Keep stepping until we've reached our designated continue point
         while current_line != self.continuepoint:
@@ -90,8 +111,16 @@ class ExitDuringStepTestCase(TestBase):
 
             current_line = frame.GetLineEntry().GetLine()
 
-            self.assertGreaterEqual(current_line, self.breakpoint, "Stepped to unexpected line, " + str(current_line))
-            self.assertLessEqual(current_line, self.continuepoint, "Stepped to unexpected line, " + str(current_line))
+            self.assertGreaterEqual(
+                current_line,
+                self.breakpoint,
+                "Stepped to unexpected line, " +
+                str(current_line))
+            self.assertLessEqual(
+                current_line,
+                self.continuepoint,
+                "Stepped to unexpected line, " +
+                str(current_line))
 
         self.runCmd("thread list")
 
@@ -99,11 +128,14 @@ class ExitDuringStepTestCase(TestBase):
         new_num_threads = process.GetNumThreads()
 
         # Check to see that we reduced the number of threads as expected
-        self.assertEqual(new_num_threads, num_threads-1, 'Number of threads did not reduce by 1 after thread exit.')
+        self.assertEqual(
+            new_num_threads,
+            num_threads - 1,
+            'Number of threads did not reduce by 1 after thread exit.')
 
         self.expect("thread list", 'Process state is stopped due to step',
-                substrs = ['stopped',
-                           step_stop_reason])
+                    substrs=['stopped',
+                             step_stop_reason])
 
         # Run to completion
         self.runCmd("continue")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test jumping to different places.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ThreadJumpTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -29,31 +30,50 @@ class ThreadJumpTestCase(TestBase):
         self.mark4 = line_number('main.cpp', '// 4th marker')
         self.mark5 = line_number('other.cpp', '// other marker')
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.mark3, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.mark3, num_expected_locations=1)
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint 1.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT + " 1",
-                    substrs=['stopped', 'main.cpp:{}'.format(self.mark3), 'stop reason = breakpoint 1'])
-
-        self.do_min_test(self.mark3, self.mark1, "i", "4"); # Try the int path, force it to return 'a'
-        self.do_min_test(self.mark3, self.mark2, "i", "5"); # Try the int path, force it to return 'b'
-        self.do_min_test(self.mark4, self.mark1, "j", "7"); # Try the double path, force it to return 'a'
-        self.do_min_test(self.mark4, self.mark2, "j", "8"); # Try the double path, force it to return 'b'
+        self.expect(
+            "thread list",
+            STOPPED_DUE_TO_BREAKPOINT + " 1",
+            substrs=[
+                'stopped',
+                'main.cpp:{}'.format(
+                    self.mark3),
+                'stop reason = breakpoint 1'])
+
+        # Try the int path, force it to return 'a'
+        self.do_min_test(self.mark3, self.mark1, "i", "4")
+        # Try the int path, force it to return 'b'
+        self.do_min_test(self.mark3, self.mark2, "i", "5")
+        # Try the double path, force it to return 'a'
+        self.do_min_test(self.mark4, self.mark1, "j", "7")
+        # Try the double path, force it to return 'b'
+        self.do_min_test(self.mark4, self.mark2, "j", "8")
 
         # Try jumping to another function in a different file.
-        self.runCmd("thread jump --file other.cpp --line %i --force" % self.mark5)
+        self.runCmd(
+            "thread jump --file other.cpp --line %i --force" %
+            self.mark5)
         self.expect("process status",
-            substrs = ["at other.cpp:%i" % self.mark5])
+                    substrs=["at other.cpp:%i" % self.mark5])
 
         # Try jumping to another function (without forcing)
-        self.expect("j main.cpp:%i" % self.mark1, COMMAND_FAILED_AS_EXPECTED, error = True,
-            substrs = ["error"])
-    
+        self.expect(
+            "j main.cpp:%i" %
+            self.mark1,
+            COMMAND_FAILED_AS_EXPECTED,
+            error=True,
+            substrs=["error"])
+
     def do_min_test(self, start, jump, var, value):
-        self.runCmd("j %i" % start)                     # jump to the start marker
+        # jump to the start marker
+        self.runCmd("j %i" % start)
         self.runCmd("thread step-in")                   # step into the min fn
-        self.runCmd("j %i" % jump)                      # jump to the branch we're interested in
+        # jump to the branch we're interested in
+        self.runCmd("j %i" % jump)
         self.runCmd("thread step-out")                  # return out
         self.runCmd("thread step-over")                 # assign to the global
-        self.expect("expr %s" % var, substrs = [value]) # check it
+        self.expect("expr %s" % var, substrs=[value])  # check it

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test number of threads.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class MultipleBreakpointTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,10 +23,18 @@ class MultipleBreakpointTestCase(TestBas
         # Find the line number for our breakpoint.
         self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18190 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     def test(self):
         """Test simultaneous breakpoints in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
@@ -33,11 +42,16 @@ class MultipleBreakpointTestCase(TestBas
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
         # The breakpoint list should show 1 location.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, locations = 1" % self.breakpoint])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, locations = 1" %
+                self.breakpoint])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -45,8 +59,8 @@ class MultipleBreakpointTestCase(TestBas
         # The stop reason of the thread should be breakpoint.
         # The breakpoint may be hit in either thread 2 or thread 3.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Get the target process
         target = self.dbg.GetSelectedTarget()
@@ -56,7 +70,9 @@ class MultipleBreakpointTestCase(TestBas
         num_threads = process.GetNumThreads()
 
         # Make sure we see all three threads
-        self.assertTrue(num_threads >= 3, 'Number of expected threads and actual threads do not match.')
+        self.assertTrue(
+            num_threads >= 3,
+            'Number of expected threads and actual threads do not match.')
 
         # Get the thread objects
         thread1 = process.GetThreadAtIndex(0)
@@ -64,9 +80,15 @@ class MultipleBreakpointTestCase(TestBas
         thread3 = process.GetThreadAtIndex(2)
 
         # Make sure both threads are stopped
-        self.assertTrue(thread1.IsStopped(), "Primary thread didn't stop during breakpoint")
-        self.assertTrue(thread2.IsStopped(), "Secondary thread didn't stop during breakpoint")
-        self.assertTrue(thread3.IsStopped(), "Tertiary thread didn't stop during breakpoint")
+        self.assertTrue(
+            thread1.IsStopped(),
+            "Primary thread didn't stop during breakpoint")
+        self.assertTrue(
+            thread2.IsStopped(),
+            "Secondary thread didn't stop during breakpoint")
+        self.assertTrue(
+            thread3.IsStopped(),
+            "Tertiary thread didn't stop during breakpoint")
 
         # Delete the first breakpoint then continue
         self.runCmd("breakpoint delete 1")
@@ -75,4 +97,6 @@ class MultipleBreakpointTestCase(TestBas
         self.runCmd("continue")
 
         # At this point, the inferior process should have exited.
-        self.assertTrue(process.GetState() == lldb.eStateExited, PROCESS_EXITED)
+        self.assertTrue(
+            process.GetState() == lldb.eStateExited,
+            PROCESS_EXITED)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py Tue Sep  6 15:57:50 2016
@@ -5,28 +5,37 @@ Test thread states.
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ThreadStateTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr15824 thread states not properly maintained")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18190 thread states not properly maintained")
     def test_state_after_breakpoint(self):
         """Test thread state after breakpoint."""
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))
         self.thread_state_after_breakpoint_test()
 
-    @skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly
-    @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr23669")
+    @skipIfDarwin  # 'llvm.org/pr23669', cause Python crash randomly
+    @expectedFailureAll(
+        oslist=lldbplatformutil.getDarwinOSTriples(),
+        bugnumber="llvm.org/pr23669")
     @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr15824")
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24660")
     def test_state_after_continue(self):
@@ -34,24 +43,31 @@ class ThreadStateTestCase(TestBase):
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))
         self.thread_state_after_continue_test()
 
-    @skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly
+    @skipIfDarwin  # 'llvm.org/pr23669', cause Python crash randomly
     @expectedFailureDarwin('llvm.org/pr23669')
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24660")
-    @unittest2.expectedFailure("llvm.org/pr16712") # thread states not properly maintained
+    # thread states not properly maintained
+    @unittest2.expectedFailure("llvm.org/pr16712")
     def test_state_after_expression(self):
         """Test thread state after expression."""
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))
         self.thread_state_after_expression_test()
 
-    @unittest2.expectedFailure("llvm.org/pr16712") # thread states not properly maintained
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+    # thread states not properly maintained
+    @unittest2.expectedFailure("llvm.org/pr16712")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     def test_process_interrupt(self):
         """Test process interrupt."""
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))
         self.process_interrupt_test()
 
-    @unittest2.expectedFailure("llvm.org/pr15824") # thread states not properly maintained
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
+    # thread states not properly maintained
+    @unittest2.expectedFailure("llvm.org/pr15824")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     def test_process_state(self):
         """Test thread states (comprehensive)."""
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))
@@ -70,7 +86,8 @@ class ThreadStateTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        bp = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
+        bp = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_1, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -79,12 +96,16 @@ class ThreadStateTestCase(TestBase):
         target = self.dbg.GetSelectedTarget()
         process = target.GetProcess()
 
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         # Make sure the thread is in the stopped state.
-        self.assertTrue(thread.IsStopped(), "Thread state isn't \'stopped\' during breakpoint 1.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' during breakpoint 1.")
+        self.assertTrue(
+            thread.IsStopped(),
+            "Thread state isn't \'stopped\' during breakpoint 1.")
+        self.assertFalse(thread.IsSuspended(),
+                         "Thread state is \'suspended\' during breakpoint 1.")
 
         # Kill the process
         self.runCmd("process kill")
@@ -92,8 +113,12 @@ class ThreadStateTestCase(TestBase):
     def wait_for_running_event(self, process):
         listener = self.dbg.GetListener()
         if lldb.remote_platform:
-            lldbutil.expect_state_changes(self, listener, process, [lldb.eStateConnected])
-        lldbutil.expect_state_changes(self, listener, process, [lldb.eStateRunning])
+            lldbutil.expect_state_changes(
+                self, listener, process, [
+                    lldb.eStateConnected])
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateRunning])
 
     def thread_state_after_continue_test(self):
         """Test thread state after continue."""
@@ -101,8 +126,10 @@ class ThreadStateTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_2, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_1, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_2, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -111,17 +138,23 @@ class ThreadStateTestCase(TestBase):
         target = self.dbg.GetSelectedTarget()
         process = target.GetProcess()
 
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
-        # Continue, the inferior will go into an infinite loop waiting for 'g_test' to change.
+        # Continue, the inferior will go into an infinite loop waiting for
+        # 'g_test' to change.
         self.dbg.SetAsync(True)
         self.runCmd("continue")
         self.wait_for_running_event(process)
 
         # Check the thread state. It should be running.
-        self.assertFalse(thread.IsStopped(), "Thread state is \'stopped\' when it should be running.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' when it should be running.")
+        self.assertFalse(
+            thread.IsStopped(),
+            "Thread state is \'stopped\' when it should be running.")
+        self.assertFalse(
+            thread.IsSuspended(),
+            "Thread state is \'suspended\' when it should be running.")
 
         # Go back to synchronous interactions
         self.dbg.SetAsync(False)
@@ -135,8 +168,10 @@ class ThreadStateTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_2, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_1, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_2, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -145,27 +180,32 @@ class ThreadStateTestCase(TestBase):
         target = self.dbg.GetSelectedTarget()
         process = target.GetProcess()
 
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         # Get the inferior out of its loop
         self.runCmd("expression g_test = 1")
 
         # Check the thread state
-        self.assertTrue(thread.IsStopped(), "Thread state isn't \'stopped\' after expression evaluation.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' after expression evaluation.")
+        self.assertTrue(
+            thread.IsStopped(),
+            "Thread state isn't \'stopped\' after expression evaluation.")
+        self.assertFalse(
+            thread.IsSuspended(),
+            "Thread state is \'suspended\' after expression evaluation.")
 
         # Let the process run to completion
         self.runCmd("process continue")
 
-
     def process_interrupt_test(self):
         """Test process interrupt and continue."""
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_1, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -174,10 +214,12 @@ class ThreadStateTestCase(TestBase):
         target = self.dbg.GetSelectedTarget()
         process = target.GetProcess()
 
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
-        # Continue, the inferior will go into an infinite loop waiting for 'g_test' to change.
+        # Continue, the inferior will go into an infinite loop waiting for
+        # 'g_test' to change.
         self.dbg.SetAsync(True)
         self.runCmd("continue")
         self.wait_for_running_event(process)
@@ -202,8 +244,10 @@ class ThreadStateTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_2, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_1, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_2, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -211,21 +255,30 @@ class ThreadStateTestCase(TestBase):
         # Get the target process
         target = self.dbg.GetSelectedTarget()
         process = target.GetProcess()
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         # Make sure the thread is in the stopped state.
-        self.assertTrue(thread.IsStopped(), "Thread state isn't \'stopped\' during breakpoint 1.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' during breakpoint 1.")
+        self.assertTrue(
+            thread.IsStopped(),
+            "Thread state isn't \'stopped\' during breakpoint 1.")
+        self.assertFalse(thread.IsSuspended(),
+                         "Thread state is \'suspended\' during breakpoint 1.")
 
-        # Continue, the inferior will go into an infinite loop waiting for 'g_test' to change.
+        # Continue, the inferior will go into an infinite loop waiting for
+        # 'g_test' to change.
         self.dbg.SetAsync(True)
         self.runCmd("continue")
         self.wait_for_running_event(process)
 
         # Check the thread state. It should be running.
-        self.assertFalse(thread.IsStopped(), "Thread state is \'stopped\' when it should be running.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' when it should be running.")
+        self.assertFalse(
+            thread.IsStopped(),
+            "Thread state is \'stopped\' when it should be running.")
+        self.assertFalse(
+            thread.IsSuspended(),
+            "Thread state is \'suspended\' when it should be running.")
 
         # Go back to synchronous interactions
         self.dbg.SetAsync(False)
@@ -236,15 +289,22 @@ class ThreadStateTestCase(TestBase):
         self.assertEqual(thread.GetState(), lldb.eStopReasonSignal)
 
         # Check the thread state
-        self.assertTrue(thread.IsStopped(), "Thread state isn't \'stopped\' after process stop.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' after process stop.")
+        self.assertTrue(
+            thread.IsStopped(),
+            "Thread state isn't \'stopped\' after process stop.")
+        self.assertFalse(thread.IsSuspended(),
+                         "Thread state is \'suspended\' after process stop.")
 
         # Get the inferior out of its loop
         self.runCmd("expression g_test = 1")
 
         # Check the thread state
-        self.assertTrue(thread.IsStopped(), "Thread state isn't \'stopped\' after expression evaluation.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' after expression evaluation.")
+        self.assertTrue(
+            thread.IsStopped(),
+            "Thread state isn't \'stopped\' after expression evaluation.")
+        self.assertFalse(
+            thread.IsSuspended(),
+            "Thread state is \'suspended\' after expression evaluation.")
 
         self.assertEqual(thread.GetState(), lldb.eStopReasonSignal)
 
@@ -254,8 +314,11 @@ class ThreadStateTestCase(TestBase):
         self.assertEqual(thread.GetState(), lldb.eStopReasonBreakpoint)
 
         # Make sure both threads are stopped
-        self.assertTrue(thread.IsStopped(), "Thread state isn't \'stopped\' during breakpoint 2.")
-        self.assertFalse(thread.IsSuspended(), "Thread state is \'suspended\' during breakpoint 2.")
+        self.assertTrue(
+            thread.IsStopped(),
+            "Thread state isn't \'stopped\' during breakpoint 2.")
+        self.assertFalse(thread.IsSuspended(),
+                         "Thread state is \'suspended\' during breakpoint 2.")
 
         # Run to completion
         self.runCmd("continue")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py Tue Sep  6 15:57:50 2016
@@ -5,38 +5,54 @@ Test stepping out from a function in a m
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ThreadStepOutTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfLinux                              # Test occasionally times out on the Linux build bot
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18066 inferior does not exit")
+    # Test occasionally times out on the Linux build bot
+    @skipIfLinux
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr18066 inferior does not exit")
     @expectedFailureAll(oslist=["windows"])
     def test_step_single_thread(self):
         """Test thread step out on one thread via command interpreter. """
         self.build(dictionary=self.getBuildFlags())
         self.step_out_test(self.step_out_single_thread_with_cmd)
 
-    @skipIfLinux                              # Test occasionally times out on the Linux build bot
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
+    # Test occasionally times out on the Linux build bot
+    @skipIfLinux
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
     @expectedFailureAll(oslist=["windows"])
     def test_step_all_threads(self):
         """Test thread step out on all threads via command interpreter. """
         self.build(dictionary=self.getBuildFlags())
         self.step_out_test(self.step_out_all_threads_with_cmd)
 
-    @skipIfLinux                              # Test occasionally times out on the Linux build bot
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
+    # Test occasionally times out on the Linux build bot
+    @skipIfLinux
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24681")
     def test_python(self):
         """Test thread step out on one thread via Python API (dwarf)."""
@@ -48,43 +64,63 @@ class ThreadStepOutTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number for our breakpoint.
         self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-        if "gcc" in self.getCompiler() or self.isIntelCompiler(): 
-            self.step_out_destination = line_number('main.cpp', '// Expect to stop here after step-out (icc and gcc)')
+        if "gcc" in self.getCompiler() or self.isIntelCompiler():
+            self.step_out_destination = line_number(
+                'main.cpp', '// Expect to stop here after step-out (icc and gcc)')
         else:
-            self.step_out_destination = line_number('main.cpp', '// Expect to stop here after step-out (clang)')
+            self.step_out_destination = line_number(
+                'main.cpp', '// Expect to stop here after step-out (clang)')
 
     def step_out_single_thread_with_cmd(self):
         self.step_out_with_cmd("this-thread")
-        self.expect("thread backtrace all", "Thread location after step out is correct",
-            substrs = ["main.cpp:%d" % self.step_out_destination,
-                       "main.cpp:%d" % self.breakpoint])
+        self.expect(
+            "thread backtrace all",
+            "Thread location after step out is correct",
+            substrs=[
+                "main.cpp:%d" %
+                self.step_out_destination,
+                "main.cpp:%d" %
+                self.breakpoint])
 
     def step_out_all_threads_with_cmd(self):
         self.step_out_with_cmd("all-threads")
-        self.expect("thread backtrace all", "Thread location after step out is correct",
-            substrs = ["main.cpp:%d" % self.step_out_destination])
+        self.expect(
+            "thread backtrace all",
+            "Thread location after step out is correct",
+            substrs=[
+                "main.cpp:%d" %
+                self.step_out_destination])
 
     def step_out_with_cmd(self, run_mode):
         self.runCmd("thread select %d" % self.step_out_thread.GetIndexID())
         self.runCmd("thread step-out -m %s" % run_mode)
         self.expect("process status", "Expected stop reason to be step-out",
-            substrs = ["stop reason = step out"])
+                    substrs=["stop reason = step out"])
 
-        self.expect("thread list", "Selected thread did not change during step-out",
-            substrs = ["* thread #%d" % self.step_out_thread.GetIndexID()])
+        self.expect(
+            "thread list",
+            "Selected thread did not change during step-out",
+            substrs=[
+                "* thread #%d" %
+                self.step_out_thread.GetIndexID()])
 
     def step_out_with_python(self):
         self.step_out_thread.StepOut()
 
         reason = self.step_out_thread.GetStopReason()
-        self.assertEqual(lldb.eStopReasonPlanComplete, reason,
-            "Expected thread stop reason 'plancomplete', but got '%s'" % lldbutil.stop_reason_to_str(reason))
+        self.assertEqual(
+            lldb.eStopReasonPlanComplete,
+            reason,
+            "Expected thread stop reason 'plancomplete', but got '%s'" %
+            lldbutil.stop_reason_to_str(reason))
 
         # Verify location after stepping out
         frame = self.step_out_thread.GetFrameAtIndex(0)
         desc = lldbutil.get_description(frame.GetLineEntry())
         expect = "main.cpp:%d" % self.step_out_destination
-        self.assertTrue(expect in desc, "Expected %s but thread stopped at %s" % (expect, desc))
+        self.assertTrue(
+            expect in desc, "Expected %s but thread stopped at %s" %
+            (expect, desc))
 
     def step_out_test(self, step_out_func):
         """Test single thread step out of a function."""
@@ -92,11 +128,16 @@ class ThreadStepOutTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.breakpoint, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.breakpoint, num_expected_locations=1)
 
         # The breakpoint list should show 1 location.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.breakpoint])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.breakpoint])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -107,7 +148,10 @@ class ThreadStepOutTestCase(TestBase):
 
         # Get the number of threads, ensure we see all three.
         num_threads = self.inferior_process.GetNumThreads()
-        self.assertEqual(num_threads, 3, 'Number of expected threads and actual threads do not match.')
+        self.assertEqual(
+            num_threads,
+            3,
+            'Number of expected threads and actual threads do not match.')
 
         (breakpoint_threads, other_threads) = ([], [])
         lldbutil.sort_stopped_threads(self.inferior_process,
@@ -115,10 +159,12 @@ class ThreadStepOutTestCase(TestBase):
                                       other_threads=other_threads)
 
         while len(breakpoint_threads) < 2:
-            self.runCmd("thread continue %s" % " ".join([str(x.GetIndexID()) for x in other_threads]))
-            lldbutil.sort_stopped_threads(self.inferior_process,
-                                          breakpoint_threads=breakpoint_threads,
-                                          other_threads=other_threads)
+            self.runCmd("thread continue %s" %
+                        " ".join([str(x.GetIndexID()) for x in other_threads]))
+            lldbutil.sort_stopped_threads(
+                self.inferior_process,
+                breakpoint_threads=breakpoint_threads,
+                other_threads=other_threads)
 
         self.step_out_thread = breakpoint_threads[0]
 
@@ -129,4 +175,5 @@ class ThreadStepOutTestCase(TestBase):
         self.runCmd("continue")
 
         # At this point, the inferior process should have exited.
-        self.assertTrue(self.inferior_process.GetState() == lldb.eStateExited, PROCESS_EXITED)
+        self.assertTrue(self.inferior_process.GetState() ==
+                        lldb.eStateExited, PROCESS_EXITED)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,13 @@ Test number of threads.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class ThreadExitTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -31,17 +32,28 @@ class ThreadExitTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # This should create a breakpoint with 1 location.
-        bp1_id = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_1, num_expected_locations=1)
-        bp2_id = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_2, num_expected_locations=1)
-        bp3_id = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_3, num_expected_locations=1)
-        bp4_id = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.break_4, num_expected_locations=1)
+        bp1_id = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_1, num_expected_locations=1)
+        bp2_id = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_2, num_expected_locations=1)
+        bp3_id = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_3, num_expected_locations=1)
+        bp4_id = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.break_4, num_expected_locations=1)
 
         # The breakpoint list should show 1 locations.
-        self.expect("breakpoint list -f", "Breakpoint location shown correctly",
-            substrs = ["1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.break_1,
-                       "2: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.break_2,
-                       "3: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.break_3,
-                       "4: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" % self.break_4])
+        self.expect(
+            "breakpoint list -f",
+            "Breakpoint location shown correctly",
+            substrs=[
+                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.break_1,
+                "2: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.break_2,
+                "3: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.break_3,
+                "4: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
+                self.break_4])
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -49,39 +61,59 @@ class ThreadExitTestCase(TestBase):
         target = self.dbg.GetSelectedTarget()
         process = target.GetProcess()
 
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(process, bp1_id)
-        self.assertIsNotNone(stopped_thread, "Process is not stopped at breakpoint 1")
+        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
+            process, bp1_id)
+        self.assertIsNotNone(stopped_thread,
+                             "Process is not stopped at breakpoint 1")
 
         # Get the number of threads
         num_threads = process.GetNumThreads()
-        self.assertGreaterEqual(num_threads, 2, 'Number of expected threads and actual threads do not match at breakpoint 1.')
+        self.assertGreaterEqual(
+            num_threads,
+            2,
+            'Number of expected threads and actual threads do not match at breakpoint 1.')
 
         # Run to the second breakpoint
         self.runCmd("continue")
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(process, bp2_id)
-        self.assertIsNotNone(stopped_thread, "Process is not stopped at breakpoint 2")
+        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
+            process, bp2_id)
+        self.assertIsNotNone(stopped_thread,
+                             "Process is not stopped at breakpoint 2")
 
         # Update the number of threads
         new_num_threads = process.GetNumThreads()
-        self.assertEqual(new_num_threads, num_threads+1, 'Number of expected threads did not increase by 1 at bp 2.')
+        self.assertEqual(
+            new_num_threads,
+            num_threads + 1,
+            'Number of expected threads did not increase by 1 at bp 2.')
 
         # Run to the third breakpoint
         self.runCmd("continue")
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(process, bp3_id)
-        self.assertIsNotNone(stopped_thread, "Process is not stopped at breakpoint 3")
+        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
+            process, bp3_id)
+        self.assertIsNotNone(stopped_thread,
+                             "Process is not stopped at breakpoint 3")
 
         # Update the number of threads
         new_num_threads = process.GetNumThreads()
-        self.assertEqual(new_num_threads, num_threads, 'Number of expected threads is not equal to original number of threads at bp 3.')
+        self.assertEqual(
+            new_num_threads,
+            num_threads,
+            'Number of expected threads is not equal to original number of threads at bp 3.')
 
         # Run to the fourth breakpoint
         self.runCmd("continue")
-        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(process, bp4_id)
-        self.assertIsNotNone(stopped_thread, "Process is not stopped at breakpoint 4")
+        stopped_thread = lldbutil.get_one_thread_stopped_at_breakpoint_id(
+            process, bp4_id)
+        self.assertIsNotNone(stopped_thread,
+                             "Process is not stopped at breakpoint 4")
 
         # Update the number of threads
         new_num_threads = process.GetNumThreads()
-        self.assertEqual(new_num_threads, num_threads-1, 'Number of expected threads did not decrease by 1 at bp 4.')
+        self.assertEqual(
+            new_num_threads,
+            num_threads - 1,
+            'Number of expected threads did not decrease by 1 at bp 4.')
 
         # Run to completion
         self.runCmd("continue")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test that we obey thread conditioned bre
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ThreadSpecificBreakTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -30,24 +31,42 @@ class ThreadSpecificBreakTestCase(TestBa
         # This test works by setting a breakpoint in a function conditioned to stop only on
         # the main thread, and then calling this function on a secondary thread, joining,
         # and then calling again on the main thread.  If the thread specific breakpoint works
-        # then it should not be hit on the secondary thread, only on the main thread.
-
-        main_source_spec = lldb.SBFileSpec ("main.cpp")
+        # then it should not be hit on the secondary thread, only on the main
+        # thread.
 
-        main_breakpoint = target.BreakpointCreateBySourceRegex("Set main breakpoint here", main_source_spec);
-        thread_breakpoint = target.BreakpointCreateBySourceRegex("Set thread-specific breakpoint here", main_source_spec)
+        main_source_spec = lldb.SBFileSpec("main.cpp")
 
-        self.assertTrue(main_breakpoint.IsValid(), "Failed to set main breakpoint.")
-        self.assertGreater(main_breakpoint.GetNumLocations(), 0, "main breakpoint has no locations associated with it.")
-        self.assertTrue(thread_breakpoint.IsValid(), "Failed to set thread breakpoint.")
-        self.assertGreater(thread_breakpoint.GetNumLocations(), 0, "thread breakpoint has no locations associated with it.")
+        main_breakpoint = target.BreakpointCreateBySourceRegex(
+            "Set main breakpoint here", main_source_spec)
+        thread_breakpoint = target.BreakpointCreateBySourceRegex(
+            "Set thread-specific breakpoint here", main_source_spec)
+
+        self.assertTrue(
+            main_breakpoint.IsValid(),
+            "Failed to set main breakpoint.")
+        self.assertGreater(
+            main_breakpoint.GetNumLocations(),
+            0,
+            "main breakpoint has no locations associated with it.")
+        self.assertTrue(
+            thread_breakpoint.IsValid(),
+            "Failed to set thread breakpoint.")
+        self.assertGreater(
+            thread_breakpoint.GetNumLocations(),
+            0,
+            "thread breakpoint has no locations associated with it.")
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
-        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(process, main_breakpoint)
-        self.assertEqual(len(stopped_threads), 1, "main breakpoint stopped at unexpected number of threads")
+        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, main_breakpoint)
+        self.assertEqual(
+            len(stopped_threads),
+            1,
+            "main breakpoint stopped at unexpected number of threads")
         main_thread = stopped_threads[0]
         main_thread_id = main_thread.GetThreadID()
 
@@ -58,7 +77,17 @@ class ThreadSpecificBreakTestCase(TestBa
 
         process.Continue()
         next_stop_state = process.GetState()
-        self.assertEqual(next_stop_state, lldb.eStateStopped, "We should have stopped at the thread breakpoint.")
-        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(process, thread_breakpoint)
-        self.assertEqual(len(stopped_threads), 1, "thread breakpoint stopped at unexpected number of threads")
-        self.assertEqual(stopped_threads[0].GetThreadID(), main_thread_id, "thread breakpoint stopped at the wrong thread")
+        self.assertEqual(
+            next_stop_state,
+            lldb.eStateStopped,
+            "We should have stopped at the thread breakpoint.")
+        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, thread_breakpoint)
+        self.assertEqual(
+            len(stopped_threads),
+            1,
+            "thread breakpoint stopped at unexpected number of threads")
+        self.assertEqual(
+            stopped_threads[0].GetThreadID(),
+            main_thread_id,
+            "thread breakpoint stopped at the wrong thread")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py Tue Sep  6 15:57:50 2016
@@ -6,20 +6,23 @@ conditioned breakpoints simultaneously
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ThreadSpecificBreakPlusConditionTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIf(oslist=['windows', 'freebsd']) # test frequently times out or hangs
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr18522') # hits break in another thread in testrun
+    # test frequently times out or hangs
+    @skipIf(oslist=['windows', 'freebsd'])
+    # hits break in another thread in testrun
+    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr18522')
     @add_test_categories(['pyapi'])
     def test_python(self):
         """Test that we obey thread conditioned breakpoints."""
@@ -29,18 +32,24 @@ class ThreadSpecificBreakPlusConditionTe
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        main_source_spec = lldb.SBFileSpec ("main.cpp")
+        main_source_spec = lldb.SBFileSpec("main.cpp")
 
-        # Set a breakpoint in the thread body, and make it active for only the first thread.
-        break_thread_body = target.BreakpointCreateBySourceRegex ("Break here in thread body.", main_source_spec)
-        self.assertTrue (break_thread_body.IsValid() and break_thread_body.GetNumLocations() > 0, "Failed to set thread body breakpoint.")
+        # Set a breakpoint in the thread body, and make it active for only the
+        # first thread.
+        break_thread_body = target.BreakpointCreateBySourceRegex(
+            "Break here in thread body.", main_source_spec)
+        self.assertTrue(
+            break_thread_body.IsValid() and break_thread_body.GetNumLocations() > 0,
+            "Failed to set thread body breakpoint.")
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_thread_body)
-        
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_thread_body)
+
         victim_thread = threads[0]
 
         # Pick one of the threads, and change the breakpoint so it ONLY stops for this thread,
@@ -51,14 +60,18 @@ class ThreadSpecificBreakPlusConditionTe
 
         frame = victim_thread.GetFrameAtIndex(0)
         value = frame.FindVariable("my_value").GetValueAsSigned(0)
-        self.assertTrue (value > 0 and value < 11, "Got a reasonable value for my_value.")
+        self.assertTrue(
+            value > 0 and value < 11,
+            "Got a reasonable value for my_value.")
 
-        cond_string = "my_value != %d"%(value)
+        cond_string = "my_value != %d" % (value)
 
         break_thread_body.SetThreadID(victim_thread.GetThreadID())
-        break_thread_body.SetCondition (cond_string)
+        break_thread_body.SetCondition(cond_string)
 
         process.Continue()
 
         next_stop_state = process.GetState()
-        self.assertTrue (next_stop_state == lldb.eStateExited, "We should have not hit the breakpoint again.")
+        self.assertTrue(
+            next_stop_state == lldb.eStateExited,
+            "We should have not hit the breakpoint again.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py Tue Sep  6 15:57:50 2016
@@ -2,25 +2,29 @@
 Tests basic ThreadSanitizer support (detecting a data race).
 """
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 import json
 
+
 class TsanBasicTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
+    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
     @skipIfRemote
     @skipUnlessCompilerRt
     @skipUnlessThreadSanitizer
-    def test (self):
-        self.build ()
-        self.tsan_tests ()
+    def test(self):
+        self.build()
+        self.tsan_tests()
 
     def setUp(self):
         # Call super's setUp().
@@ -29,26 +33,33 @@ class TsanBasicTestCase(TestBase):
         self.line_thread1 = line_number('main.c', '// thread1 line')
         self.line_thread2 = line_number('main.c', '// thread2 line')
 
-    def tsan_tests (self):
-        exe = os.path.join (os.getcwd(), "a.out")
-        self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ])
+    def tsan_tests(self):
+        exe = os.path.join(os.getcwd(), "a.out")
+        self.expect(
+            "file " + exe,
+            patterns=["Current executable set to .*a.out"])
 
         self.runCmd("run")
 
         stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
         if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable interceptors.
+            # On OS X 10.10 and older, we need to re-exec to enable
+            # interceptors.
             self.runCmd("continue")
 
         # the stop reason of the thread should be breakpoint.
         self.expect("thread list", "A data race should be detected",
-            substrs = ['stopped', 'stop reason = Data race detected'])
+                    substrs=['stopped', 'stop reason = Data race detected'])
 
-        self.assertEqual(self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(), lldb.eStopReasonInstrumentation)
+        self.assertEqual(
+            self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(),
+            lldb.eStopReasonInstrumentation)
 
         # test that the TSan dylib is present
-        self.expect("image lookup -n __tsan_get_current_report", "__tsan_get_current_report should be present",
-            substrs = ['1 match found'])
+        self.expect(
+            "image lookup -n __tsan_get_current_report",
+            "__tsan_get_current_report should be present",
+            substrs=['1 match found'])
 
         # We should be stopped in __tsan_on_report
         process = self.dbg.GetSelectedTarget().process
@@ -56,7 +67,8 @@ class TsanBasicTestCase(TestBase):
         frame = thread.GetSelectedFrame()
         self.assertTrue("__tsan_on_report" in frame.GetFunctionName())
 
-        # The stopped thread backtrace should contain either line1 or line2 from main.c.
+        # The stopped thread backtrace should contain either line1 or line2
+        # from main.c.
         found = False
         for i in range(0, thread.GetNumFrames()):
             frame = thread.GetFrameAtIndex(i)
@@ -67,8 +79,13 @@ class TsanBasicTestCase(TestBase):
                     found = True
         self.assertTrue(found)
 
-        self.expect("thread info -s", "The extended stop info should contain the TSan provided fields",
-            substrs = ["instrumentation_class", "description", "mops"])
+        self.expect(
+            "thread info -s",
+            "The extended stop info should contain the TSan provided fields",
+            substrs=[
+                "instrumentation_class",
+                "description",
+                "mops"])
 
         output_lines = self.res.GetOutput().split('\n')
         json_line = '\n'.join(output_lines[2:])
@@ -77,10 +94,12 @@ class TsanBasicTestCase(TestBase):
         self.assertEqual(data["issue_type"], "data-race")
         self.assertEqual(len(data["mops"]), 2)
 
-        backtraces = thread.GetStopReasonExtendedBacktraces(lldb.eInstrumentationRuntimeTypeAddressSanitizer)
+        backtraces = thread.GetStopReasonExtendedBacktraces(
+            lldb.eInstrumentationRuntimeTypeAddressSanitizer)
         self.assertEqual(backtraces.GetSize(), 0)
 
-        backtraces = thread.GetStopReasonExtendedBacktraces(lldb.eInstrumentationRuntimeTypeThreadSanitizer)
+        backtraces = thread.GetStopReasonExtendedBacktraces(
+            lldb.eInstrumentationRuntimeTypeThreadSanitizer)
         self.assertTrue(backtraces.GetSize() >= 2)
 
         # First backtrace is a memory operation
@@ -111,8 +130,8 @@ class TsanBasicTestCase(TestBase):
 
         # the stop reason of the thread should be a SIGABRT.
         self.expect("thread list", "We should be stopped due a SIGABRT",
-            substrs = ['stopped', 'stop reason = signal SIGABRT'])
+                    substrs=['stopped', 'stop reason = signal SIGABRT'])
 
         # test that we're in pthread_kill now (TSan abort the process)
         self.expect("thread list", "We should be stopped in pthread_kill",
-            substrs = ['pthread_kill'])
+                    substrs=['pthread_kill'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py Tue Sep  6 15:57:50 2016
@@ -2,47 +2,59 @@
 Tests that TSan correctly reports the filename and line number of a racy global C++ variable.
 """
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 import json
 
+
 class TsanCPPGlobalLocationTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
+    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
     @skipIfRemote
     @skipUnlessCompilerRt
     @skipUnlessThreadSanitizer
-    def test (self):
-        self.build ()
-        self.tsan_tests ()
+    def test(self):
+        self.build()
+        self.tsan_tests()
 
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
 
-    def tsan_tests (self):
-        exe = os.path.join (os.getcwd(), "a.out")
-        self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ])
+    def tsan_tests(self):
+        exe = os.path.join(os.getcwd(), "a.out")
+        self.expect(
+            "file " + exe,
+            patterns=["Current executable set to .*a.out"])
 
         self.runCmd("run")
 
         stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
         if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable interceptors.
+            # On OS X 10.10 and older, we need to re-exec to enable
+            # interceptors.
             self.runCmd("continue")
 
         # the stop reason of the thread should be breakpoint.
         self.expect("thread list", "A data race should be detected",
-            substrs = ['stopped', 'stop reason = Data race detected'])
+                    substrs=['stopped', 'stop reason = Data race detected'])
 
-        self.expect("thread info -s", "The extended stop info should contain the TSan provided fields",
-            substrs = ["instrumentation_class", "description", "mops"])
+        self.expect(
+            "thread info -s",
+            "The extended stop info should contain the TSan provided fields",
+            substrs=[
+                "instrumentation_class",
+                "description",
+                "mops"])
 
         output_lines = self.res.GetOutput().split('\n')
         json_line = '\n'.join(output_lines[2:])
@@ -51,4 +63,8 @@ class TsanCPPGlobalLocationTestCase(Test
         self.assertEqual(data["issue_type"], "data-race")
 
         self.assertTrue(data["location_filename"].endswith("/main.cpp"))
-        self.assertEqual(data["location_line"], line_number('main.cpp', '// global variable'))
+        self.assertEqual(
+            data["location_line"],
+            line_number(
+                'main.cpp',
+                '// global variable'))

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py Tue Sep  6 15:57:50 2016
@@ -2,53 +2,69 @@
 Tests that TSan correctly reports the filename and line number of a racy global variable.
 """
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 import json
 
+
 class TsanGlobalLocationTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
+    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
     @skipIfRemote
     @skipUnlessCompilerRt
     @skipUnlessThreadSanitizer
-    def test (self):
-        self.build ()
-        self.tsan_tests ()
+    def test(self):
+        self.build()
+        self.tsan_tests()
 
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
 
-    def tsan_tests (self):
-        exe = os.path.join (os.getcwd(), "a.out")
-        self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ])
+    def tsan_tests(self):
+        exe = os.path.join(os.getcwd(), "a.out")
+        self.expect(
+            "file " + exe,
+            patterns=["Current executable set to .*a.out"])
 
         self.runCmd("run")
 
         stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
         if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable interceptors.
+            # On OS X 10.10 and older, we need to re-exec to enable
+            # interceptors.
             self.runCmd("continue")
 
         # the stop reason of the thread should be breakpoint.
         self.expect("thread list", "A data race should be detected",
-            substrs = ['stopped', 'stop reason = Data race detected'])
+                    substrs=['stopped', 'stop reason = Data race detected'])
 
-        self.expect("thread info -s", "The extended stop info should contain the TSan provided fields",
-            substrs = ["instrumentation_class", "description", "mops"])
+        self.expect(
+            "thread info -s",
+            "The extended stop info should contain the TSan provided fields",
+            substrs=[
+                "instrumentation_class",
+                "description",
+                "mops"])
 
         output_lines = self.res.GetOutput().split('\n')
         json_line = '\n'.join(output_lines[2:])
         data = json.loads(json_line)
         self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
         self.assertEqual(data["issue_type"], "data-race")
-        
+
         self.assertTrue(data["location_filename"].endswith("/main.c"))
-        self.assertEqual(data["location_line"], line_number('main.c', '// global variable'))
+        self.assertEqual(
+            data["location_line"],
+            line_number(
+                'main.c',
+                '// global variable'))

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py Tue Sep  6 15:57:50 2016
@@ -2,33 +2,39 @@
 Test ThreadSanitizer when multiple different issues are found.
 """
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 import json
 
+
 class TsanMultipleTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
+    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
     @skipIfRemote
     @skipUnlessCompilerRt
     @skipUnlessThreadSanitizer
-    def test (self):
-        self.build ()
-        self.tsan_tests ()
+    def test(self):
+        self.build()
+        self.tsan_tests()
 
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
 
-    def tsan_tests (self):
-        exe = os.path.join (os.getcwd(), "a.out")
-        self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ])
+    def tsan_tests(self):
+        exe = os.path.join(os.getcwd(), "a.out")
+        self.expect(
+            "file " + exe,
+            patterns=["Current executable set to .*a.out"])
 
         self.runCmd("env TSAN_OPTIONS=abort_on_error=0")
 
@@ -36,34 +42,46 @@ class TsanMultipleTestCase(TestBase):
 
         stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
         if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable interceptors.
+            # On OS X 10.10 and older, we need to re-exec to enable
+            # interceptors.
             self.runCmd("continue")
 
         report_count = 0
-        while self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason() == lldb.eStopReasonInstrumentation:
+        while self.dbg.GetSelectedTarget().process.GetSelectedThread(
+        ).GetStopReason() == lldb.eStopReasonInstrumentation:
             report_count += 1
 
-            stop_description = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopDescription(100)
+            stop_description = self.dbg.GetSelectedTarget(
+            ).process.GetSelectedThread().GetStopDescription(100)
 
             self.assertTrue(
-                 (stop_description == "Data race detected") or
-                 (stop_description == "Use of deallocated memory detected") or
-                 (stop_description == "Thread leak detected") or
-                 (stop_description == "Use of an uninitialized or destroyed mutex detected") or
-                 (stop_description == "Unlock of an unlocked mutex (or by a wrong thread) detected")
+                (stop_description == "Data race detected") or
+                (stop_description == "Use of deallocated memory detected") or
+                (stop_description == "Thread leak detected") or
+                (stop_description == "Use of an uninitialized or destroyed mutex detected") or
+                (stop_description == "Unlock of an unlocked mutex (or by a wrong thread) detected")
             )
 
-            self.expect("thread info -s", "The extended stop info should contain the TSan provided fields",
-                substrs = ["instrumentation_class", "description", "mops"])
+            self.expect(
+                "thread info -s",
+                "The extended stop info should contain the TSan provided fields",
+                substrs=[
+                    "instrumentation_class",
+                    "description",
+                    "mops"])
 
             output_lines = self.res.GetOutput().split('\n')
             json_line = '\n'.join(output_lines[2:])
             data = json.loads(json_line)
             self.assertEqual(data["instrumentation_class"], "ThreadSanitizer")
 
-            backtraces = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReasonExtendedBacktraces(lldb.eInstrumentationRuntimeTypeThreadSanitizer)
+            backtraces = self.dbg.GetSelectedTarget().process.GetSelectedThread(
+            ).GetStopReasonExtendedBacktraces(lldb.eInstrumentationRuntimeTypeThreadSanitizer)
             self.assertTrue(backtraces.GetSize() >= 1)
 
             self.runCmd("continue")
 
-        self.assertEqual(self.dbg.GetSelectedTarget().process.GetState(), lldb.eStateExited, PROCESS_EXITED)
+        self.assertEqual(
+            self.dbg.GetSelectedTarget().process.GetState(),
+            lldb.eStateExited,
+            PROCESS_EXITED)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py Tue Sep  6 15:57:50 2016
@@ -2,39 +2,48 @@
 Tests ThreadSanitizer's support to detect a leaked thread.
 """
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 import json
 
+
 class TsanThreadLeakTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
+    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
     @skipIfRemote
     @skipUnlessCompilerRt
     @skipUnlessThreadSanitizer
-    def test (self):
-        self.build ()
-        self.tsan_tests ()
-
-    def tsan_tests (self):
-        exe = os.path.join (os.getcwd(), "a.out")
-        self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ])
+    def test(self):
+        self.build()
+        self.tsan_tests()
+
+    def tsan_tests(self):
+        exe = os.path.join(os.getcwd(), "a.out")
+        self.expect(
+            "file " + exe,
+            patterns=["Current executable set to .*a.out"])
 
         self.runCmd("run")
 
         stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
         if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable interceptors.
+            # On OS X 10.10 and older, we need to re-exec to enable
+            # interceptors.
             self.runCmd("continue")
 
         # the stop reason of the thread should be breakpoint.
         self.expect("thread list", "A thread leak should be detected",
-            substrs = ['stopped', 'stop reason = Thread leak detected'])
+                    substrs=['stopped', 'stop reason = Thread leak detected'])
 
-        self.assertEqual(self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(), lldb.eStopReasonInstrumentation)
+        self.assertEqual(
+            self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(),
+            lldb.eStopReasonInstrumentation)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py Tue Sep  6 15:57:50 2016
@@ -2,51 +2,66 @@
 Tests that TSan and LLDB have correct thread numbers.
 """
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 import json
 
+
 class TsanThreadNumbersTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
-    @skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
+    @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
     @skipIfRemote
     @skipUnlessCompilerRt
     @skipUnlessThreadSanitizer
-    def test (self):
-        self.build ()
-        self.tsan_tests ()
+    def test(self):
+        self.build()
+        self.tsan_tests()
 
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
 
-    def tsan_tests (self):
-        exe = os.path.join (os.getcwd(), "a.out")
-        self.expect("file " + exe, patterns = [ "Current executable set to .*a.out" ])
+    def tsan_tests(self):
+        exe = os.path.join(os.getcwd(), "a.out")
+        self.expect(
+            "file " + exe,
+            patterns=["Current executable set to .*a.out"])
 
         self.runCmd("run")
 
         stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
         if stop_reason == lldb.eStopReasonExec:
-            # On OS X 10.10 and older, we need to re-exec to enable interceptors.
+            # On OS X 10.10 and older, we need to re-exec to enable
+            # interceptors.
             self.runCmd("continue")
 
         # the stop reason of the thread should be breakpoint.
         self.expect("thread list", "A data race should be detected",
-            substrs = ['stopped', 'stop reason = Data race detected'])
-
-        self.assertEqual(self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(), lldb.eStopReasonInstrumentation)
-
-        report_thread_id = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetIndexID()
+                    substrs=['stopped', 'stop reason = Data race detected'])
 
-        self.expect("thread info -s", "The extended stop info should contain the TSan provided fields",
-            substrs = ["instrumentation_class", "description", "mops"])
+        self.assertEqual(
+            self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason(),
+            lldb.eStopReasonInstrumentation)
+
+        report_thread_id = self.dbg.GetSelectedTarget(
+        ).process.GetSelectedThread().GetIndexID()
+
+        self.expect(
+            "thread info -s",
+            "The extended stop info should contain the TSan provided fields",
+            substrs=[
+                "instrumentation_class",
+                "description",
+                "mops"])
 
         output_lines = self.res.GetOutput().split('\n')
         json_line = '\n'.join(output_lines[2:])
@@ -59,10 +74,15 @@ class TsanThreadNumbersTestCase(TestBase
 
         other_thread_id = data["mops"][1]["thread_id"]
         self.assertTrue(other_thread_id != report_thread_id)
-        other_thread = self.dbg.GetSelectedTarget().process.GetThreadByIndexID(other_thread_id)
+        other_thread = self.dbg.GetSelectedTarget(
+        ).process.GetThreadByIndexID(other_thread_id)
         self.assertTrue(other_thread.IsValid())
 
         self.runCmd("thread select %d" % other_thread_id)
 
-        self.expect("thread backtrace", "The other thread should be stopped in f1 or f2",
-            substrs = ["a.out", "main.c"])
+        self.expect(
+            "thread backtrace",
+            "The other thread should be stopped in f1 or f2",
+            substrs=[
+                "a.out",
+                "main.c"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test lldb command aliases.
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class LaunchInTerminalTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,18 +25,26 @@ class LaunchInTerminalTestCase(TestBase)
     @expectedFailureDarwin("llvm.org/pr25484")
     # If the test is being run under sudo, the spawned terminal won't retain that elevated
     # privilege so it can't open the socket to talk back to the test case
-    @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0, "test cannot be run as root")
+    @unittest2.skipIf(hasattr(os, 'geteuid') and os.geteuid()
+                      == 0, "test cannot be run as root")
     # Do we need to disable this test if the testsuite is being run on a remote system?
-    # This env var is only defined when the shell is running in a local mac terminal window
-    @unittest2.skipUnless('TERM_PROGRAM' in os.environ, "test must be run on local system")
+    # This env var is only defined when the shell is running in a local mac
+    # terminal window
+    @unittest2.skipUnless(
+        'TERM_PROGRAM' in os.environ,
+        "test must be run on local system")
     @no_debug_info_test
-    def test_launch_in_terminal (self):
+    def test_launch_in_terminal(self):
         exe = "/bin/ls"
         target = self.dbg.CreateTarget(exe)
         launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"])
-        launch_info.SetLaunchFlags(lldb.eLaunchFlagLaunchInTTY | lldb.eLaunchFlagCloseTTYOnExit)
+        launch_info.SetLaunchFlags(
+            lldb.eLaunchFlagLaunchInTTY | lldb.eLaunchFlagCloseTTYOnExit)
         error = lldb.SBError()
-        process = target.Launch (launch_info, error)
-        self.assertTrue(error.Success(), "Make sure launch happened successfully in a terminal window")
-        # Running in synchronous mode our process should have run and already exited by the time target.Launch() returns
+        process = target.Launch(launch_info, error)
+        self.assertTrue(
+            error.Success(),
+            "Make sure launch happened successfully in a terminal window")
+        # Running in synchronous mode our process should have run and already
+        # exited by the time target.Launch() returns
         self.assertTrue(process.GetState() == lldb.eStateExited)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py Tue Sep  6 15:57:50 2016
@@ -5,32 +5,37 @@ Check that types only get completed when
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TypeCompletionTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(compiler="icc", bugnumber="often fails with 'NameAndAddress should be valid.")
-    # Fails with gcc 4.8.1 with llvm.org/pr15301 LLDB prints incorrect sizes of STL containers
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="often fails with 'NameAndAddress should be valid.")
+    # Fails with gcc 4.8.1 with llvm.org/pr15301 LLDB prints incorrect sizes
+    # of STL containers
     def test_with_run_command(self):
         """Check that types only get completed when necessary."""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_source_regexp (self, "// Set break point at this line.")
+        lldbutil.run_break_set_by_source_regexp(
+            self, "// Set break point at this line.")
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # This is the function to remove the custom formats in order to have a
         # clean slate for the next test case.
@@ -42,68 +47,112 @@ class TypeCompletionTestCase(TestBase):
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
-        p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
+        p_vector = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
         p_type = p_vector.GetType()
-        self.assertFalse(p_type.IsTypeComplete(), 'vector<T> complete but it should not be')
+        self.assertFalse(
+            p_type.IsTypeComplete(),
+            'vector<T> complete but it should not be')
 
         self.runCmd("continue")
 
-        p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
+        p_vector = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
         p_type = p_vector.GetType()
-        self.assertFalse(p_type.IsTypeComplete(), 'vector<T> complete but it should not be')
+        self.assertFalse(
+            p_type.IsTypeComplete(),
+            'vector<T> complete but it should not be')
 
         self.runCmd("continue")
 
         self.runCmd("frame variable p --show-types")
 
-        p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
+        p_vector = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
         p_type = p_vector.GetType()
-        self.assertTrue(p_type.IsTypeComplete(), 'vector<T> should now be complete')
+        self.assertTrue(
+            p_type.IsTypeComplete(),
+            'vector<T> should now be complete')
         name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(name_address_type.IsValid(), 'NameAndAddress should be valid')
-        self.assertFalse(name_address_type.IsTypeComplete(), 'NameAndAddress complete but it should not be')
+        self.assertTrue(
+            name_address_type.IsValid(),
+            'NameAndAddress should be valid')
+        self.assertFalse(
+            name_address_type.IsTypeComplete(),
+            'NameAndAddress complete but it should not be')
 
         self.runCmd("continue")
 
         self.runCmd("frame variable guy --show-types")
 
-        p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
+        p_vector = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
         p_type = p_vector.GetType()
-        self.assertTrue(p_type.IsTypeComplete(), 'vector<T> should now be complete')
+        self.assertTrue(
+            p_type.IsTypeComplete(),
+            'vector<T> should now be complete')
         name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(name_address_type.IsValid(), 'NameAndAddress should be valid')
-        self.assertTrue(name_address_type.IsTypeComplete(), 'NameAndAddress should now be complete')
+        self.assertTrue(
+            name_address_type.IsValid(),
+            'NameAndAddress should be valid')
+        self.assertTrue(
+            name_address_type.IsTypeComplete(),
+            'NameAndAddress should now be complete')
         field0 = name_address_type.GetFieldAtIndex(0)
-        self.assertTrue(field0.IsValid(), 'NameAndAddress::m_name should be valid')
+        self.assertTrue(
+            field0.IsValid(),
+            'NameAndAddress::m_name should be valid')
         string = field0.GetType().GetPointeeType()
         self.assertTrue(string.IsValid(), 'CustomString should be valid')
-        self.assertFalse(string.IsTypeComplete(), 'CustomString complete but it should not be')
+        self.assertFalse(string.IsTypeComplete(),
+                         'CustomString complete but it should not be')
 
         self.runCmd("continue")
 
-        p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
+        p_vector = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
         p_type = p_vector.GetType()
-        self.assertTrue(p_type.IsTypeComplete(), 'vector<T> should now be complete')
+        self.assertTrue(
+            p_type.IsTypeComplete(),
+            'vector<T> should now be complete')
         name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(name_address_type.IsValid(), 'NameAndAddress should be valid')
-        self.assertTrue(name_address_type.IsTypeComplete(), 'NameAndAddress should now be complete')
+        self.assertTrue(
+            name_address_type.IsValid(),
+            'NameAndAddress should be valid')
+        self.assertTrue(
+            name_address_type.IsTypeComplete(),
+            'NameAndAddress should now be complete')
         field0 = name_address_type.GetFieldAtIndex(0)
-        self.assertTrue(field0.IsValid(), 'NameAndAddress::m_name should be valid')
+        self.assertTrue(
+            field0.IsValid(),
+            'NameAndAddress::m_name should be valid')
         string = field0.GetType().GetPointeeType()
         self.assertTrue(string.IsValid(), 'CustomString should be valid')
-        self.assertFalse(string.IsTypeComplete(), 'CustomString complete but it should not be')
+        self.assertFalse(string.IsTypeComplete(),
+                         'CustomString complete but it should not be')
 
         self.runCmd('type category enable -l c++', check=False)
         self.runCmd('frame variable guy --show-types --ptr-depth=1')
 
-        p_vector = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame().FindVariable('p')
+        p_vector = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame().FindVariable('p')
         p_type = p_vector.GetType()
-        self.assertTrue(p_type.IsTypeComplete(), 'vector<T> should now be complete')
+        self.assertTrue(
+            p_type.IsTypeComplete(),
+            'vector<T> should now be complete')
         name_address_type = p_type.GetTemplateArgumentType(0)
-        self.assertTrue(name_address_type.IsValid(), 'NameAndAddress should be valid')
-        self.assertTrue(name_address_type.IsTypeComplete(), 'NameAndAddress should now be complete')
+        self.assertTrue(
+            name_address_type.IsValid(),
+            'NameAndAddress should be valid')
+        self.assertTrue(
+            name_address_type.IsTypeComplete(),
+            'NameAndAddress should now be complete')
         field0 = name_address_type.GetFieldAtIndex(0)
-        self.assertTrue(field0.IsValid(), 'NameAndAddress::m_name should be valid')
+        self.assertTrue(
+            field0.IsValid(),
+            'NameAndAddress::m_name should be valid')
         string = field0.GetType().GetPointeeType()
         self.assertTrue(string.IsValid(), 'CustomString should be valid')
-        self.assertTrue(string.IsTypeComplete(), 'CustomString should now be complete')
+        self.assertTrue(
+            string.IsTypeComplete(),
+            'CustomString should now be complete')

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test type lookup command.
 from __future__ import print_function
 
 
-
 import datetime
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TypeLookupTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -29,17 +30,22 @@ class TypeLookupTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
-                       
-        self.expect('type lookup NoSuchType', substrs=['@interface'], matching=False)
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        self.expect(
+            'type lookup NoSuchType',
+            substrs=['@interface'],
+            matching=False)
         self.expect('type lookup NSURL', substrs=['NSURL'])
         self.expect('type lookup NSArray', substrs=['NSArray'])
         self.expect('type lookup NSObject', substrs=['NSObject', 'isa'])
-        self.expect('type lookup PleaseDontBeARealTypeThatExists', substrs=["no type was found matching 'PleaseDontBeARealTypeThatExists'"])
+        self.expect('type lookup PleaseDontBeARealTypeThatExists', substrs=[
+                    "no type was found matching 'PleaseDontBeARealTypeThatExists'"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py Tue Sep  6 15:57:50 2016
@@ -5,20 +5,20 @@ Test that we can backtrace correctly fro
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class EHFrameBasedUnwind(TestBase):
     mydir = TestBase.compute_mydir(__file__)
 
-	
     @skipUnlessPlatform(['linux'])
     @skipIf(archs=["aarch64", "arm", "i386", "i686"])
-    def test (self):
+    def test(self):
         """Test that we can backtrace correctly from Non ABI  functions on the stack"""
         self.build()
         self.setTearDownCleanup()
@@ -28,9 +28,10 @@ class EHFrameBasedUnwind(TestBase):
 
         self.assertTrue(target, VALID_TARGET)
 
-        lldbutil.run_break_set_by_symbol (self, "func")
+        lldbutil.run_break_set_by_symbol(self, "func")
 
-        process = target.LaunchSimple (["abc", "xyz"], None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            ["abc", "xyz"], None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
@@ -42,10 +43,10 @@ class EHFrameBasedUnwind(TestBase):
 
         stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
         self.expect(stacktraces, exe=False,
-            substrs = ['(int)argc=3'])
+                    substrs=['(int)argc=3'])
 
         self.runCmd("thread step-inst")
 
         stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
         self.expect(stacktraces, exe=False,
-            substrs = ['(int)argc=3'])
+                    substrs=['(int)argc=3'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py Tue Sep  6 15:57:50 2016
@@ -5,18 +5,19 @@ Test that we can backtrace correctly wit
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class NoreturnUnwind(TestBase):
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfWindows # clang-cl does not support gcc style attributes.
-    def test (self):
+    @skipIfWindows  # clang-cl does not support gcc style attributes.
+    def test(self):
         """Test that we can backtrace correctly with 'noreturn' functions on the stack"""
         self.build()
         self.setTearDownCleanup()
@@ -25,7 +26,8 @@ class NoreturnUnwind(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
@@ -55,22 +57,27 @@ class NoreturnUnwind(TestBase):
             self.fail("Unable to find abort() in backtrace.")
 
         func_c_frame_number = abort_frame_number + 1
-        if thread.GetFrameAtIndex (func_c_frame_number).GetFunctionName() != "func_c":
+        if thread.GetFrameAtIndex(
+                func_c_frame_number).GetFunctionName() != "func_c":
             self.fail("Did not find func_c() above abort().")
 
         # This depends on whether we see the func_b inlined function in the backtrace
         # or not.  I'm not interested in testing that aspect of the backtrace here
         # right now.
 
-        if thread.GetFrameAtIndex (func_c_frame_number + 1).GetFunctionName() == "func_b":
+        if thread.GetFrameAtIndex(
+                func_c_frame_number +
+                1).GetFunctionName() == "func_b":
             func_a_frame_number = func_c_frame_number + 2
         else:
             func_a_frame_number = func_c_frame_number + 1
 
-        if thread.GetFrameAtIndex (func_a_frame_number).GetFunctionName() != "func_a":
+        if thread.GetFrameAtIndex(
+                func_a_frame_number).GetFunctionName() != "func_a":
             self.fail("Did not find func_a() above func_c().")
 
         main_frame_number = func_a_frame_number + 1
 
-        if thread.GetFrameAtIndex (main_frame_number).GetFunctionName() != "main":
+        if thread.GetFrameAtIndex(
+                main_frame_number).GetFunctionName() != "main":
             self.fail("Did not find main() above func_a().")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py Tue Sep  6 15:57:50 2016
@@ -5,20 +5,21 @@ Test that we can backtrace correctly wit
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class SigtrampUnwind(TestBase):
     mydir = TestBase.compute_mydir(__file__)
 
     # On different platforms the "_sigtramp" and "__kill" frames are likely to be different.
     # This test could probably be adapted to run on linux/*bsd easily enough.
     @skipUnlessDarwin
-    def test (self):
+    def test(self):
         """Test that we can backtrace correctly with _sigtramp on the stack"""
         self.build()
         self.setTearDownCleanup()
@@ -27,10 +28,11 @@ class SigtrampUnwind(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
+        lldbutil.run_break_set_by_file_and_line(self, "main.c", line_number(
+            'main.c', '// Set breakpoint here'), num_expected_locations=1)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", line_number('main.c', '// Set breakpoint here'), num_expected_locations=1)
-
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
@@ -40,10 +42,20 @@ class SigtrampUnwind(TestBase):
                       "instead the actual state is: '%s'" %
                       lldbutil.state_type_to_str(process.GetState()))
 
-        self.expect("pro handle  -n false -p true -s false SIGUSR1", "Have lldb pass SIGUSR1 signals",
-            substrs = ["SIGUSR1", "true", "false", "false"])
-
-        lldbutil.run_break_set_by_symbol (self, "handler", num_expected_locations=1, module_name="a.out")
+        self.expect(
+            "pro handle  -n false -p true -s false SIGUSR1",
+            "Have lldb pass SIGUSR1 signals",
+            substrs=[
+                "SIGUSR1",
+                "true",
+                "false",
+                "false"])
+
+        lldbutil.run_break_set_by_symbol(
+            self,
+            "handler",
+            num_expected_locations=1,
+            module_name="a.out")
 
         self.runCmd("continue")
 
@@ -69,14 +81,14 @@ class SigtrampUnwind(TestBase):
             for f in thread.frames:
                 print("  %d %s" % (f.GetFrameID(), f.GetFunctionName()))
 
-        if found_handler == False:
+        if not found_handler:
             self.fail("Unable to find handler() in backtrace.")
 
-        if found_sigtramp == False:
+        if not found_sigtramp:
             self.fail("Unable to find _sigtramp() in backtrace.")
 
-        if found_kill == False:
+        if not found_kill:
             self.fail("Unable to find kill() in backtrace.")
 
-        if found_main == False:
+        if not found_main:
             self.fail("Unable to find main() in backtrace.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py Tue Sep  6 15:57:50 2016
@@ -13,9 +13,9 @@ after escaping some special characters).
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -23,10 +23,11 @@ from lldbsuite.test import lldbutil
 
 test_source_dirs = ["."]
 
+
 class StandardUnwindTest(TestBase):
     mydir = TestBase.compute_mydir(__file__)
 
-    def standard_unwind_tests (self):
+    def standard_unwind_tests(self):
         # The following variables have to be defined for each architecture and OS we testing for:
         # base_function_names: List of function names where we accept that the stack unwinding is
         #                      correct if they are on the stack. It should include the bottom most
@@ -36,20 +37,27 @@ class StandardUnwindTest(TestBase):
         #                         instruction by instruction for any reason. (A valid reason is if
         #                         it is impossible to step through a function instruction by
         #                         instruction because it is special for some reason.) For these
-        #                         functions we will immediately do a step-out when we hit them.
+        # functions we will immediately do a step-out when we hit them.
 
         triple = self.dbg.GetSelectedPlatform().GetTriple()
         if re.match("arm-.*-.*-android", triple):
             base_function_names = [
                 "_start",                # Base function on the stack
                 "__memcpy_base",         # Function reached by a fall through from the previous function
-                "__memcpy_base_aligned", # Function reached by a fall through from the previous function
+                "__memcpy_base_aligned",
+                # Function reached by a fall through from the previous function
             ]
             no_step_function_names = [
-                "__sync_fetch_and_add_4", # Calls into a special SO where we can't set a breakpoint
-                "pthread_mutex_lock",     # Uses ldrex and strex what interferes with the software single stepping
-                "pthread_mutex_unlock",   # Uses ldrex and strex what interferes with the software single stepping
-                "pthread_once",           # Uses ldrex and strex what interferes with the software single stepping
+                "__sync_fetch_and_add_4",  # Calls into a special SO where we can't set a breakpoint
+                "pthread_mutex_lock",
+                # Uses ldrex and strex what interferes with the software single
+                # stepping
+                "pthread_mutex_unlock",
+                # Uses ldrex and strex what interferes with the software single
+                # stepping
+                "pthread_once",
+                # Uses ldrex and strex what interferes with the software single
+                # stepping
             ]
         elif re.match("aarch64-.*-.*-android", triple):
             base_function_names = [
@@ -57,11 +65,21 @@ class StandardUnwindTest(TestBase):
             ]
             no_step_function_names = [
                 None,
-                "__cxa_guard_acquire",    # Uses ldxr and stxr what interferes with the software single stepping
-                "__cxa_guard_release",    # Uses ldxr and stxr what interferes with the software single stepping
-                "pthread_mutex_lock",     # Uses ldxr and stxr what interferes with the software single stepping
-                "pthread_mutex_unlock",   # Uses ldxr and stxr what interferes with the software single stepping
-                "pthread_once",           # Uses ldxr and stxr what interferes with the software single stepping
+                "__cxa_guard_acquire",
+                # Uses ldxr and stxr what interferes with the software single
+                # stepping
+                "__cxa_guard_release",
+                # Uses ldxr and stxr what interferes with the software single
+                # stepping
+                "pthread_mutex_lock",
+                # Uses ldxr and stxr what interferes with the software single
+                # stepping
+                "pthread_mutex_unlock",
+                # Uses ldxr and stxr what interferes with the software single
+                # stepping
+                "pthread_once",
+                # Uses ldxr and stxr what interferes with the software single
+                # stepping
             ]
         else:
             self.skipTest("No expectations for the current architecture")
@@ -72,17 +90,23 @@ class StandardUnwindTest(TestBase):
 
         target.BreakpointCreateByName("main")
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process is not None, "SBTarget.Launch() failed")
-        self.assertEqual(process.GetState(), lldb.eStateStopped, "The process didn't hit main")
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            "The process didn't hit main")
 
         index = 0
         while process.GetState() == lldb.eStateStopped:
             index += 1
             if process.GetNumThreads() > 1:
                 # In case of a multi threaded inferior if one of the thread is stopped in a blocking
-                # syscall and we try to step it then SBThread::StepInstruction() will block forever
-                self.skipTest("Multi threaded inferiors are not supported by this test")
+                # syscall and we try to step it then
+                # SBThread::StepInstruction() will block forever
+                self.skipTest(
+                    "Multi threaded inferiors are not supported by this test")
 
             thread = process.GetThreadAtIndex(0)
 
@@ -97,9 +121,11 @@ class StandardUnwindTest(TestBase):
                     if f.GetFunctionName() in base_function_names:
                         found_main = True
                         break
-                self.assertTrue(found_main, "Main function isn't found on the backtrace")
+                self.assertTrue(found_main,
+                                "Main function isn't found on the backtrace")
 
-            if thread.GetFrameAtIndex(0).GetFunctionName() in no_step_function_names:
+            if thread.GetFrameAtIndex(
+                    0).GetFunctionName() in no_step_function_names:
                 thread.StepOut()
             else:
                 thread.StepInstruction(False)
@@ -113,13 +139,16 @@ for d in test_source_dirs:
         dirname = os.path.join(os.path.dirname(__file__), d)
 
     for root, _, files in os.walk(dirname):
-        test_source_files = test_source_files | set(os.path.abspath(os.path.join(root, f)) for f in files)
+        test_source_files = test_source_files | set(
+            os.path.abspath(os.path.join(root, f)) for f in files)
 
 # Generate test cases based on the collected source files
 for f in test_source_files:
     if f.endswith(".cpp") or f.endswith(".c"):
         @add_test_categories(["dwarf"])
-        @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
+        @unittest2.skipIf(
+            TestBase.skipLongRunningTest(),
+            "Skip this long running test")
         def test_function_dwarf(self, f=f):
             if f.endswith(".cpp"):
                 d = {'CXX_SOURCES': f}
@@ -143,4 +172,7 @@ for f in test_source_files:
             test_name = test_name.replace(c, '_')
 
         test_function_dwarf.__name__ = test_name
-        setattr(StandardUnwindTest, test_function_dwarf.__name__, test_function_dwarf)
+        setattr(
+            StandardUnwindTest,
+            test_function_dwarf.__name__,
+            test_function_dwarf)

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Verify that the hash computing logic for
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ValueMD5CrashTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -28,26 +29,27 @@ class ValueMD5CrashTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         value = self.frame().FindVariable("a")
         value.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-        
+
         v = value.GetValue()
         type_name = value.GetTypeName()
         self.assertTrue(type_name == "B *", "a is a B*")
-        
+
         self.runCmd("next")
         self.runCmd("process kill")
-        
+
         # now the process is dead, and value needs updating
         v = value.GetValue()
-        
+
         # if we are here, instead of crashed, the test succeeded

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test lldb watchpoint that uses '-s size'
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class HelloWatchLocationTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,18 +24,31 @@ class HelloWatchLocationTestCase(TestBas
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
         # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location";
-        # Build dictionary to have unique executable names for each test method.
+        self.violating_func = "do_bad_thing_with_location"
+        # Build dictionary to have unique executable names for each test
+        # method.
         self.exe_name = self.testMethodName
         self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(triple = re.compile('^mips')) # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet
-    @expectedFailureAll(archs=['s390x']) # SystemZ also currently supports only one H/W watchpoint
-    @expectedFailureAll(oslist=["linux"], archs=["arm", "aarch64"], bugnumber="llvm.org/pr27795")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Most of the MIPS boards provide only one H/W watchpoints, and S/W
+    # watchpoints are not supported yet
+    @expectedFailureAll(triple=re.compile('^mips'))
+    # SystemZ also currently supports only one H/W watchpoint
+    @expectedFailureAll(archs=['s390x'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=[
+            "arm",
+            "aarch64"],
+        bugnumber="llvm.org/pr27795")
     @skipIfDarwin
     def test_hello_watchlocation(self):
         """Test watching a location with '-s size' option."""
@@ -44,7 +58,8 @@ class HelloWatchLocationTestCase(TestBas
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1, loc_exact=False)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -52,48 +67,56 @@ class HelloWatchLocationTestCase(TestBas
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint pointed to by 'g_char_ptr'.
-        self.expect("watchpoint set expression -w write -s 1 -- g_char_ptr", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 1', 'type = w'])
+        self.expect(
+            "watchpoint set expression -w write -s 1 -- g_char_ptr",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 1',
+                'type = w'])
         # Get a hold of the watchpoint id just created, it is used later on to
         # match the watchpoint id which is expected to be fired.
-        match = re.match("Watchpoint created: Watchpoint (.*):", self.res.GetOutput().splitlines()[0])
+        match = re.match(
+            "Watchpoint created: Watchpoint (.*):",
+            self.res.GetOutput().splitlines()[0])
         if match:
             expected_wp_id = int(match.group(1), 0)
         else:
-            self.fail("Grokking watchpoint id faailed!") 
+            self.fail("Grokking watchpoint id faailed!")
 
         self.runCmd("expr unsigned val = *g_char_ptr; val")
         self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-            endstr = ' = 0')
+                    endstr=' = 0')
 
         self.runCmd("watchpoint set expression -w write -s 4 -- &threads[0]")
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type), but
         # only once.  The stop reason of the thread should be watchpoint.
         self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stopped',
-                       'stop reason = watchpoint %d' % expected_wp_id])
+                    substrs=['stopped',
+                             'stop reason = watchpoint %d' % expected_wp_id])
 
-        # Switch to the thread stopped due to watchpoint and issue some commands.
+        # Switch to the thread stopped due to watchpoint and issue some
+        # commands.
         self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
         self.runCmd("thread backtrace")
         self.expect("frame info",
-            substrs = [self.violating_func])
+                    substrs=[self.violating_func])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be 1.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 1'])
+                    substrs=['hit_count = 1'])
 
         self.runCmd("thread backtrace all")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py Tue Sep  6 15:57:50 2016
@@ -5,16 +5,17 @@ Test my first lldb watchpoint.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class HelloWatchpointTestCase(TestBase):
 
-    def getCategories (self):
+    def getCategories(self):
         return ['basic_process']
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,14 +26,19 @@ class HelloWatchpointTestCase(TestBase):
         # Our simple source filename.
         self.source = 'main.c'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
         # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source, '// Watchpoint variable declaration.')
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
         self.exe_name = 'a.out'
         self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_hello_watchpoint_using_watchpoint_set(self):
         """Test a simple sequence of watchpoint creation and watchpoint hit."""
         self.build(dictionary=self.d)
@@ -42,7 +48,8 @@ class HelloWatchpointTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -50,36 +57,45 @@ class HelloWatchpointTestCase(TestBase):
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for 'global'.
         # There should be only one watchpoint hit (see main.c).
-        self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type), but
         # only once.  The stop reason of the thread should be watchpoint.
         self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stopped',
-                       'stop reason = watchpoint'])
+                    substrs=['stopped',
+                             'stop reason = watchpoint'])
 
         self.runCmd("process continue")
 
         # Don't expect the read of 'global' to trigger a stop exception.
         process = self.dbg.GetSelectedTarget().GetProcess()
         if process.GetState() == lldb.eStateStopped:
-            self.assertFalse(lldbutil.get_stopped_thread(process, lldb.eStopReasonWatchpoint))
+            self.assertFalse(
+                lldbutil.get_stopped_thread(
+                    process, lldb.eStopReasonWatchpoint))
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be 1.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 1'])
+                    substrs=['hit_count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py Tue Sep  6 15:57:50 2016
@@ -5,28 +5,35 @@ Test that lldb watchpoint works for mult
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class WatchpointForMultipleThreadsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_watchpoint_multiple_threads(self):
         """Test that lldb watchpoint works for multiple threads."""
         self.build()
         self.setTearDownCleanup()
         self.hello_multiple_threads()
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_watchpoint_multiple_threads_wp_set_and_then_delete(self):
         """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
         self.build()
@@ -39,14 +46,21 @@ class WatchpointForMultipleThreadsTestCa
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.first_stop = line_number(self.source, '// Set break point at this line')
+        self.first_stop = line_number(
+            self.source, '// Set break point at this line')
 
     def hello_multiple_threads(self):
         """Test that lldb watchpoint works for multiple threads."""
-        self.runCmd("file %s" % os.path.join(os.getcwd(), 'a.out'), CURRENT_EXECUTABLE_SET)
+        self.runCmd(
+            "file %s" %
+            os.path.join(
+                os.getcwd(),
+                'a.out'),
+            CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.first_stop, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.first_stop, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -54,17 +68,22 @@ class WatchpointForMultipleThreadsTestCa
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for variable 'g_val'.
-        self.expect("watchpoint set variable -w write g_val", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w'])
+        self.expect(
+            "watchpoint set variable -w write g_val",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         while True:
             self.runCmd("process continue")
@@ -80,14 +99,20 @@ class WatchpointForMultipleThreadsTestCa
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be 1.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 1'])
+                    substrs=['hit_count = 1'])
 
     def hello_multiple_threads_wp_set_and_then_delete(self):
         """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
-        self.runCmd("file %s" % os.path.join(os.getcwd(), 'a.out'), CURRENT_EXECUTABLE_SET)
+        self.runCmd(
+            "file %s" %
+            os.path.join(
+                os.getcwd(),
+                'a.out'),
+            CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.first_stop, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.first_stop, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -95,17 +120,22 @@ class WatchpointForMultipleThreadsTestCa
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for variable 'g_val'.
-        self.expect("watchpoint set variable -w write g_val", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w'])
+        self.expect(
+            "watchpoint set variable -w write g_val",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         watchpoint_stops = 0
         while True:
@@ -120,13 +150,17 @@ class WatchpointForMultipleThreadsTestCa
                 self.runCmd("thread backtrace all")
                 watchpoint_stops += 1
                 if watchpoint_stops > 1:
-                    self.fail("Watchpoint hits not supposed to exceed 1 by design!")
-                # Good, we verified that the watchpoint works!  Now delete the watchpoint.
+                    self.fail(
+                        "Watchpoint hits not supposed to exceed 1 by design!")
+                # Good, we verified that the watchpoint works!  Now delete the
+                # watchpoint.
                 if self.TraceOn():
-                    print("watchpoint_stops=%d at the moment we delete the watchpoint" % watchpoint_stops)
+                    print(
+                        "watchpoint_stops=%d at the moment we delete the watchpoint" %
+                        watchpoint_stops)
                 self.runCmd("watchpoint delete 1")
                 self.expect("watchpoint list -v",
-                    substrs = ['No watchpoints currently set.'])
+                            substrs=['No watchpoints currently set.'])
                 continue
             else:
                 self.fail("The stop reason should be either break or watchpoint")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py Tue Sep  6 15:57:50 2016
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -17,10 +16,19 @@ class TestStepOverWatchpoint(TestBase):
     def getCategories(self):
         return ['basic_process']
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=['aarch64', 'arm'], bugnumber="llvm.org/pr26031")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=[
+            'aarch64',
+            'arm'],
+        bugnumber="llvm.org/pr26031")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test(self):
         """Test stepping over watchpoints."""
         self.build()
@@ -73,9 +81,10 @@ class TestStepOverWatchpoint(TestBase):
                                       lldb.eValueTypeVariableGlobal)
         self.assertTrue(write_value, "Failed to find write value.")
 
-        # Most of the MIPS boards provide only one H/W watchpoints, and S/W watchpoints are not supported yet
+        # Most of the MIPS boards provide only one H/W watchpoints, and S/W
+        # watchpoints are not supported yet
         arch = self.getArchitecture()
-        if re.match("^mips",arch):
+        if re.match("^mips", arch):
             self.runCmd("watchpoint delete 1")
 
         # resolve_location=True, read=False, write=True

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test that a variable watchpoint should o
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class WatchedVariableHitWhenInScopeTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,7 +21,7 @@ class WatchedVariableHitWhenInScopeTestC
     # This test depends on not tracking watchpoint expression hits if we have
     # left the watchpoint scope.  We will provide such an ability at some point
     # but the way this was done was incorrect, and it is unclear that for the
-    # most part that's not what folks mostly want, so we have to provide a 
+    # most part that's not what folks mostly want, so we have to provide a
     # clearer API to express this.
     #
 
@@ -42,7 +43,8 @@ class WatchedVariableHitWhenInScopeTestC
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped in main.
-        lldbutil.run_break_set_by_symbol (self, "main", num_expected_locations=-1)
+        lldbutil.run_break_set_by_symbol(
+            self, "main", num_expected_locations=-1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -50,34 +52,34 @@ class WatchedVariableHitWhenInScopeTestC
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a watchpoint for 'c.a'.
         # There should be only one watchpoint hit (see main.c).
         self.expect("watchpoint set variable c.a", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w'])
+                    substrs=['Watchpoint created', 'size = 4', 'type = w'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type), but
         # only once.  The stop reason of the thread should be watchpoint.
         self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stopped',
-                       'stop reason = watchpoint'])
+                    substrs=['stopped',
+                             'stop reason = watchpoint'])
 
         self.runCmd("process continue")
         # Don't expect the read of 'global' to trigger a stop exception.
         # The process status should be 'exited'.
         self.expect("process status",
-            substrs = ['exited'])
+                    substrs=['exited'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be 1.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 1'])
+                    substrs=['hit_count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test watchpoint list, enable, disable, a
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class WatchpointCommandsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,27 +23,37 @@ class WatchpointCommandsTestCase(TestBas
         # Our simple source filename.
         self.source = 'main.c'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
-        self.line2 = line_number(self.source, '// Set 2nd break point for disable_then_enable test case.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        self.line2 = line_number(
+            self.source,
+            '// Set 2nd break point for disable_then_enable test case.')
         # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source, '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test method.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
         self.exe_name = self.testMethodName
         self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_rw_watchpoint(self):
         """Test read_write watchpoint and expect to stop two times."""
         self.build(dictionary=self.d)
         self.setTearDownCleanup(dictionary=self.d)
-        
+
         exe = os.path.join(os.getcwd(), self.exe_name)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -50,60 +61,72 @@ class WatchpointCommandsTestCase(TestBas
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a read_write-type watchpoint for 'global'.
         # There should be two watchpoint hits (see main.c).
-        self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = rw',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['Number of supported hardware watchpoints:',
-                       'hit_count = 0'])
+                    substrs=['Number of supported hardware watchpoints:',
+                             'hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (read_write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (read_write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         self.runCmd("process continue")
 
         # There should be no more watchpoint hit and the process status should
         # be 'exited'.
         self.expect("process status",
-            substrs = ['exited'])
+                    substrs=['exited'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be 2.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 2'])
+                    substrs=['hit_count = 2'])
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_rw_watchpoint_delete(self):
         """Test delete watchpoint and expect not to stop for watchpoint."""
         self.build(dictionary=self.d)
         self.setTearDownCleanup(dictionary=self.d)
-        
+
         exe = os.path.join(os.getcwd(), self.exe_name)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -111,19 +134,27 @@ class WatchpointCommandsTestCase(TestBas
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a read_write-type watchpoint for 'global'.
         # There should be two watchpoint hits (see main.c).
-        self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = rw',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
-        # Delete the watchpoint immediately, but set auto-confirm to true first.
+        # Delete the watchpoint immediately, but set auto-confirm to true
+        # first.
         self.runCmd("settings set auto-confirm true")
         self.expect("watchpoint delete",
-            substrs = ['All watchpoints removed.'])
+                    substrs=['All watchpoints removed.'])
         # Restore the original setting of auto-confirm.
         self.runCmd("settings clear auto-confirm")
 
@@ -135,21 +166,26 @@ class WatchpointCommandsTestCase(TestBas
         # There should be no more watchpoint hit and the process status should
         # be 'exited'.
         self.expect("process status",
-            substrs = ['exited'])
+                    substrs=['exited'])
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_rw_watchpoint_set_ignore_count(self):
         """Test watchpoint ignore count and expect to not to stop at all."""
         self.build(dictionary=self.d)
         self.setTearDownCleanup(dictionary=self.d)
-        
+
         exe = os.path.join(os.getcwd(), self.exe_name)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -157,49 +193,61 @@ class WatchpointCommandsTestCase(TestBas
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a read_write-type watchpoint for 'global'.
         # There should be two watchpoint hits (see main.c).
-        self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = rw',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         # Set the ignore count of the watchpoint immediately.
         self.expect("watchpoint ignore -i 2",
-            substrs = ['All watchpoints ignored.'])
+                    substrs=['All watchpoints ignored.'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # Expect to find an ignore_count of 2.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0', 'ignore_count = 2'])
+                    substrs=['hit_count = 0', 'ignore_count = 2'])
 
         self.runCmd("process continue")
 
         # There should be no more watchpoint hit and the process status should
         # be 'exited'.
         self.expect("process status",
-            substrs = ['exited'])
+                    substrs=['exited'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # Expect to find a hit_count of 2 as well.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 2', 'ignore_count = 2'])
+                    substrs=['hit_count = 2', 'ignore_count = 2'])
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_rw_disable_after_first_stop(self):
         """Test read_write watchpoint but disable it after the first stop."""
         self.build(dictionary=self.d)
         self.setTearDownCleanup(dictionary=self.d)
-        
+
         exe = os.path.join(os.getcwd(), self.exe_name)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -207,49 +255,60 @@ class WatchpointCommandsTestCase(TestBas
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a read_write-type watchpoint for 'global'.
         # There should be two watchpoint hits (see main.c).
-        self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = rw',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['state = enabled', 'hit_count = 0'])
+                    substrs=['state = enabled', 'hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (read_write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         # Before continuing, we'll disable the watchpoint, which means we won't
         # stop again after this.
         self.runCmd("watchpoint disable")
 
         self.expect("watchpoint list -v",
-            substrs = ['state = disabled', 'hit_count = 1'])
+                    substrs=['state = disabled', 'hit_count = 1'])
 
         self.runCmd("process continue")
 
         # There should be no more watchpoint hit and the process status should
         # be 'exited'.
         self.expect("process status",
-            substrs = ['exited'])
+                    substrs=['exited'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 1.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 1'])
+                    substrs=['hit_count = 1'])
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_rw_disable_then_enable(self):
         """Test read_write watchpoint, disable initially, then enable it."""
         self.build(dictionary=self.d)
@@ -259,8 +318,10 @@ class WatchpointCommandsTestCase(TestBas
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line2, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line2, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -268,14 +329,21 @@ class WatchpointCommandsTestCase(TestBas
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a read_write-type watchpoint for 'global'.
         # There should be two watchpoint hits (see main.c).
-        self.expect("watchpoint set variable -w read_write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = rw',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         # Immediately, we disable the watchpoint.  We won't be stopping due to a
         # watchpoint after this.
@@ -284,36 +352,36 @@ class WatchpointCommandsTestCase(TestBas
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['state = disabled', 'hit_count = 0'])
+                    substrs=['state = disabled', 'hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the breakpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stop reason = breakpoint'])
+                    substrs=['stop reason = breakpoint'])
 
         # Before continuing, we'll enable the watchpoint, which means we will
         # stop again after this.
         self.runCmd("watchpoint enable")
 
         self.expect("watchpoint list -v",
-            substrs = ['state = enabled', 'hit_count = 0'])
+                    substrs=['state = enabled', 'hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (read_write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         self.runCmd("process continue")
 
         # There should be no more watchpoint hit and the process status should
         # be 'exited'.
         self.expect("process status",
-            substrs = ['exited'])
+                    substrs=['exited'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 1.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 1'])
+                    substrs=['hit_count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test 'watchpoint command'.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class WatchpointLLDBCommandTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,26 +23,36 @@ class WatchpointLLDBCommandTestCase(Test
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
         # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source, '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test method.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
         self.exe_name = 'a%d.out' % self.test_number
         self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=["aarch64"],
+        bugnumber="llvm.org/pr27710")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_watchpoint_command(self):
         """Test 'watchpoint command'."""
         self.build(dictionary=self.d)
         self.setTearDownCleanup(dictionary=self.d)
-        
+
         exe = os.path.join(os.getcwd(), self.exe_name)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -49,44 +60,58 @@ class WatchpointLLDBCommandTestCase(Test
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for 'global'.
-        self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         self.runCmd('watchpoint command add 1 -o "expr -- cookie = 777"')
 
         # List the watchpoint command we just added.
         self.expect("watchpoint command list 1",
-            substrs = ['expr -- cookie = 777'])
+                    substrs=['expr -- cookie = 777'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         # Check that the watchpoint snapshoting mechanism is working.
         self.expect("watchpoint list -v",
-            substrs = ['old value:', ' = 0',
-                       'new value:', ' = 1'])
+                    substrs=['old value:', ' = 0',
+                             'new value:', ' = 1'])
 
-        # The watchpoint command "forced" our global variable 'cookie' to become 777.
+        # The watchpoint command "forced" our global variable 'cookie' to
+        # become 777.
         self.expect("frame variable --show-globals cookie",
-            substrs = ['(int32_t)', 'cookie = 777'])
+                    substrs=['(int32_t)', 'cookie = 777'])
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=["aarch64"],
+        bugnumber="llvm.org/pr27710")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_watchpoint_command_can_disable_a_watchpoint(self):
         """Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
         self.build(dictionary=self.d)
@@ -96,7 +121,8 @@ class WatchpointLLDBCommandTestCase(Test
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -104,39 +130,46 @@ class WatchpointLLDBCommandTestCase(Test
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for 'global'.
-        self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         self.runCmd('watchpoint command add 1 -o "watchpoint disable 1"')
 
         # List the watchpoint command we just added.
         self.expect("watchpoint command list 1",
-            substrs = ['watchpoint disable 1'])
+                    substrs=['watchpoint disable 1'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         # Check that the watchpoint has been disabled.
         self.expect("watchpoint list -v",
-            substrs = ['disabled'])
+                    substrs=['disabled'])
 
         self.runCmd("process continue")
 
         # There should be no more watchpoint hit and the process status should
         # be 'exited'.
         self.expect("process status",
-            substrs = ['exited'])
+                    substrs=['exited'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test 'watchpoint command'.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class WatchpointPythonCommandTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,17 +23,26 @@ class WatchpointPythonCommandTestCase(Te
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
         # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source, '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test method.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
         self.exe_name = self.testMethodName
         self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr27710")
+    @skipIfFreeBSD  # timing out on buildbot
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=["aarch64"],
+        bugnumber="llvm.org/pr27710")
     def test_watchpoint_command(self):
         """Test 'watchpoint command'."""
         self.build(dictionary=self.d)
@@ -42,7 +52,8 @@ class WatchpointPythonCommandTestCase(Te
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 #        self.expect("breakpoint set -l %d" % self.line, BREAKPOINT_CREATED,
 #            startstr = "Breakpoint created: 1: file ='%s', line = %d, locations = 1" %
 #                       (self.source, self.line))#
@@ -53,46 +64,62 @@ class WatchpointPythonCommandTestCase(Te
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for 'global'.
-        self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
-        self.runCmd('watchpoint command add -s python 1 -o \'frame.EvaluateExpression("cookie = 777")\'')
+        self.runCmd(
+            'watchpoint command add -s python 1 -o \'frame.EvaluateExpression("cookie = 777")\'')
 
         # List the watchpoint command we just added.
         self.expect("watchpoint command list 1",
-            substrs = ['frame.EvaluateExpression', 'cookie = 777'])
+                    substrs=['frame.EvaluateExpression', 'cookie = 777'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         # Check that the watchpoint snapshoting mechanism is working.
         self.expect("watchpoint list -v",
-            substrs = ['old value:', ' = 0',
-                       'new value:', ' = 1'])
+                    substrs=['old value:', ' = 0',
+                             'new value:', ' = 1'])
 
-        # The watchpoint command "forced" our global variable 'cookie' to become 777.
+        # The watchpoint command "forced" our global variable 'cookie' to
+        # become 777.
         self.expect("frame variable --show-globals cookie",
-            substrs = ['(int32_t)', 'cookie = 777'])
+                    substrs=['(int32_t)', 'cookie = 777'])
 
-    @skipIfFreeBSD # timing out on buildbot
-    @expectedFailureAll(bugnumber="llvm.org/pr28055: continue in watchpoint commands disables the watchpoint")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr27710")
+    @skipIfFreeBSD  # timing out on buildbot
+    @expectedFailureAll(
+        bugnumber="llvm.org/pr28055: continue in watchpoint commands disables the watchpoint")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=["aarch64"],
+        bugnumber="llvm.org/pr27710")
     def test_continue_in_watchpoint_command(self):
         """Test continue in a watchpoint command."""
         self.build(dictionary=self.d)
@@ -102,7 +129,8 @@ class WatchpointPythonCommandTestCase(Te
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 #        self.expect("breakpoint set -l %d" % self.line, BREAKPOINT_CREATED,
 #            startstr = "Breakpoint created: 1: file ='%s', line = %d, locations = 1" %
 #                       (self.source, self.line))#
@@ -113,31 +141,39 @@ class WatchpointPythonCommandTestCase(Te
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for 'global'.
-        self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         cmd_script_file = os.path.join(os.getcwd(), "watchpoint_command.py")
-        self.runCmd("command script import '%s'"%(cmd_script_file))
+        self.runCmd("command script import '%s'" % (cmd_script_file))
 
-        self.runCmd('watchpoint command add -F watchpoint_command.watchpoint_command')
+        self.runCmd(
+            'watchpoint command add -F watchpoint_command.watchpoint_command')
 
         # List the watchpoint command we just added.
         self.expect("watchpoint command list 1",
-            substrs = ['watchpoint_command.watchpoint_command'])
+                    substrs=['watchpoint_command.watchpoint_command'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
 
         # We should have hit the watchpoint once, set cookie to 888, then continued to the
         # second hit and set it to 999
         self.expect("frame variable --show-globals cookie",
-            substrs = ['(int32_t)', 'cookie = 999'])
+                    substrs=['(int32_t)', 'cookie = 999'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/watchpoint_command.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/watchpoint_command.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/watchpoint_command.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/watchpoint_command.py Tue Sep  6 15:57:50 2016
@@ -1,7 +1,9 @@
 import lldb
 
 num_hits = 0
-def watchpoint_command (frame, wp, dict):
+
+
+def watchpoint_command(frame, wp, dict):
     global num_hits
     if num_hits == 0:
         print ("I stopped the first time")
@@ -9,6 +11,5 @@ def watchpoint_command (frame, wp, dict)
         num_hits += 1
         frame.thread.process.Continue()
     else:
-        print ("I stopped the %d time"%(num_hits))
+        print ("I stopped the %d time" % (num_hits))
         frame.EvaluateExpression("cookie = 999")
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test watchpoint modify command to set co
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class WatchpointConditionCmdTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,16 +23,25 @@ class WatchpointConditionCmdTestCase(Tes
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
         # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source, '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test method.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
         self.exe_name = self.testMethodName
         self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=["aarch64"],
+        bugnumber="llvm.org/pr27710")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_watchpoint_cond(self):
         """Test watchpoint condition."""
         self.build(dictionary=self.d)
@@ -41,7 +51,8 @@ class WatchpointConditionCmdTestCase(Tes
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -49,32 +60,39 @@ class WatchpointConditionCmdTestCase(Tes
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint for 'global'.
         # With a condition of 'global==5'.
-        self.expect("watchpoint set variable -w write global", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 4', 'type = w',
-                       '%s:%d' % (self.source, self.decl)])
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
 
         self.runCmd("watchpoint modify -c 'global==5'")
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0', 'global==5'])
+                    substrs=['hit_count = 0', 'global==5'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type).
         # The stop reason of the thread should be watchpoint.
         self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stop reason = watchpoint'])
+                    substrs=['stop reason = watchpoint'])
         self.expect("frame variable --show-globals global",
-            substrs = ['(int32_t)', 'global = 5'])
+                    substrs=['(int32_t)', 'global = 5'])
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be 2.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 5'])
+                    substrs=['hit_count = 5'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestWatchpointEvents (TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,51 +22,65 @@ class TestWatchpointEvents (TestBase):
         self.main_source = "main.c"
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=["aarch64"],
+        bugnumber="llvm.org/pr27710")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_with_python_api(self):
         """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
         self.build()
-        
+
         exe = os.path.join(os.getcwd(), "a.out")
 
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
 
-        break_in_main = target.BreakpointCreateBySourceRegex ('// Put a breakpoint here.', self.main_source_spec)
+        break_in_main = target.BreakpointCreateBySourceRegex(
+            '// Put a breakpoint here.', self.main_source_spec)
         self.assertTrue(break_in_main, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_main)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_in_main)
 
         if len(threads) != 1:
-            self.fail ("Failed to stop at first breakpoint in main.")
+            self.fail("Failed to stop at first breakpoint in main.")
 
         thread = threads[0]
         frame = thread.GetFrameAtIndex(0)
-        local_var = frame.FindVariable ("local_var")
-        self.assertTrue (local_var.IsValid())
+        local_var = frame.FindVariable("local_var")
+        self.assertTrue(local_var.IsValid())
 
         self.listener = lldb.SBListener("com.lldb.testsuite_listener")
         self.target_bcast = target.GetBroadcaster()
-        self.target_bcast.AddListener (self.listener, lldb.SBTarget.eBroadcastBitWatchpointChanged)
-        self.listener.StartListeningForEvents (self.target_bcast, lldb.SBTarget.eBroadcastBitWatchpointChanged)
+        self.target_bcast.AddListener(
+            self.listener, lldb.SBTarget.eBroadcastBitWatchpointChanged)
+        self.listener.StartListeningForEvents(
+            self.target_bcast, lldb.SBTarget.eBroadcastBitWatchpointChanged)
 
         error = lldb.SBError()
         local_watch = local_var.Watch(True, False, True, error)
         if not error.Success():
-            self.fail ("Failed to make watchpoint for local_var: %s"%(error.GetCString()))
+            self.fail(
+                "Failed to make watchpoint for local_var: %s" %
+                (error.GetCString()))
 
         self.GetWatchpointEvent(lldb.eWatchpointEventTypeAdded)
-        # Now change some of the features of this watchpoint and make sure we get events:
+        # Now change some of the features of this watchpoint and make sure we
+        # get events:
         local_watch.SetEnabled(False)
         self.GetWatchpointEvent(lldb.eWatchpointEventTypeDisabled)
 
@@ -79,19 +94,27 @@ class TestWatchpointEvents (TestBase):
         local_watch.SetCondition(condition)
         self.GetWatchpointEvent(lldb.eWatchpointEventTypeConditionChanged)
 
-        self.assertTrue(local_watch.GetCondition() == condition, 'make sure watchpoint condition is "' + condition + '"');
-        
-    def GetWatchpointEvent (self, event_type):
+        self.assertTrue(local_watch.GetCondition() == condition,
+                        'make sure watchpoint condition is "' + condition + '"')
+
+    def GetWatchpointEvent(self, event_type):
         # We added a watchpoint so we should get a watchpoint added event.
         event = lldb.SBEvent()
-        success = self.listener.WaitForEvent (1, event)
-        self.assertTrue(success == True, "Successfully got watchpoint event")
-        self.assertTrue (lldb.SBWatchpoint.EventIsWatchpointEvent(event), "Event is a watchpoint event.")
-        found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent (event)
-        self.assertTrue (found_type == event_type, "Event is not correct type, expected: %d, found: %d"%(event_type, found_type))
+        success = self.listener.WaitForEvent(1, event)
+        self.assertTrue(success, "Successfully got watchpoint event")
+        self.assertTrue(
+            lldb.SBWatchpoint.EventIsWatchpointEvent(event),
+            "Event is a watchpoint event.")
+        found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent(event)
+        self.assertTrue(
+            found_type == event_type,
+            "Event is not correct type, expected: %d, found: %d" %
+            (event_type,
+             found_type))
         # There shouldn't be another event waiting around:
-        found_event = self.listener.PeekAtNextEventForBroadcasterWithType (self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event)
+        found_event = self.listener.PeekAtNextEventForBroadcasterWithType(
+            self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event)
         if found_event:
             print("Found an event I didn't expect: ", event)
 
-        self.assertTrue (not found_event, "Only one event per change.")
+        self.assertTrue(not found_event, "Only one event per change.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py Tue Sep  6 15:57:50 2016
@@ -5,25 +5,29 @@ Test displayed value of a vector variabl
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestValueOfVectorVariableTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_value_of_vector_variable_using_watchpoint_set(self):
         """Test verify displayed value of vector variable."""
         self.build(dictionary=self.d)
         self.setTearDownCleanup(dictionary=self.d)
         self.value_of_vector_variable_with_watchpoint_set()
-    
+
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
@@ -39,10 +43,12 @@ class TestValueOfVectorVariableTestCase(
 
         # Set break to get a frame
         self.runCmd("b main")
-            
+
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Value of a vector variable should be displayed correctly
-        self.expect("watchpoint set variable global_vector", WATCHPOINT_CREATED,
-            substrs = ['new value: (1, 2, 3, 4)'])
+        self.expect(
+            "watchpoint set variable global_vector",
+            WATCHPOINT_CREATED,
+            substrs=['new value: (1, 2, 3, 4)'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test lldb watchpoint that uses 'watchpoi
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class WatchLocationUsingWatchpointSetTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,14 +23,24 @@ class WatchLocationUsingWatchpointSetTes
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
         # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location";
-        # Build dictionary to have unique executable names for each test method.
-
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["linux"], archs=['aarch64', 'arm'], bugnumber="llvm.org/pr26031")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+        self.violating_func = "do_bad_thing_with_location"
+        # Build dictionary to have unique executable names for each test
+        # method.
+
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=[
+            'aarch64',
+            'arm'],
+        bugnumber="llvm.org/pr26031")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_watchlocation_using_watchpoint_set(self):
         """Test watching a location with 'watchpoint set expression -w write -s size' option."""
         self.build()
@@ -39,7 +50,8 @@ class WatchLocationUsingWatchpointSetTes
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -47,45 +59,52 @@ class WatchLocationUsingWatchpointSetTes
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Now let's set a write-type watchpoint pointed to by 'g_char_ptr' and
         # with offset as 7.
         # The main.cpp, by design, misbehaves by not following the agreed upon
         # protocol of only accessing the allowable index range of [0, 6].
-        self.expect("watchpoint set expression -w write -s 1 -- g_char_ptr + 7", WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = 1', 'type = w'])
+        self.expect(
+            "watchpoint set expression -w write -s 1 -- g_char_ptr + 7",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 1',
+                'type = w'])
         self.runCmd("expr unsigned val = g_char_ptr[7]; val")
         self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-            endstr = ' = 0')
+                    endstr=' = 0')
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should be 0 initially.
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = 0'])
+                    substrs=['hit_count = 0'])
 
         self.runCmd("process continue")
 
         # We should be stopped again due to the watchpoint (write type), but
         # only once.  The stop reason of the thread should be watchpoint.
         self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stopped',
-                       'stop reason = watchpoint',
-                       self.violating_func])
+                    substrs=['stopped',
+                             'stop reason = watchpoint',
+                             self.violating_func])
 
-        # Switch to the thread stopped due to watchpoint and issue some commands.
+        # Switch to the thread stopped due to watchpoint and issue some
+        # commands.
         self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
         self.runCmd("thread backtrace")
         self.runCmd("expr unsigned val = g_char_ptr[7]; val")
         self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-            endstr = ' = 99')
+                    endstr=' = 99')
 
         # Use the '-v' option to do verbose listing of the watchpoint.
         # The hit count should now be the same as the number of threads that
         # stopped on a watchpoint.
-        threads = lldbutil.get_stopped_threads(self.process(), lldb.eStopReasonWatchpoint)
+        threads = lldbutil.get_stopped_threads(
+            self.process(), lldb.eStopReasonWatchpoint)
         self.expect("watchpoint list -v",
-            substrs = ['hit_count = %d' % len(threads)])
+                    substrs=['hit_count = %d' % len(threads)])
 
         self.runCmd("thread backtrace all")

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchpointSetErrorCases.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test error cases for the 'watchpoint set
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class WatchpointSetErrorTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,8 +23,10 @@ class WatchpointSetErrorTestCase(TestBas
         # Our simple source filename.
         self.source = 'main.cpp'
         # Find the line number to break inside main().
-        self.line = line_number(self.source, '// Set break point at this line.')
-        # Build dictionary to have unique executable names for each test method.
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        # Build dictionary to have unique executable names for each test
+        # method.
 
     @expectedFailureAll(oslist=["windows"])
     def test_error_cases_with_watchpoint_set(self):
@@ -35,7 +38,8 @@ class WatchpointSetErrorTestCase(TestBas
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -43,27 +47,29 @@ class WatchpointSetErrorTestCase(TestBas
         # We should be stopped again due to the breakpoint.
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # Try some error conditions:
 
         # 'watchpoint set' is now a multiword command.
         self.expect("watchpoint set",
-            substrs = ['The following subcommands are supported:',
-                       'expression',
-                       'variable'])
+                    substrs=['The following subcommands are supported:',
+                             'expression',
+                             'variable'])
         self.runCmd("watchpoint set variable -w read_write", check=False)
 
         # 'watchpoint set expression' with '-w' or '-s' specified now needs
         # an option terminator and a raw expression after that.
         self.expect("watchpoint set expression -w write --", error=True,
-            startstr = 'error: ')
+                    startstr='error: ')
 
         # It's an error if the expression did not evaluate to an address.
-        self.expect("watchpoint set expression MyAggregateDataType", error=True,
-            startstr = 'error: expression did not evaluate to an address')
+        self.expect(
+            "watchpoint set expression MyAggregateDataType",
+            error=True,
+            startstr='error: expression did not evaluate to an address')
 
         # Wrong size parameter is an error.
         self.expect("watchpoint set variable -s -128", error=True,
-            substrs = ['invalid enumeration value'])
+                    substrs=['invalid enumeration value'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py Tue Sep  6 15:57:50 2016
@@ -7,12 +7,14 @@ when they are packed in a 8-byte region.
 
 from __future__ import print_function
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class WatchpointSizeTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
@@ -29,23 +31,35 @@ class WatchpointSizeTestCase(TestBase):
         self.exe_name = 'a.out'
         self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_byte_size_watchpoints_with_byte_selection(self):
         """Test to selectively watch different bytes in a 8-byte array."""
         self.run_watchpoint_size_test('byteArray', 8, '1')
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_two_byte_watchpoints_with_word_selection(self):
         """Test to selectively watch different words in an 8-byte word array."""
         self.run_watchpoint_size_test('wordArray', 4, '2')
 
-    @expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(archs=['s390x']) # Read-write watchpoints not supported on SystemZ
+    # Watchpoints not supported
+    @expectedFailureAndroid(archs=['arm', 'aarch64'])
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
     def test_four_byte_watchpoints_with_dword_selection(self):
         """Test to selectively watch two double words in an 8-byte dword array."""
         self.run_watchpoint_size_test('dwordArray', 2, '4')
@@ -61,8 +75,8 @@ class WatchpointSizeTestCase(TestBase):
         loc_line = line_number('main.c', '// About to write ' + arrayName)
 
         # Set a breakpoint on the line detected above.
-        lldbutil.run_break_set_by_file_and_line (self, "main.c",loc_line,
-            num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
 
         # Run the program.
         self.runCmd("run", RUN_SUCCEEDED)
@@ -71,46 +85,55 @@ class WatchpointSizeTestCase(TestBase):
             # We should be stopped again due to the breakpoint.
             # The stop reason of the thread should be breakpoint.
             self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                substrs = ['stopped', 'stop reason = breakpoint'])
+                        substrs=['stopped', 'stop reason = breakpoint'])
 
             # Set a read_write type watchpoint arrayName
-            watch_loc=arrayName+"[" + str(i) + "]"
-            self.expect("watchpoint set variable -w read_write " + watch_loc,
+            watch_loc = arrayName + "[" + str(i) + "]"
+            self.expect(
+                "watchpoint set variable -w read_write " +
+                watch_loc,
                 WATCHPOINT_CREATED,
-            substrs = ['Watchpoint created', 'size = ' + watchsize, 'type = rw'])
+                substrs=[
+                    'Watchpoint created',
+                    'size = ' +
+                    watchsize,
+                    'type = rw'])
 
             # Use the '-v' option to do verbose listing of the watchpoint.
             # The hit count should be 0 initially.
-            self.expect("watchpoint list -v", substrs = ['hit_count = 0'])
+            self.expect("watchpoint list -v", substrs=['hit_count = 0'])
 
             self.runCmd("process continue")
 
             # We should be stopped due to the watchpoint.
             # The stop reason of the thread should be watchpoint.
             self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stopped', 'stop reason = watchpoint'])
+                        substrs=['stopped', 'stop reason = watchpoint'])
 
             # Use the '-v' option to do verbose listing of the watchpoint.
             # The hit count should now be 1.
             self.expect("watchpoint list -v",
-                substrs = ['hit_count = 1'])
+                        substrs=['hit_count = 1'])
 
             self.runCmd("process continue")
 
             # We should be stopped due to the watchpoint.
             # The stop reason of the thread should be watchpoint.
             self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-            substrs = ['stopped', 'stop reason = watchpoint'])
+                        substrs=['stopped', 'stop reason = watchpoint'])
 
             # Use the '-v' option to do verbose listing of the watchpoint.
             # The hit count should now be 1.
             # Verify hit_count has been updated after value has been read.
             self.expect("watchpoint list -v",
-                substrs = ['hit_count = 2'])
+                        substrs=['hit_count = 2'])
 
-            # Delete the watchpoint immediately, but set auto-confirm to true first.
+            # Delete the watchpoint immediately, but set auto-confirm to true
+            # first.
             self.runCmd("settings set auto-confirm true")
-            self.expect("watchpoint delete", substrs = ['All watchpoints removed.'])
+            self.expect(
+                "watchpoint delete",
+                substrs=['All watchpoints removed.'])
             # Restore the original setting of auto-confirm.
             self.runCmd("settings clear auto-confirm")
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/help/TestApropos.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test some lldb apropos commands.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class AproposCommandTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,4 +20,9 @@ class AproposCommandTestCase(TestBase):
     @no_debug_info_test
     def test_apropos_variable(self):
         """Test that 'apropos variable' prints the fully qualified command name"""
-        self.expect('apropos variable', substrs=['frame variable', 'target variable', 'watchpoint set variable'])
+        self.expect(
+            'apropos variable',
+            substrs=[
+                'frame variable',
+                'target variable',
+                'watchpoint set variable'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/help/TestHelp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/help/TestHelp.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/help/TestHelp.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/help/TestHelp.py Tue Sep  6 15:57:50 2016
@@ -7,13 +7,14 @@ See also CommandInterpreter::OutputForma
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class HelpCommandTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,25 +23,28 @@ class HelpCommandTestCase(TestBase):
     def test_simplehelp(self):
         """A simple test of 'help' command and its output."""
         self.expect("help",
-            startstr = 'Debugger commands:')
+                    startstr='Debugger commands:')
 
         self.expect("help -a", matching=False,
-                    substrs = ['next'])
-        
+                    substrs=['next'])
+
         self.expect("help", matching=True,
-                    substrs = ['next'])
-    
+                    substrs=['next'])
+
     @no_debug_info_test
     def test_help_on_help(self):
         """Testing the help on the help facility."""
         self.expect("help help", matching=True,
-                    substrs = ['--hide-aliases',
-                               '--hide-user-commands'])
+                    substrs=['--hide-aliases',
+                             '--hide-user-commands'])
 
     @no_debug_info_test
     def version_number_string(self):
         """Helper function to find the version number string of lldb."""
-        plist = os.path.join(os.environ["LLDB_SRC"], "resources", "LLDB-Info.plist")
+        plist = os.path.join(
+            os.environ["LLDB_SRC"],
+            "resources",
+            "LLDB-Info.plist")
         try:
             CFBundleVersionSegFound = False
             with open(plist, 'r') as f:
@@ -53,13 +57,14 @@ class HelpCommandTestCase(TestBase):
                             version = m.group(1)
                             return version
                         else:
-                            # Unsuccessful, let's juts break out of the for loop.
+                            # Unsuccessful, let's juts break out of the for
+                            # loop.
                             break
 
                     if line.find("<key>CFBundleVersion</key>") != -1:
                         # Found our match.  The next line contains our version
                         # string, for example:
-                        # 
+                        #
                         #     <string>38</string>
                         CFBundleVersionSegFound = True
 
@@ -76,13 +81,13 @@ class HelpCommandTestCase(TestBase):
     def test_help_arch(self):
         """Test 'help arch' which should list of supported architectures."""
         self.expect("help arch",
-            substrs = ['arm', 'x86_64', 'i386'])
+                    substrs=['arm', 'x86_64', 'i386'])
 
     @no_debug_info_test
     def test_help_version(self):
         """Test 'help version' and 'version' commands."""
         self.expect("help version",
-            substrs = ['Show the LLDB debugger version.'])
+                    substrs=['Show the LLDB debugger version.'])
         version_str = self.version_number_string()
         import re
         match = re.match('[0-9]+', version_str)
@@ -92,7 +97,7 @@ class HelpCommandTestCase(TestBase):
             search_regexp = ['lldb version (\d|\.)+.*$']
 
         self.expect("version",
-            patterns = search_regexp)
+                    patterns=search_regexp)
 
     @no_debug_info_test
     def test_help_should_not_crash_lldb(self):
@@ -103,101 +108,112 @@ class HelpCommandTestCase(TestBase):
     @no_debug_info_test
     def test_help_should_not_hang_emacsshell(self):
         """Command 'settings set term-width 0' should not hang the help command."""
-        self.expect("settings set term-width 0",
-                    COMMAND_FAILED_AS_EXPECTED, error=True,
-            substrs = ['error: 0 is out of range, valid values must be between'])
+        self.expect(
+            "settings set term-width 0",
+            COMMAND_FAILED_AS_EXPECTED,
+            error=True,
+            substrs=['error: 0 is out of range, valid values must be between'])
         # self.runCmd("settings set term-width 0")
         self.expect("help",
-            startstr = 'Debugger commands:')
+                    startstr='Debugger commands:')
 
     @no_debug_info_test
     def test_help_breakpoint_set(self):
         """Test that 'help breakpoint set' does not print out redundant lines of:
         'breakpoint set [-s <shlib-name>] ...'."""
         self.expect("help breakpoint set", matching=False,
-            substrs = ['breakpoint set [-s <shlib-name>]'])
+                    substrs=['breakpoint set [-s <shlib-name>]'])
 
     @no_debug_info_test
     def test_help_image_dump_symtab_should_not_crash(self):
         """Command 'help image dump symtab' should not crash lldb."""
         # 'image' is an alias for 'target modules'.
         self.expect("help image dump symtab",
-            substrs = ['dump symtab',
-                       'sort-order'])
+                    substrs=['dump symtab',
+                             'sort-order'])
 
     @no_debug_info_test
     def test_help_image_du_sym_is_ambiguous(self):
         """Command 'help image du sym' is ambiguous and spits out the list of candidates."""
         self.expect("help image du sym",
                     COMMAND_FAILED_AS_EXPECTED, error=True,
-            substrs = ['error: ambiguous command image du sym',
-                       'symfile',
-                       'symtab'])
+                    substrs=['error: ambiguous command image du sym',
+                             'symfile',
+                             'symtab'])
 
     @no_debug_info_test
     def test_help_image_du_line_should_work(self):
         """Command 'help image du line-table' is not ambiguous and should work."""
         # 'image' is an alias for 'target modules'.
-        self.expect("help image du line",
-            substrs = ['Dump the line table for one or more compilation units'])
+        self.expect("help image du line", substrs=[
+                    'Dump the line table for one or more compilation units'])
 
     @no_debug_info_test
     def test_help_target_variable_syntax(self):
         """Command 'help target variable' should display <variable-name> ..."""
         self.expect("help target variable",
-            substrs = ['<variable-name> [<variable-name> [...]]'])
+                    substrs=['<variable-name> [<variable-name> [...]]'])
 
     @no_debug_info_test
     def test_help_watchpoint_and_its_args(self):
         """Command 'help watchpoint', 'help watchpt-id', and 'help watchpt-id-list' should work."""
         self.expect("help watchpoint",
-            substrs = ['delete', 'disable', 'enable', 'list'])
+                    substrs=['delete', 'disable', 'enable', 'list'])
         self.expect("help watchpt-id",
-            substrs = ['<watchpt-id>'])
+                    substrs=['<watchpt-id>'])
         self.expect("help watchpt-id-list",
-            substrs = ['<watchpt-id-list>'])
+                    substrs=['<watchpt-id-list>'])
 
     @no_debug_info_test
     def test_help_watchpoint_set(self):
         """Test that 'help watchpoint set' prints out 'expression' and 'variable'
         as the possible subcommands."""
         self.expect("help watchpoint set",
-            substrs = ['The following subcommands are supported:'],
-            patterns = ['expression +--',
-                        'variable +--'])
+                    substrs=['The following subcommands are supported:'],
+                    patterns=['expression +--',
+                              'variable +--'])
 
     @no_debug_info_test
     def test_help_po_hides_options(self):
         """Test that 'help po' does not show all the options for expression"""
-        self.expect("help po",
-            substrs = ['--show-all-children', '--object-description'], matching=False)
+        self.expect(
+            "help po",
+            substrs=[
+                '--show-all-children',
+                '--object-description'],
+            matching=False)
 
     @no_debug_info_test
     def test_help_run_hides_options(self):
         """Test that 'help run' does not show all the options for process launch"""
         self.expect("help run",
-            substrs = ['--arch', '--environment'], matching=False)
+                    substrs=['--arch', '--environment'], matching=False)
 
     @no_debug_info_test
     def test_help_next_shows_options(self):
         """Test that 'help next' shows all the options for thread step-over"""
         self.expect("help next",
-            substrs = ['--python-class','--run-mode'], matching=True)
+                    substrs=['--python-class', '--run-mode'], matching=True)
 
     @no_debug_info_test
     def test_help_provides_alternatives(self):
         """Test that help on commands that don't exist provides information on additional help avenues"""
-        self.expect("help thisisnotadebuggercommand",
-            substrs = ["'thisisnotadebuggercommand' is not a known command.",
-            "Try 'help' to see a current list of commands.",
-            "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
-            "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."], error=True)
-
-        self.expect("help process thisisnotadebuggercommand",
-            substrs = ["'process thisisnotadebuggercommand' is not a known command.",
-            "Try 'help' to see a current list of commands.",
-            "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
-            "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."])
+        self.expect(
+            "help thisisnotadebuggercommand",
+            substrs=[
+                "'thisisnotadebuggercommand' is not a known command.",
+                "Try 'help' to see a current list of commands.",
+                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
+                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."],
+            error=True)
+
+        self.expect(
+            "help process thisisnotadebuggercommand",
+            substrs=[
+                "'process thisisnotadebuggercommand' is not a known command.",
+                "Try 'help' to see a current list of commands.",
+                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
+                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."])
 
     @no_debug_info_test
     def test_custom_help_alias(self):
@@ -205,9 +221,15 @@ class HelpCommandTestCase(TestBase):
         def cleanup():
             self.runCmd('command unalias afriendlyalias', check=False)
             self.runCmd('command unalias averyfriendlyalias', check=False)
-        
+
         self.addTearDownHook(cleanup)
-        self.runCmd('command alias --help "I am a friendly alias" -- afriendlyalias help')
-        self.expect("help afriendlyalias", matching=True, substrs = ['I am a friendly alias'])
-        self.runCmd('command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help')
-        self.expect("help averyfriendlyalias", matching=True, substrs = ['I am a very friendly alias'])
+        self.runCmd(
+            'command alias --help "I am a friendly alias" -- afriendlyalias help')
+        self.expect(
+            "help afriendlyalias",
+            matching=True,
+            substrs=['I am a friendly alias'])
+        self.runCmd(
+            'command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help')
+        self.expect("help averyfriendlyalias", matching=True,
+                    substrs=['I am a very friendly alias'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py Tue Sep  6 15:57:50 2016
@@ -3,28 +3,31 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class AnonymousTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIf(compiler="icc", bugnumber="llvm.org/pr15036: LLDB generates an incorrect AST layout for an anonymous struct when DWARF is generated by ICC")
+    @skipIf(
+        compiler="icc",
+        bugnumber="llvm.org/pr15036: LLDB generates an incorrect AST layout for an anonymous struct when DWARF is generated by ICC")
     def test_expr_nest(self):
         self.build()
         self.common_setup(self.line0)
 
         # These should display correctly.
         self.expect("expression n->foo.d", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 4"])
-            
+                    substrs=["= 4"])
+
         self.expect("expression n->b", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 2"])
+                    substrs=["= 2"])
 
     def test_expr_child(self):
         self.build()
@@ -32,35 +35,40 @@ class AnonymousTestCase(TestBase):
 
         # These should display correctly.
         self.expect("expression c->foo.d", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 4"])
-            
-        self.expect("expression c->grandchild.b", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 2"])
+                    substrs=["= 4"])
 
-    @skipIf(compiler="icc", bugnumber="llvm.org/pr15036: This particular regression was introduced by r181498")
+        self.expect(
+            "expression c->grandchild.b",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=["= 2"])
+
+    @skipIf(
+        compiler="icc",
+        bugnumber="llvm.org/pr15036: This particular regression was introduced by r181498")
     def test_expr_grandchild(self):
         self.build()
         self.common_setup(self.line2)
 
         # These should display correctly.
         self.expect("expression g.child.foo.d", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 4"])
-            
+                    substrs=["= 4"])
+
         self.expect("expression g.child.b", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 2"])
+                    substrs=["= 2"])
 
     def test_expr_parent(self):
         self.build()
         if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
-            self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
+            self.skipTest(
+                "llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
         self.common_setup(self.line2)
 
         # These should display correctly.
         self.expect("expression pz", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(type_z *) $", " = 0x0000"])
+                    substrs=["(type_z *) $", " = 0x0000"])
 
         self.expect("expression z.y", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(type_y) $", "dummy = 2"])
+                    substrs=["(type_y) $", "dummy = 2"])
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21550")
     def test_expr_null(self):
@@ -69,48 +77,52 @@ class AnonymousTestCase(TestBase):
 
         # This should fail because pz is 0, but it succeeds on OS/X.
         # This fails on Linux with an upstream error "Couldn't dematerialize struct", as does "p *n" with "int *n = 0".
-        # Note that this can also trigger llvm.org/pr15036 when run interactively at the lldb command prompt.
-        self.expect("expression *(type_z *)pz", error = True)
+        # Note that this can also trigger llvm.org/pr15036 when run
+        # interactively at the lldb command prompt.
+        self.expect("expression *(type_z *)pz", error=True)
 
     def test_child_by_name(self):
         self.build()
-        
+
         # Set debugger into synchronous mode
         self.dbg.SetAsync(False)
 
         # Create a target
-        exe = os.path.join (os.getcwd(), "a.out")
+        exe = os.path.join(os.getcwd(), "a.out")
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        break_in_main = target.BreakpointCreateBySourceRegex ('// Set breakpoint 2 here.', lldb.SBFileSpec(self.source))
+        break_in_main = target.BreakpointCreateBySourceRegex(
+            '// Set breakpoint 2 here.', lldb.SBFileSpec(self.source))
         self.assertTrue(break_in_main, VALID_BREAKPOINT)
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
-        self.assertTrue (process, PROCESS_IS_VALID)
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, PROCESS_IS_VALID)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_main)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_in_main)
         if len(threads) != 1:
-            self.fail ("Failed to stop at breakpoint in main.")
+            self.fail("Failed to stop at breakpoint in main.")
 
         thread = threads[0]
         frame = thread.frames[0]
 
         if not frame.IsValid():
-            self.fail ("Failed to get frame 0.")
+            self.fail("Failed to get frame 0.")
 
         var_n = frame.FindVariable("n")
         if not var_n.IsValid():
-            self.fail ("Failed to get the variable 'n'")
+            self.fail("Failed to get the variable 'n'")
 
         elem_a = var_n.GetChildMemberWithName("a")
         if not elem_a.IsValid():
-            self.fail ("Failed to get the element a in n")
+            self.fail("Failed to get the element a in n")
 
         error = lldb.SBError()
         value = elem_a.GetValueAsSigned(error, 1000)
         if not error.Success() or value != 0:
-            self.fail ("failed to get the correct value for element a in n")
+            self.fail("failed to get the correct value for element a in n")
 
     def test_nest_flat(self):
         self.build()
@@ -118,10 +130,10 @@ class AnonymousTestCase(TestBase):
 
         # These should display correctly.
         self.expect('frame variable n --flat',
-                    substrs = ['n.a = 0',
-                               'n.b = 2',
-                               'n.foo.c = 0',
-                               'n.foo.d = 4'])
+                    substrs=['n.a = 0',
+                             'n.b = 2',
+                             'n.foo.c = 0',
+                             'n.foo.d = 4'])
 
     def setUp(self):
         # Call super's setUp().
@@ -133,7 +145,7 @@ class AnonymousTestCase(TestBase):
         self.line2 = line_number(self.source, '// Set breakpoint 2 here.')
 
     def common_setup(self, line):
-        
+
         # Set debugger into synchronous mode
         self.dbg.SetAsync(False)
 
@@ -142,18 +154,21 @@ class AnonymousTestCase(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        # Set breakpoints inside and outside methods that take pointers to the containing struct.
-        lldbutil.run_break_set_by_file_and_line (self, self.source, line, num_expected_locations=1, loc_exact=True)
+        # Set breakpoints inside and outside methods that take pointers to the
+        # containing struct.
+        lldbutil.run_break_set_by_file_and_line(
+            self, self.source, line, num_expected_locations=1, loc_exact=True)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ArrayTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,7 +27,8 @@ class ArrayTypesTestCase(TestBase):
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -39,35 +41,45 @@ class ArrayTypesTestCase(TestBase):
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = ['resolved, hit count = 1'])
+                    substrs=['resolved, hit count = 1'])
 
         # Issue 'variable list' command on several array-type variables.
 
-        self.expect("frame variable --show-types strings", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(char *[4])',
-            substrs = ['(char *) [0]',
-                       '(char *) [1]',
-                       '(char *) [2]',
-                       '(char *) [3]',
-                       'Hello',
-                       'Hola',
-                       'Bonjour',
-                       'Guten Tag'])
-
-        self.expect("frame variable --show-types --raw -- char_16", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(char) [0]',
-                       '(char) [15]'])
-
-        self.expect("frame variable --show-types ushort_matrix", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(unsigned short [2][3])')
-
-        self.expect("frame variable --show-types long_6", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(long [6])')
+        self.expect(
+            "frame variable --show-types strings",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr='(char *[4])',
+            substrs=[
+                '(char *) [0]',
+                '(char *) [1]',
+                '(char *) [2]',
+                '(char *) [3]',
+                'Hello',
+                'Hola',
+                'Bonjour',
+                'Guten Tag'])
+
+        self.expect(
+            "frame variable --show-types --raw -- char_16",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(char) [0]',
+                '(char) [15]'])
+
+        self.expect(
+            "frame variable --show-types ushort_matrix",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr='(unsigned short [2][3])')
+
+        self.expect(
+            "frame variable --show-types long_6",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr='(long [6])')
 
     @add_test_categories(['pyapi'])
     def test_and_python_api(self):
@@ -84,24 +96,30 @@ class ArrayTypesTestCase(TestBase):
         # Sanity check the print representation of breakpoint.
         bp = str(breakpoint)
         self.expect(bp, msg="Breakpoint looks good", exe=False,
-            substrs = ["file = 'main.c'",
-                       "line = %d" % self.line,
-                       "locations = 1"])
-        self.expect(bp, msg="Breakpoint is not resolved as yet", exe=False, matching=False,
-            substrs = ["resolved = 1"])
+                    substrs=["file = 'main.c'",
+                             "line = %d" % self.line,
+                             "locations = 1"])
+        self.expect(
+            bp,
+            msg="Breakpoint is not resolved as yet",
+            exe=False,
+            matching=False,
+            substrs=["resolved = 1"])
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # Sanity check the print representation of process.
         proc = str(process)
         self.expect(proc, msg="Process looks good", exe=False,
-            substrs = ["state = stopped",
-                       "executable = a.out"])
+                    substrs=["state = stopped",
+                              "executable = a.out"])
 
         # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         # Sanity check the print representation of thread.
@@ -114,8 +132,11 @@ class ArrayTypesTestCase(TestBase):
             tidstr = "tid = %u" % thread.GetThreadID()
         else:
             tidstr = "tid = 0x%4.4x" % thread.GetThreadID()
-        self.expect(thr, "Thread looks good with stop reason = breakpoint", exe=False,
-            substrs = [tidstr])
+        self.expect(
+            thr,
+            "Thread looks good with stop reason = breakpoint",
+            exe=False,
+            substrs=[tidstr])
 
         # The breakpoint should have a hit count of 1.
         self.assertEqual(breakpoint.GetHitCount(), 1, BREAKPOINT_HIT_ONCE)
@@ -123,24 +144,33 @@ class ArrayTypesTestCase(TestBase):
         # The breakpoint should be resolved by now.
         bp = str(breakpoint)
         self.expect(bp, "Breakpoint looks good and is resolved", exe=False,
-            substrs = ["file = 'main.c'",
-                       "line = %d" % self.line,
-                       "locations = 1"])
+                    substrs=["file = 'main.c'",
+                             "line = %d" % self.line,
+                             "locations = 1"])
 
         # Sanity check the print representation of frame.
         frame = thread.GetFrameAtIndex(0)
         frm = str(frame)
-        self.expect(frm,
-                    "Frame looks good with correct index %d" % frame.GetFrameID(),
-                    exe=False,
-            substrs = ["#%d" % frame.GetFrameID()])
+        self.expect(
+            frm,
+            "Frame looks good with correct index %d" %
+            frame.GetFrameID(),
+            exe=False,
+            substrs=[
+                "#%d" %
+                frame.GetFrameID()])
 
         # Lookup the "strings" string array variable and sanity check its print
         # representation.
         variable = frame.FindVariable("strings")
         var = str(variable)
-        self.expect(var, "Variable for 'strings' looks good with correct name", exe=False,
-            substrs = ["%s" % variable.GetName()])
+        self.expect(
+            var,
+            "Variable for 'strings' looks good with correct name",
+            exe=False,
+            substrs=[
+                "%s" %
+                variable.GetName()])
         self.DebugSBValue(variable)
         self.assertTrue(variable.GetNumChildren() == 4,
                         "Variable 'strings' should have 4 children")
@@ -186,9 +216,11 @@ class ArrayTypesTestCase(TestBase):
         # Last, check that "long_6" has a value type of eValueTypeVariableLocal
         # and "argc" has eValueTypeVariableArgument.
         from lldbsuite.test.lldbutil import value_type_to_str
-        self.assertTrue(variable.GetValueType() == lldb.eValueTypeVariableLocal,
-                        "Variable 'long_6' should have '%s' value type." %
-                        value_type_to_str(lldb.eValueTypeVariableLocal))
+        self.assertTrue(
+            variable.GetValueType() == lldb.eValueTypeVariableLocal,
+            "Variable 'long_6' should have '%s' value type." %
+            value_type_to_str(
+                lldb.eValueTypeVariableLocal))
         argc = frame.FindVariable("argc")
         self.DebugSBValue(argc)
         self.assertTrue(argc.GetValueType() == lldb.eValueTypeVariableArgument,

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Tue Sep  6 15:57:50 2016
@@ -3,24 +3,27 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class BitfieldsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break inside main().
         self.line = line_number('main.c', '// Set break point at this line.')
 
-    @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
+    # BitFields exhibit crashes in record layout on Windows
+    # (http://llvm.org/pr21800)
+    @skipIfWindows
     def test_and_run_command(self):
         """Test 'frame variable ...' on a variable with bitfields."""
         self.build()
@@ -28,85 +31,102 @@ class BitfieldsTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # This should display correctly.
-        self.expect("frame variable --show-types bits", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(uint32_t:1) b1 = 1',
-                       '(uint32_t:2) b2 = 3',
-                       '(uint32_t:3) b3 = 7',
-                       '(uint32_t) b4 = 15',
-                       '(uint32_t:5) b5 = 31',
-                       '(uint32_t:6) b6 = 63',
-                       '(uint32_t:7) b7 = 127',
-                       '(uint32_t:4) four = 15'])
+        self.expect(
+            "frame variable --show-types bits",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(uint32_t:1) b1 = 1',
+                '(uint32_t:2) b2 = 3',
+                '(uint32_t:3) b3 = 7',
+                '(uint32_t) b4 = 15',
+                '(uint32_t:5) b5 = 31',
+                '(uint32_t:6) b6 = 63',
+                '(uint32_t:7) b7 = 127',
+                '(uint32_t:4) four = 15'])
 
         # And so should this.
         # rdar://problem/8348251
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(uint32_t:1) b1 = 1',
-                       '(uint32_t:2) b2 = 3',
-                       '(uint32_t:3) b3 = 7',
-                       '(uint32_t) b4 = 15',
-                       '(uint32_t:5) b5 = 31',
-                       '(uint32_t:6) b6 = 63',
-                       '(uint32_t:7) b7 = 127',
-                       '(uint32_t:4) four = 15'])
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(uint32_t:1) b1 = 1',
+                '(uint32_t:2) b2 = 3',
+                '(uint32_t:3) b3 = 7',
+                '(uint32_t) b4 = 15',
+                '(uint32_t:5) b5 = 31',
+                '(uint32_t:6) b6 = 63',
+                '(uint32_t:7) b7 = 127',
+                '(uint32_t:4) four = 15'])
 
         self.expect("expr (bits.b1)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '1'])
+                    substrs=['uint32_t', '1'])
         self.expect("expr (bits.b2)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '3'])
+                    substrs=['uint32_t', '3'])
         self.expect("expr (bits.b3)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '7'])
+                    substrs=['uint32_t', '7'])
         self.expect("expr (bits.b4)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '15'])
+                    substrs=['uint32_t', '15'])
         self.expect("expr (bits.b5)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '31'])
+                    substrs=['uint32_t', '31'])
         self.expect("expr (bits.b6)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '63'])
+                    substrs=['uint32_t', '63'])
         self.expect("expr (bits.b7)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '127'])
+                    substrs=['uint32_t', '127'])
         self.expect("expr (bits.four)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '15'])
+                    substrs=['uint32_t', '15'])
 
-        self.expect("frame variable --show-types more_bits", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(uint32_t:3) a = 3',
-                       '(uint8_t:1) b = \'\\0\'',
-                       '(uint8_t:1) c = \'\\x01\'',
-                       '(uint8_t:1) d = \'\\0\''])
+        self.expect(
+            "frame variable --show-types more_bits",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(uint32_t:3) a = 3',
+                '(uint8_t:1) b = \'\\0\'',
+                '(uint8_t:1) c = \'\\x01\'',
+                '(uint8_t:1) d = \'\\0\''])
 
         self.expect("expr (more_bits.a)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint32_t', '3'])
+                    substrs=['uint32_t', '3'])
         self.expect("expr (more_bits.b)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint8_t', '\\0'])
+                    substrs=['uint8_t', '\\0'])
         self.expect("expr (more_bits.c)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint8_t', '\\x01'])
+                    substrs=['uint8_t', '\\x01'])
         self.expect("expr (more_bits.d)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['uint8_t', '\\0'])
-
-        self.expect("expr (packed.a)", VARIABLES_DISPLAYED_CORRECTLY, 
-            substrs = ['char', "'a'"])
-        self.expect("expr (packed.b)", VARIABLES_DISPLAYED_CORRECTLY, 
-            substrs = ['uint32_t', "10"])
-        self.expect("expr/x (packed.c)", VARIABLES_DISPLAYED_CORRECTLY, 
-            substrs = ['uint32_t', "7112233"])
+                    substrs=['uint8_t', '\\0'])
 
+        self.expect("expr (packed.a)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['char', "'a'"])
+        self.expect("expr (packed.b)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['uint32_t', "10"])
+        self.expect("expr/x (packed.c)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['uint32_t', "7112233"])
 
     @add_test_categories(['pyapi'])
-    @skipIfWindows # BitFields exhibit crashes in record layout on Windows (http://llvm.org/pr21800)
-    @expectedFailureAll("llvm.org/pr27510", oslist=["linux"], compiler="clang", compiler_version=[">=", "3.9"])
+    # BitFields exhibit crashes in record layout on Windows
+    # (http://llvm.org/pr21800)
+    @skipIfWindows
+    @expectedFailureAll(
+        "llvm.org/pr27510",
+        oslist=["linux"],
+        compiler="clang",
+        compiler_version=[
+            ">=",
+            "3.9"])
     def test_and_python_api(self):
         """Use Python APIs to inspect a bitfields variable."""
         self.build()
@@ -118,11 +138,13 @@ class BitfieldsTestCase(TestBase):
         breakpoint = target.BreakpointCreateByLocation("main.c", self.line)
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         # The breakpoint should have a hit count of 1.
@@ -132,10 +154,14 @@ class BitfieldsTestCase(TestBase):
         frame = thread.GetFrameAtIndex(0)
         bits = frame.FindVariable("bits")
         self.DebugSBValue(bits)
-        self.assertTrue(bits.GetTypeName() == 'Bits', "bits.GetTypeName() == 'Bits'");
-        self.assertTrue(bits.GetNumChildren() == 10, "bits.GetNumChildren() == 10");
+        self.assertTrue(
+            bits.GetTypeName() == 'Bits',
+            "bits.GetTypeName() == 'Bits'")
+        self.assertTrue(
+            bits.GetNumChildren() == 10,
+            "bits.GetNumChildren() == 10")
         test_compiler = self.getCompiler()
-        self.assertTrue(bits.GetByteSize() == 32, "bits.GetByteSize() == 32");
+        self.assertTrue(bits.GetByteSize() == 32, "bits.GetByteSize() == 32")
 
         # Notice the pattern of int(b1.GetValue(), 0).  We pass a base of 0
         # so that the proper radix is determined based on the contents of the

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py Tue Sep  6 15:57:50 2016
@@ -3,14 +3,15 @@
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class BlocksTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -32,38 +33,46 @@ class BlocksTestCase(TestBase):
 
         # Break inside the foo function which takes a bar_ptr argument.
         for line in self.lines:
-            lldbutil.run_break_set_by_file_and_line (self, "main.c", line, num_expected_locations=1, loc_exact=True)
+            lldbutil.run_break_set_by_file_and_line(
+                self, "main.c", line, num_expected_locations=1, loc_exact=True)
 
         self.wait_for_breakpoint()
-    
+
     @skipUnlessDarwin
     def test_expr(self):
         self.launch_common()
 
         self.expect("expression a + b", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 7"])
+                    substrs=["= 7"])
 
         self.expect("expression c", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 1"])
+                    substrs=["= 1"])
 
         self.wait_for_breakpoint()
 
         # This should display correctly.
         self.expect("expression (int)neg (-12)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 12"])
+                    substrs=["= 12"])
 
     @skipUnlessDarwin
     def test_define(self):
         self.launch_common()
 
-        self.runCmd("expression int (^$add)(int, int) = ^int(int a, int b) { return a + b; };")
-        self.expect("expression $add(2,3)", VARIABLES_DISPLAYED_CORRECTLY, substrs = [" = 5"])
+        self.runCmd(
+            "expression int (^$add)(int, int) = ^int(int a, int b) { return a + b; };")
+        self.expect(
+            "expression $add(2,3)",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[" = 5"])
 
         self.runCmd("expression int $a = 3")
-        self.expect("expression int (^$addA)(int) = ^int(int b) { return $a + b; };", "Proper error is reported on capture", error=True)
-    
+        self.expect(
+            "expression int (^$addA)(int) = ^int(int b) { return $a + b; };",
+            "Proper error is reported on capture",
+            error=True)
+
     def wait_for_breakpoint(self):
-        if self.is_started == False:
+        if not self.is_started:
             self.is_started = True
             self.runCmd("process launch", RUN_SUCCEEDED)
         else:
@@ -71,5 +80,5 @@ class BlocksTestCase(TestBase):
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ConstVariableTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,8 +26,15 @@ class ConstVariableTestCase(TestBase):
         compiler="clang", compiler_version=["=", "3.8"])
     @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
     @expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])
-    @expectedFailureAll(oslist=["linux"], archs=['arm', 'aarch64'], bugnumber="llvm.org/pr27883")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=[
+            'arm',
+            'aarch64'],
+        bugnumber="llvm.org/pr27883")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_and_run_command(self):
         """Test interpreted and JITted expressions on constant values."""
         self.build()
@@ -34,32 +42,35 @@ class ConstVariableTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the main.
-        lldbutil.run_break_set_by_symbol (self, "main", num_expected_locations=1)
+        lldbutil.run_break_set_by_symbol(
+            self, "main", num_expected_locations=1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         self.runCmd("next")
         self.runCmd("next")
 
         # Try frame variable.
         self.expect("frame variable index", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(int32_t) index = 512'])
+                    substrs=['(int32_t) index = 512'])
 
         # Try an interpreted expression.
         self.expect("expr (index + 512)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['1024'])
+                    substrs=['1024'])
 
         # Try a JITted expression.
-        self.expect("expr (int)getpid(); (index - 256)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['256'])
+        self.expect(
+            "expr (int)getpid(); (index - 256)",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['256'])
 
         self.runCmd("kill")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.decorators import *
 
+
 class EnumTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,7 +21,8 @@ class EnumTypesTestCase(TestBase):
         # Find the line number to break inside main().
         self.line = line_number('main.c', '// Set break point at this line.')
 
-    @expectedFailureAll(oslist=['windows'])  # derefing the null pointer "works" on Windows
+    # derefing the null pointer "works" on Windows
+    @expectedFailureAll(oslist=['windows'])
     def test(self):
         """Test 'image lookup -t days' and check for correct display and enum value printing."""
         self.build()
@@ -28,23 +30,35 @@ class EnumTypesTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the main.
-        bkpt_id = lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
+        bkpt_id = lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Look up information about the 'days' enum type.
         # Check for correct display.
         self.expect("image lookup -t days", DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs = ['enum days {',
+                    substrs=['enum days {',
+                             'Monday',
+                             'Tuesday',
+                             'Wednesday',
+                             'Thursday',
+                             'Friday',
+                             'Saturday',
+                             'Sunday',
+                             'kNumDays',
+                             '}'])
+
+        enum_values = ['-4',
                        'Monday',
                        'Tuesday',
                        'Wednesday',
@@ -53,28 +67,41 @@ class EnumTypesTestCase(TestBase):
                        'Saturday',
                        'Sunday',
                        'kNumDays',
-                       '}'])
-
-        enum_values = [ '-4',
-                        'Monday',
-                        'Tuesday',
-                        'Wednesday',
-                        'Thursday',
-                        'Friday',
-                        'Saturday',
-                        'Sunday',
-                        'kNumDays',
-                        '5'];
+                       '5']
 
         # Make sure a pointer to an anonymous enum type does crash LLDB and displays correctly using
         # frame variable and expression commands
-        self.expect('frame variable f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', 'f.op'], patterns = ['0x0+$'])
-        self.expect('frame variable *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops', '*f.op', '<parent is NULL>'])
-        self.expect('expr f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['ops *', '$'], patterns = ['0x0+$'])
-        self.expect('expr *f.op', DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ['error:'], error = True)
+        self.expect(
+            'frame variable f.op',
+            DATA_TYPES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'ops *',
+                'f.op'],
+            patterns=['0x0+$'])
+        self.expect(
+            'frame variable *f.op',
+            DATA_TYPES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'ops',
+                '*f.op',
+                '<parent is NULL>'])
+        self.expect(
+            'expr f.op',
+            DATA_TYPES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'ops *',
+                '$'],
+            patterns=['0x0+$'])
+        self.expect(
+            'expr *f.op',
+            DATA_TYPES_DISPLAYED_CORRECTLY,
+            substrs=['error:'],
+            error=True)
 
         bkpt = self.target().FindBreakpointByID(bkpt_id)
         for enum_value in enum_values:
-            self.expect("frame variable day", 'check for valid enumeration value',
-                substrs = [enum_value])
-            lldbutil.continue_to_breakpoint (self.process(), bkpt)
+            self.expect(
+                "frame variable day",
+                'check for valid enumeration value',
+                substrs=[enum_value])
+            lldbutil.continue_to_breakpoint(self.process(), bkpt)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py Tue Sep  6 15:57:50 2016
@@ -3,12 +3,13 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class ForwardDeclarationTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,28 +21,35 @@ class ForwardDeclarationTestCase(TestBas
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_symbol (self, "foo", num_expected_locations=1, sym_exact=True)
+        lldbutil.run_break_set_by_symbol(
+            self, "foo", num_expected_locations=1, sym_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # This should display correctly.
         # Note that the member fields of a = 1 and b = 2 is by design.
-        self.expect("frame variable --show-types *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(bar) *bar_ptr = ',
-                       '(int) a = 1',
-                       '(int) b = 2'])
+        self.expect(
+            "frame variable --show-types *bar_ptr",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(bar) *bar_ptr = ',
+                '(int) a = 1',
+                '(int) b = 2'])
 
         # And so should this.
-        self.expect("expression --show-types -- *bar_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(bar)',
-                       '(int) a = 1',
-                       '(int) b = 2'])
+        self.expect(
+            "expression --show-types -- *bar_ptr",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(bar)',
+                '(int) a = 1',
+                '(int) b = 2'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class FunctionTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,18 +27,24 @@ class FunctionTypesTestCase(TestBase):
         self.runToBreakpoint()
 
         # Check that the 'callback' variable display properly.
-        self.expect("frame variable --show-types callback", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(int (*)(const char *)) callback =')
+        self.expect(
+            "frame variable --show-types callback",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr='(int (*)(const char *)) callback =')
 
         # And that we can break on the callback function.
-        lldbutil.run_break_set_by_symbol (self, "string_not_empty", num_expected_locations=1, sym_exact=True)
+        lldbutil.run_break_set_by_symbol(
+            self,
+            "string_not_empty",
+            num_expected_locations=1,
+            sym_exact=True)
         self.runCmd("continue")
 
         # Check that we do indeed stop on the string_not_empty function.
         self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['a.out`string_not_empty',
-                       'stop reason = breakpoint'])
-    
+                    substrs=['a.out`string_not_empty',
+                             'stop reason = breakpoint'])
+
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
     def test_pointers(self):
         """Test that a function pointer to 'printf' works and can be called."""
@@ -45,33 +52,34 @@ class FunctionTypesTestCase(TestBase):
         self.runToBreakpoint()
 
         self.expect("expr string_not_empty",
-                    substrs = ['(int (*)(const char *)) $0 = ', '(a.out`'])
+                    substrs=['(int (*)(const char *)) $0 = ', '(a.out`'])
 
         if self.platformIsDarwin():
             regexps = ['lib.*\.dylib`printf']
         else:
             regexps = ['printf']
         self.expect("expr (int (*)(const char*, ...))printf",
-                    substrs = ['(int (*)(const char *, ...)) $1 = '],
-                    patterns = regexps)
+                    substrs=['(int (*)(const char *, ...)) $1 = '],
+                    patterns=regexps)
 
         self.expect("expr $1(\"Hello world\\n\")",
-                    startstr = '(int) $2 = 12')
+                    startstr='(int) $2 = 12')
 
     def runToBreakpoint(self):
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        
+
         # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-        
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
+
         self.runCmd("run", RUN_SUCCEEDED)
-        
+
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs = ['stopped',
-                               'stop reason = breakpoint'])
-        
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py Tue Sep  6 15:57:50 2016
@@ -7,6 +7,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class GlobalVariablesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -16,11 +17,17 @@ class GlobalVariablesTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break inside main().
         self.source = 'main.c'
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
         self.shlib_names = ["a"]
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    @expectedFailureAll("llvm.org/pr25872", oslist=["macosx"], debug_info=["dwarf", "gmodules"])
+    @expectedFailureAll(
+        "llvm.org/pr25872",
+        oslist=["macosx"],
+        debug_info=[
+            "dwarf",
+            "gmodules"])
     def test_c_global_variables(self):
         """Test 'frame variable --scope --no-args' which omits args and shows scopes."""
         self.build()
@@ -30,48 +37,67 @@ class GlobalVariablesTestCase(TestBase):
         self.assertTrue(target, VALID_TARGET)
 
         # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line (self, self.source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
 
-        # Register our shared libraries for remote targets so they get automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(target, self.shlib_names)
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
+        environment = self.registerSharedLibrariesWithTarget(
+            target, self.shlib_names)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Check that GLOBAL scopes are indicated for the variables.
-        self.expect("frame variable --show-types --scope --show-globals --no-args", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['GLOBAL: (int) g_file_global_int = 42',
-                       'STATIC: (const int) g_file_static_int = 2',
-                       'GLOBAL: (const char *) g_file_global_cstr',
-                       '"g_file_global_cstr"',
-                       'STATIC: (const char *) g_file_static_cstr',
-                       '"g_file_static_cstr"',
-                       'GLOBAL: (int) g_common_1 = 21'])
+        self.expect(
+            "frame variable --show-types --scope --show-globals --no-args",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'GLOBAL: (int) g_file_global_int = 42',
+                'STATIC: (const int) g_file_static_int = 2',
+                'GLOBAL: (const char *) g_file_global_cstr',
+                '"g_file_global_cstr"',
+                'STATIC: (const char *) g_file_static_cstr',
+                '"g_file_static_cstr"',
+                'GLOBAL: (int) g_common_1 = 21'])
 
         # 'frame variable' should support address-of operator.
         self.runCmd("frame variable &g_file_global_int")
 
-        # Exercise the 'target variable' command to display globals in a.c file.
+        # Exercise the 'target variable' command to display globals in a.c
+        # file.
         self.expect("target variable g_a", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['g_a', '123'])
-        self.expect("target variable g_marked_spot.x", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['g_marked_spot.x', '20'])
+                    substrs=['g_a', '123'])
+        self.expect(
+            "target variable g_marked_spot.x",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'g_marked_spot.x',
+                '20'])
 
         # rdar://problem/9747668
         # runCmd: target variable g_marked_spot.y
         # output: (int) g_marked_spot.y = <a.o[0x214] can't be resolved,  in not currently loaded.
         #         >
-        self.expect("target variable g_marked_spot.y", VARIABLES_DISPLAYED_CORRECTLY,
-                    substrs = ['g_marked_spot.y', '21'])
-        self.expect("target variable g_marked_spot.y", VARIABLES_DISPLAYED_CORRECTLY, matching=False,
-                    substrs = ["can't be resolved"])
+        self.expect(
+            "target variable g_marked_spot.y",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'g_marked_spot.y',
+                '21'])
+        self.expect(
+            "target variable g_marked_spot.y",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            matching=False,
+            substrs=["can't be resolved"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py Tue Sep  6 15:57:50 2016
@@ -1,5 +1,11 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr27845"),
-                                                decorators.expectedFailureAll(compiler="clang", compiler_version=["<", "3.5"], bugnumber="llvm.org/pr27845")])
+lldbinline.MakeInlineTest(__file__,
+                          globals(),
+                          [decorators.expectedFailureAll(oslist=["windows"],
+                                                         bugnumber="llvm.org/pr27845"),
+                              decorators.expectedFailureAll(compiler="clang",
+                                                            compiler_version=["<",
+                                                                              "3.5"],
+                                                            bugnumber="llvm.org/pr27845")])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py Tue Sep  6 15:57:50 2016
@@ -3,9 +3,9 @@
 from __future__ import print_function
 
 
-
 from distutils.version import StrictVersion
-import os, time
+import os
+import time
 import platform
 
 import lldb
@@ -13,13 +13,18 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CModulesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfFreeBSD
-    @expectedFailureAll(oslist=["linux"], bugnumber="http://llvm.org/pr23456 'fopen' has unknown return type")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["linux"],
+        bugnumber="http://llvm.org/pr23456 'fopen' has unknown return type")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_expr(self):
         if platform.system() == "Darwin" and platform.release() < StrictVersion('12.0.0'):
             self.skipTest()
@@ -29,33 +34,46 @@ class CModulesTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
-
-        self.expect("expr -l objc++ -- @import Darwin; 3", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["int", "3"])
+                    substrs=[' resolved, hit count = 1'])
 
-        self.expect("expr *fopen(\"/dev/zero\", \"w\")", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["FILE", "_close"])
+        self.expect(
+            "expr -l objc++ -- @import Darwin; 3",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "int",
+                "3"])
+
+        self.expect(
+            "expr *fopen(\"/dev/zero\", \"w\")",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "FILE",
+                "_close"])
 
         self.expect("expr *myFile", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["a", "5", "b", "9"])
+                    substrs=["a", "5", "b", "9"])
 
-        self.expect("expr MIN((uint64_t)2, (uint64_t)3)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["uint64_t", "2"])
+        self.expect(
+            "expr MIN((uint64_t)2, (uint64_t)3)",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "uint64_t",
+                "2"])
 
         self.expect("expr stdin", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(FILE *)", "0x"])
+                    substrs=["(FILE *)", "0x"])
 
     def setUp(self):
         # Call super's setUp().

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py Tue Sep  6 15:57:50 2016
@@ -2,7 +2,8 @@
 
 from __future__ import print_function
 
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
@@ -15,6 +16,8 @@ from lldbsuite.test import lldbutil
 # Return:
 #   True if the value has a readable value and is in a register
 #   False otherwise
+
+
 def is_variable_in_register(frame, var_name):
     # Ensure we can lookup the variable.
     var = frame.FindVariable(var_name)
@@ -90,9 +93,11 @@ class RegisterVariableTestCase(TestBase)
 
     mydir = TestBase.compute_mydir(__file__)
 
-
     @expectedFailureAll(compiler="clang", compiler_version=['<', '3.5'])
-    @expectedFailureAll(compiler="gcc", compiler_version=['>=', '4.8.2'], archs=["i386", "x86_64"])
+    @expectedFailureAll(
+        compiler="gcc", compiler_version=[
+            '>=', '4.8.2'], archs=[
+            "i386", "x86_64"])
     def test_and_run_command(self):
         """Test expressions on register values."""
 
@@ -108,7 +113,8 @@ class RegisterVariableTestCase(TestBase)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the main.
-        lldbutil.run_break_set_by_source_regexp(self, "break", num_expected_locations=3)
+        lldbutil.run_break_set_by_source_regexp(
+            self, "break", num_expected_locations=3)
 
         ####################
         # First breakpoint
@@ -117,24 +123,25 @@ class RegisterVariableTestCase(TestBase)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Try some variables that should be visible
-        frame = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
+        frame = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame()
         if is_variable_in_register(frame, 'a'):
             register_variables_count += 1
             self.expect("expr a", VARIABLES_DISPLAYED_CORRECTLY,
-                patterns = [re_expr_equals('int', 2)])
+                        patterns=[re_expr_equals('int', 2)])
 
         if is_struct_pointer_in_register(frame, 'b'):
             register_variables_count += 1
             self.expect("expr b->m1", VARIABLES_DISPLAYED_CORRECTLY,
-                patterns = [re_expr_equals('int', 3)])
+                        patterns=[re_expr_equals('int', 3)])
 
         #####################
         # Second breakpoint
@@ -143,24 +150,25 @@ class RegisterVariableTestCase(TestBase)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Try some variables that should be visible
-        frame = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
+        frame = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame()
         if is_struct_pointer_in_register(frame, 'b'):
             register_variables_count += 1
             self.expect("expr b->m2", VARIABLES_DISPLAYED_CORRECTLY,
-                patterns = [re_expr_equals('int', 5)])
+                        patterns=[re_expr_equals('int', 5)])
 
         if is_variable_in_register(frame, 'c'):
             register_variables_count += 1
             self.expect("expr c", VARIABLES_DISPLAYED_CORRECTLY,
-                patterns = [re_expr_equals('int', 5)])
+                        patterns=[re_expr_equals('int', 5)])
 
         #####################
         # Third breakpoint
@@ -169,22 +177,25 @@ class RegisterVariableTestCase(TestBase)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Try some variables that should be visible
-        frame = self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
+        frame = self.dbg.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().GetSelectedFrame()
         if is_variable_in_register(frame, 'f'):
             register_variables_count += 1
             self.expect("expr f", VARIABLES_DISPLAYED_CORRECTLY,
-                patterns = [re_expr_equals('float', '3.1')])
+                        patterns=[re_expr_equals('float', '3.1')])
 
         # Validate that we verified at least one register variable
-        self.assertTrue(register_variables_count > 0, "expected to verify at least one variable in a register")
+        self.assertTrue(
+            register_variables_count > 0,
+            "expected to verify at least one variable in a register")
         # print("executed {} expressions with values in registers".format(register_variables_count))
 
         self.runCmd("kill")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class SetValuesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -31,81 +32,111 @@ class SetValuesTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Set breakpoints on several places to set program variables.
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line1, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line1, num_expected_locations=1, loc_exact=True)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line2, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line2, num_expected_locations=1, loc_exact=True)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line3, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line3, num_expected_locations=1, loc_exact=True)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line4, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line4, num_expected_locations=1, loc_exact=True)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line5, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line5, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # main.c:15
-        # Check that 'frame variable --show-types' displays the correct data type and value.
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(char) i = 'a'")
+        # Check that 'frame variable --show-types' displays the correct data
+        # type and value.
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(char) i = 'a'")
 
         # Now set variable 'i' and check that it is correctly displayed.
         self.runCmd("expression i = 'b'")
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(char) i = 'b'")
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(char) i = 'b'")
 
         self.runCmd("continue")
 
         # main.c:36
-        # Check that 'frame variable --show-types' displays the correct data type and value.
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ["\((short unsigned int|unsigned short)\) i = 33"])
+        # Check that 'frame variable --show-types' displays the correct data
+        # type and value.
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            patterns=["\((short unsigned int|unsigned short)\) i = 33"])
 
         # Now set variable 'i' and check that it is correctly displayed.
         self.runCmd("expression i = 333")
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ["\((short unsigned int|unsigned short)\) i = 333"])
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            patterns=["\((short unsigned int|unsigned short)\) i = 333"])
 
         self.runCmd("continue")
 
         # main.c:57
-        # Check that 'frame variable --show-types' displays the correct data type and value.
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(long) i = 33")
+        # Check that 'frame variable --show-types' displays the correct data
+        # type and value.
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(long) i = 33")
 
         # Now set variable 'i' and check that it is correctly displayed.
         self.runCmd("expression i = 33333")
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(long) i = 33333")
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(long) i = 33333")
 
         self.runCmd("continue")
 
         # main.c:78
-        # Check that 'frame variable --show-types' displays the correct data type and value.
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(double) i = 2.25")
+        # Check that 'frame variable --show-types' displays the correct data
+        # type and value.
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(double) i = 2.25")
 
         # Now set variable 'i' and check that it is correctly displayed.
         self.runCmd("expression i = 1.5")
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(double) i = 1.5")
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(double) i = 1.5")
 
         self.runCmd("continue")
 
         # main.c:85
-        # Check that 'frame variable --show-types' displays the correct data type and value.
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(long double) i = 2.25")
+        # Check that 'frame variable --show-types' displays the correct data
+        # type and value.
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(long double) i = 2.25")
 
         # Now set variable 'i' and check that it is correctly displayed.
         self.runCmd("expression i = 1.5")
-        self.expect("frame variable --show-types", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(long double) i = 1.5")
+        self.expect(
+            "frame variable --show-types",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(long double) i = 1.5")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py Tue Sep  6 15:57:50 2016
@@ -3,12 +3,12 @@
 from __future__ import print_function
 
 
-
 import unittest2
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class SharedLibTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -16,14 +16,20 @@ class SharedLibTestCase(TestBase):
     def test_expr(self):
         """Test that types work when defined in a shared library and forward-declared in the main executable"""
         if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
-            self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
+            self.skipTest(
+                "llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
 
         self.build()
         self.common_setup()
 
         # This should display correctly.
-        self.expect("expression --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
+        self.expect(
+            "expression --show-types -- *my_foo_ptr",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "(foo)",
+                "(sub_foo)",
+                "other_element = 3"])
 
     @unittest2.expectedFailure("rdar://problem/10704639")
     def test_frame_variable(self):
@@ -32,8 +38,13 @@ class SharedLibTestCase(TestBase):
         self.common_setup()
 
         # This should display correctly.
-        self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
+        self.expect(
+            "frame variable --show-types -- *my_foo_ptr",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "(foo)",
+                "(sub_foo)",
+                "other_element = 3"])
 
     def setUp(self):
         # Call super's setUp().
@@ -42,7 +53,7 @@ class SharedLibTestCase(TestBase):
         self.source = 'main.c'
         self.line = line_number(self.source, '// Set breakpoint 0 here.')
         self.shlib_names = ["foo"]
-    
+
     def common_setup(self):
         # Run in synchronous mode
         self.dbg.SetAsync(False)
@@ -52,20 +63,24 @@ class SharedLibTestCase(TestBase):
         self.assertTrue(target, VALID_TARGET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, self.source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
 
-        # Register our shared libraries for remote targets so they get automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(target, self.shlib_names)
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
+        environment = self.registerSharedLibrariesWithTarget(
+            target, self.shlib_names)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,13 @@
 from __future__ import print_function
 
 
-
 import unittest2
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class SharedLibStrippedTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -18,14 +18,20 @@ class SharedLibStrippedTestCase(TestBase
     def test_expr(self):
         """Test that types work when defined in a shared library and forward-declared in the main executable"""
         if "clang" in self.getCompiler() and "3.4" in self.getCompilerVersion():
-            self.skipTest("llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
+            self.skipTest(
+                "llvm.org/pr16214 -- clang emits partial DWARF for structures referenced via typedef")
 
         self.build()
         self.common_setup()
 
         # This should display correctly.
-        self.expect("expression --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
+        self.expect(
+            "expression --show-types -- *my_foo_ptr",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "(foo)",
+                "(sub_foo)",
+                "other_element = 3"])
 
     @expectedFailureAll(oslist=["windows"])
     @unittest2.expectedFailure("rdar://problem/10381325")
@@ -35,8 +41,13 @@ class SharedLibStrippedTestCase(TestBase
         self.common_setup()
 
         # This should display correctly.
-        self.expect("frame variable --show-types -- *my_foo_ptr", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(foo)", "(sub_foo)", "other_element = 3"])
+        self.expect(
+            "frame variable --show-types -- *my_foo_ptr",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "(foo)",
+                "(sub_foo)",
+                "other_element = 3"])
 
     def setUp(self):
         # Call super's setUp().
@@ -55,20 +66,24 @@ class SharedLibStrippedTestCase(TestBase
         self.assertTrue(target, VALID_TARGET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, self.source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
 
-        # Register our shared libraries for remote targets so they get automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(target, self.shlib_names)
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
+        environment = self.registerSharedLibrariesWithTarget(
+            target, self.shlib_names)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py Tue Sep  6 15:57:50 2016
@@ -2,12 +2,14 @@
 
 from __future__ import print_function
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestStepTarget(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,30 +25,32 @@ class TestStepTarget(TestBase):
         self.end_line = line_number(self.main_source, "All done")
 
     @add_test_categories(['pyapi'])
-
-    def get_to_start (self):
+    def get_to_start(self):
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
 
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
 
-        break_in_main = target.BreakpointCreateBySourceRegex ('Break here to try targetted stepping', self.main_source_spec)
+        break_in_main = target.BreakpointCreateBySourceRegex(
+            'Break here to try targetted stepping', self.main_source_spec)
         self.assertTrue(break_in_main, VALID_BREAKPOINT)
-        self.assertTrue(break_in_main.GetNumLocations() > 0,"Has locations.")
+        self.assertTrue(break_in_main.GetNumLocations() > 0, "Has locations.")
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_main)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_in_main)
 
         if len(threads) != 1:
-            self.fail ("Failed to stop at first breakpoint in main.")
+            self.fail("Failed to stop at first breakpoint in main.")
 
         thread = threads[0]
         return thread
@@ -60,7 +64,7 @@ class TestStepTarget(TestBase):
         thread.StepInto("lotsOfArgs", self.end_line, error)
         frame = thread.frames[0]
 
-        self.assertTrue (frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.")
+        self.assertTrue(frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.")
 
     def test_with_end_line_bad_name(self):
         """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
@@ -70,7 +74,9 @@ class TestStepTarget(TestBase):
         error = lldb.SBError()
         thread.StepInto("lotsOfArgssss", self.end_line, error)
         frame = thread.frames[0]
-        self.assertTrue (frame.line_entry.line == self.end_line, "Stepped to the block end.")
+        self.assertTrue(
+            frame.line_entry.line == self.end_line,
+            "Stepped to the block end.")
 
     def test_with_end_line_deeper(self):
         """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
@@ -80,7 +86,7 @@ class TestStepTarget(TestBase):
         error = lldb.SBError()
         thread.StepInto("modifyInt", self.end_line, error)
         frame = thread.frames[0]
-        self.assertTrue (frame.name == "modifyInt", "Stepped to modifyInt.")
+        self.assertTrue(frame.name == "modifyInt", "Stepped to modifyInt.")
 
     def test_with_command_and_block(self):
         """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
@@ -88,11 +94,14 @@ class TestStepTarget(TestBase):
         thread = self.get_to_start()
 
         result = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand('thread step-in -t "lotsOfArgs" -e block', result)
-        self.assertTrue(result.Succeeded(), "thread step-in command succeeded.")
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            'thread step-in -t "lotsOfArgs" -e block', result)
+        self.assertTrue(
+            result.Succeeded(),
+            "thread step-in command succeeded.")
 
         frame = thread.frames[0]
-        self.assertTrue (frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.")
+        self.assertTrue(frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.")
 
     def test_with_command_and_block_and_bad_name(self):
         """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
@@ -100,14 +109,17 @@ class TestStepTarget(TestBase):
         thread = self.get_to_start()
 
         result = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand('thread step-in -t "lotsOfArgsssss" -e block', result)
-        self.assertTrue(result.Succeeded(), "thread step-in command succeeded.")
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            'thread step-in -t "lotsOfArgsssss" -e block', result)
+        self.assertTrue(
+            result.Succeeded(),
+            "thread step-in command succeeded.")
 
         frame = thread.frames[0]
 
-        self.assertTrue (frame.name == "main", "Stepped back out to main.")
-        # end_line is set to the line after the containing block.  Check that we got there:
-        self.assertTrue(frame.line_entry.line == self.end_line, "Got out of the block")
-
-
-        
+        self.assertTrue(frame.name == "main", "Stepped back out to main.")
+        # end_line is set to the line after the containing block.  Check that
+        # we got there:
+        self.assertTrue(
+            frame.line_entry.line == self.end_line,
+            "Got out of the block")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestCStepping(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -35,36 +36,43 @@ class TestCStepping(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        self.main_source_spec = lldb.SBFileSpec (self.main_source)
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
 
         breakpoints_to_disable = []
 
-        break_1_in_main = target.BreakpointCreateBySourceRegex ('// frame select 2, thread step-out while stopped at .c.1..', self.main_source_spec)
+        break_1_in_main = target.BreakpointCreateBySourceRegex(
+            '// frame select 2, thread step-out while stopped at .c.1..',
+            self.main_source_spec)
         self.assertTrue(break_1_in_main, VALID_BREAKPOINT)
-        breakpoints_to_disable.append (break_1_in_main)
+        breakpoints_to_disable.append(break_1_in_main)
 
-        break_in_a = target.BreakpointCreateBySourceRegex ('// break here to stop in a before calling b', self.main_source_spec)
+        break_in_a = target.BreakpointCreateBySourceRegex(
+            '// break here to stop in a before calling b', self.main_source_spec)
         self.assertTrue(break_in_a, VALID_BREAKPOINT)
-        breakpoints_to_disable.append (break_in_a)
+        breakpoints_to_disable.append(break_in_a)
 
-        break_in_b = target.BreakpointCreateBySourceRegex ('// thread step-out while stopped at .c.2..', self.main_source_spec)
+        break_in_b = target.BreakpointCreateBySourceRegex(
+            '// thread step-out while stopped at .c.2..', self.main_source_spec)
         self.assertTrue(break_in_b, VALID_BREAKPOINT)
-        breakpoints_to_disable.append (break_in_b)
+        breakpoints_to_disable.append(break_in_b)
 
-        break_in_c = target.BreakpointCreateBySourceRegex ('// Find the line number of function .c. here.', self.main_source_spec)
+        break_in_c = target.BreakpointCreateBySourceRegex(
+            '// Find the line number of function .c. here.', self.main_source_spec)
         self.assertTrue(break_in_c, VALID_BREAKPOINT)
-        breakpoints_to_disable.append (break_in_c)
+        breakpoints_to_disable.append(break_in_c)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_1_in_main)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_1_in_main)
 
         if len(threads) != 1:
-            self.fail ("Failed to stop at first breakpoint in main.")
+            self.fail("Failed to stop at first breakpoint in main.")
 
         thread = threads[0]
 
@@ -75,22 +83,26 @@ class TestCStepping(TestBase):
         thread.StepOver()
 
         # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_a)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_in_a)
         if len(threads) != 1:
-            self.fail ("Failed to stop at breakpoint in a.")
+            self.fail("Failed to stop at breakpoint in a.")
 
         # Check that the stop ID increases:
         new_stop_id = process.GetStopID()
-        self.assertTrue(new_stop_id > old_stop_id, "Stop ID increases monotonically.")
+        self.assertTrue(
+            new_stop_id > old_stop_id,
+            "Stop ID increases monotonically.")
 
         thread = threads[0]
 
         # Step over, and we should hit the breakpoint in b:
         thread.StepOver()
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_b)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_in_b)
         if len(threads) != 1:
-            self.fail ("Failed to stop at breakpoint in b.")
+            self.fail("Failed to stop at breakpoint in b.")
         thread = threads[0]
 
         # Now try running some function, and make sure that we still end up in the same place
@@ -105,32 +117,51 @@ class TestCStepping(TestBase):
         stop_id_before_expression = process.GetStopID()
         stop_id_before_including_expressions = process.GetStopID(True)
 
-        frame.EvaluateExpression ("(int) printf (print_string)")
+        frame.EvaluateExpression("(int) printf (print_string)")
 
         frame = thread.GetFrameAtIndex(0)
-        self.assertTrue (current_line == frame.GetLineEntry().GetLine(), "The line stayed the same after expression.")
-        self.assertTrue (current_file == frame.GetLineEntry().GetFileSpec(), "The file stayed the same after expression.")
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonBreakpoint, "We still say we stopped for a breakpoint.")
-        self.assertTrue (thread.GetStopReasonDataAtIndex(0) == current_bp[0] and thread.GetStopReasonDataAtIndex(1) == current_bp[1], "And it is the same breakpoint.")
-        
+        self.assertTrue(
+            current_line == frame.GetLineEntry().GetLine(),
+            "The line stayed the same after expression.")
+        self.assertTrue(
+            current_file == frame.GetLineEntry().GetFileSpec(),
+            "The file stayed the same after expression.")
+        self.assertTrue(
+            thread.GetStopReason() == lldb.eStopReasonBreakpoint,
+            "We still say we stopped for a breakpoint.")
+        self.assertTrue(thread.GetStopReasonDataAtIndex(0) == current_bp[
+                        0] and thread.GetStopReasonDataAtIndex(1) == current_bp[1], "And it is the same breakpoint.")
+
         # Also make sure running the expression didn't change the public stop id
         # but did change if we are asking for expression stops as well.
         stop_id_after_expression = process.GetStopID()
         stop_id_after_including_expressions = process.GetStopID(True)
 
-        self.assertTrue (stop_id_before_expression == stop_id_after_expression, "Expression calling doesn't change stop ID")
+        self.assertTrue(
+            stop_id_before_expression == stop_id_after_expression,
+            "Expression calling doesn't change stop ID")
+
+        self.assertTrue(
+            stop_id_after_including_expressions > stop_id_before_including_expressions,
+            "Stop ID including expressions increments over expression call.")
 
-        self.assertTrue (stop_id_after_including_expressions > stop_id_before_including_expressions, "Stop ID including expressions increments over expression call.")
+        # Do the same thing with an expression that's going to crash, and make
+        # sure we are still unchanged.
 
-        # Do the same thing with an expression that's going to crash, and make sure we are still unchanged.
-
-        frame.EvaluateExpression ("((char *) 0)[0] = 'a'")
+        frame.EvaluateExpression("((char *) 0)[0] = 'a'")
 
         frame = thread.GetFrameAtIndex(0)
-        self.assertTrue (current_line == frame.GetLineEntry().GetLine(), "The line stayed the same after expression.")
-        self.assertTrue (current_file == frame.GetLineEntry().GetFileSpec(), "The file stayed the same after expression.")
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonBreakpoint, "We still say we stopped for a breakpoint.")
-        self.assertTrue (thread.GetStopReasonDataAtIndex(0) == current_bp[0] and thread.GetStopReasonDataAtIndex(1) == current_bp[1], "And it is the same breakpoint.")
+        self.assertTrue(
+            current_line == frame.GetLineEntry().GetLine(),
+            "The line stayed the same after expression.")
+        self.assertTrue(
+            current_file == frame.GetLineEntry().GetFileSpec(),
+            "The file stayed the same after expression.")
+        self.assertTrue(
+            thread.GetStopReason() == lldb.eStopReasonBreakpoint,
+            "We still say we stopped for a breakpoint.")
+        self.assertTrue(thread.GetStopReasonDataAtIndex(0) == current_bp[
+                        0] and thread.GetStopReasonDataAtIndex(1) == current_bp[1], "And it is the same breakpoint.")
 
         # Now continue and make sure we just complete the step:
         # Disable all our breakpoints first - sometimes the compiler puts two line table entries in for the
@@ -140,16 +171,17 @@ class TestCStepping(TestBase):
 
         process.Continue()
 
-        self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "a")
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
+        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "a")
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
 
         # And one more time should get us back to main:
         process.Continue()
 
-        self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "main")
-        self.assertTrue (thread.GetStopReason() == lldb.eStopReasonPlanComplete)
+        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "main")
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonPlanComplete)
 
-        # Now make sure we can call a function, break in the called function, then have "continue" get us back out again:
+        # Now make sure we can call a function, break in the called function,
+        # then have "continue" get us back out again:
         frame = thread.GetFrameAtIndex(0)
         frame = thread.GetFrameAtIndex(0)
         current_line = frame.GetLineEntry().GetLine()
@@ -160,12 +192,13 @@ class TestCStepping(TestBase):
         options.SetIgnoreBreakpoints(False)
         options.SetFetchDynamicValue(False)
         options.SetUnwindOnError(False)
-        frame.EvaluateExpression ("b (4)", options)
+        frame.EvaluateExpression("b (4)", options)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_b)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_in_b)
 
         if len(threads) != 1:
-            self.fail ("Failed to stop at breakpoint in b when calling b.")
+            self.fail("Failed to stop at breakpoint in b when calling b.")
         thread = threads[0]
 
         # So do a step over here to make sure we can still do that:
@@ -174,75 +207,95 @@ class TestCStepping(TestBase):
 
         # See that we are still in b:
         func_name = thread.GetFrameAtIndex(0).GetFunctionName()
-        self.assertTrue (func_name == "b", "Should be in 'b', were in %s"%(func_name))
+        self.assertTrue(
+            func_name == "b",
+            "Should be in 'b', were in %s" %
+            (func_name))
 
-        # Okay, now if we continue, we will finish off our function call and we should end up back in "a" as if nothing had happened:
-        process.Continue ()
+        # Okay, now if we continue, we will finish off our function call and we
+        # should end up back in "a" as if nothing had happened:
+        process.Continue()
 
-        self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetLine() == current_line)
-        self.assertTrue (thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec() == current_file)
+        self.assertTrue(thread.GetFrameAtIndex(
+            0).GetLineEntry().GetLine() == current_line)
+        self.assertTrue(thread.GetFrameAtIndex(
+            0).GetLineEntry().GetFileSpec() == current_file)
 
         # Now we are going to test step in targeting a function:
 
-        break_in_b.SetEnabled (False)
+        break_in_b.SetEnabled(False)
 
-        break_before_complex_1 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting b.', self.main_source_spec)
+        break_before_complex_1 = target.BreakpointCreateBySourceRegex(
+            '// Stop here to try step in targeting b.', self.main_source_spec)
         self.assertTrue(break_before_complex_1, VALID_BREAKPOINT)
 
-        break_before_complex_2 = target.BreakpointCreateBySourceRegex ('// Stop here to try step in targeting complex.', self.main_source_spec)
+        break_before_complex_2 = target.BreakpointCreateBySourceRegex(
+            '// Stop here to try step in targeting complex.', self.main_source_spec)
         self.assertTrue(break_before_complex_2, VALID_BREAKPOINT)
 
-        break_before_complex_3 = target.BreakpointCreateBySourceRegex ('// Stop here to step targeting b and hitting breakpoint.', self.main_source_spec)
+        break_before_complex_3 = target.BreakpointCreateBySourceRegex(
+            '// Stop here to step targeting b and hitting breakpoint.', self.main_source_spec)
         self.assertTrue(break_before_complex_3, VALID_BREAKPOINT)
 
-        break_before_complex_4 = target.BreakpointCreateBySourceRegex ('// Stop here to make sure bogus target steps over.', self.main_source_spec)
+        break_before_complex_4 = target.BreakpointCreateBySourceRegex(
+            '// Stop here to make sure bogus target steps over.', self.main_source_spec)
         self.assertTrue(break_before_complex_4, VALID_BREAKPOINT)
 
-        threads = lldbutil.continue_to_breakpoint(process, break_before_complex_1)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.continue_to_breakpoint(
+            process, break_before_complex_1)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
         break_before_complex_1.SetEnabled(False)
 
-        thread.StepInto ("b")
-        self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "b")
+        thread.StepInto("b")
+        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "b")
 
-        # Now continue out and stop at the next call to complex.  This time step all the way into complex:
-        threads = lldbutil.continue_to_breakpoint (process, break_before_complex_2)
-        self.assertTrue (len(threads) == 1)
+        # Now continue out and stop at the next call to complex.  This time
+        # step all the way into complex:
+        threads = lldbutil.continue_to_breakpoint(
+            process, break_before_complex_2)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
         break_before_complex_2.SetEnabled(False)
 
-        thread.StepInto ("complex")
-        self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "complex")
-        
-        # Now continue out and stop at the next call to complex.  This time enable breakpoints in a and c and then step targeting b:
-        threads = lldbutil.continue_to_breakpoint (process, break_before_complex_3)
-        self.assertTrue (len(threads) == 1)
+        thread.StepInto("complex")
+        self.assertTrue(thread.GetFrameAtIndex(
+            0).GetFunctionName() == "complex")
+
+        # Now continue out and stop at the next call to complex.  This time
+        # enable breakpoints in a and c and then step targeting b:
+        threads = lldbutil.continue_to_breakpoint(
+            process, break_before_complex_3)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
         break_before_complex_3.SetEnabled(False)
 
-        break_at_start_of_a = target.BreakpointCreateByName ('a')
-        break_at_start_of_c = target.BreakpointCreateByName ('c')
+        break_at_start_of_a = target.BreakpointCreateByName('a')
+        break_at_start_of_c = target.BreakpointCreateByName('c')
 
-        thread.StepInto ("b")
-        threads = lldbutil.get_stopped_threads(process, lldb.eStopReasonBreakpoint);
+        thread.StepInto("b")
+        threads = lldbutil.get_stopped_threads(
+            process, lldb.eStopReasonBreakpoint)
 
-        self.assertTrue (len(threads) == 1)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
         stop_break_id = thread.GetStopReasonDataAtIndex(0)
-        self.assertTrue(stop_break_id == break_at_start_of_a.GetID() or stop_break_id == break_at_start_of_c.GetID())
+        self.assertTrue(stop_break_id == break_at_start_of_a.GetID()
+                        or stop_break_id == break_at_start_of_c.GetID())
 
         break_at_start_of_a.SetEnabled(False)
         break_at_start_of_c.SetEnabled(False)
 
         process.Continue()
-        self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "b")
-        
-        # Now continue out and stop at the next call to complex.  This time enable breakpoints in a and c and then step targeting b:
-        threads = lldbutil.continue_to_breakpoint (process, break_before_complex_4)
-        self.assertTrue (len(threads) == 1)
+        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "b")
+
+        # Now continue out and stop at the next call to complex.  This time
+        # enable breakpoints in a and c and then step targeting b:
+        threads = lldbutil.continue_to_breakpoint(
+            process, break_before_complex_4)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
         break_before_complex_4.SetEnabled(False)
 
         thread.StepInto("NoSuchFunction")
-        self.assertTrue (thread.GetFrameAtIndex(0).GetFunctionName() == "main")
+        self.assertTrue(thread.GetFrameAtIndex(0).GetFunctionName() == "main")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test thread stepping features in combina
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class ThreadSteppingTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,10 +22,14 @@ class ThreadSteppingTestCase(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to of function 'c'.
-        self.line1 = line_number('main.c', '// Find the line number of function "c" here.')
-        self.line2 = line_number('main.c', '// frame select 2, thread step-out while stopped at "c(1)"')
-        self.line3 = line_number('main.c', '// thread step-out while stopped at "c(2)"')
-        self.line4 = line_number('main.c', '// frame select 1, thread step-out while stopped at "c(3)"')
+        self.line1 = line_number(
+            'main.c', '// Find the line number of function "c" here.')
+        self.line2 = line_number(
+            'main.c', '// frame select 2, thread step-out while stopped at "c(1)"')
+        self.line3 = line_number(
+            'main.c', '// thread step-out while stopped at "c(2)"')
+        self.line4 = line_number(
+            'main.c', '// frame select 1, thread step-out while stopped at "c(3)"')
 
     def test_step_out_with_run_command(self):
         """Exercise thread step-out and frame select followed by thread step-out."""
@@ -33,49 +38,50 @@ class ThreadSteppingTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Create a breakpoint inside function 'c'.
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", self.line1, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line1, num_expected_locations=1, loc_exact=True)
 
         # Now run the program.
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The process should be stopped at this point.
         self.expect("process status", PROCESS_STOPPED,
-            patterns = ['Process .* stopped'])
+                    patterns=['Process .* stopped'])
 
         # The frame #0 should correspond to main.c:32, the executable statement
         # in function name 'c'.  And frame #3 should point to main.c:37.
         self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ["stop reason = breakpoint"],
-            patterns = ["frame #0.*main.c:%d" % self.line1,
-                        "frame #3.*main.c:%d" % self.line2])
+                    substrs=["stop reason = breakpoint"],
+                    patterns=["frame #0.*main.c:%d" % self.line1,
+                              "frame #3.*main.c:%d" % self.line2])
 
         # We want to move the pc to frame #3.  This can be accomplished by
         # 'frame select 2', followed by 'thread step-out'.
         self.runCmd("frame select 2")
         self.runCmd("thread step-out")
         self.expect("thread backtrace", STEP_OUT_SUCCEEDED,
-            substrs = ["stop reason = step out"],
-            patterns = ["frame #0.*main.c:%d" % self.line2])
+                    substrs=["stop reason = step out"],
+                    patterns=["frame #0.*main.c:%d" % self.line2])
 
         # Let's move on to a single step-out case.
         self.runCmd("process continue")
 
         # The process should be stopped at this point.
         self.expect("process status", PROCESS_STOPPED,
-            patterns = ['Process .* stopped'])
+                    patterns=['Process .* stopped'])
         self.runCmd("thread step-out")
         self.expect("thread backtrace", STEP_OUT_SUCCEEDED,
-            substrs = ["stop reason = step out"],
-            patterns = ["frame #0.*main.c:%d" % self.line3])
+                    substrs=["stop reason = step out"],
+                    patterns=["frame #0.*main.c:%d" % self.line3])
 
         # Do another frame selct, followed by thread step-out.
         self.runCmd("process continue")
 
         # The process should be stopped at this point.
         self.expect("process status", PROCESS_STOPPED,
-            patterns = ['Process .* stopped'])
+                    patterns=['Process .* stopped'])
         self.runCmd("frame select 1")
         self.runCmd("thread step-out")
         self.expect("thread backtrace", STEP_OUT_SUCCEEDED,
-            substrs = ["stop reason = step out"],
-            patterns = ["frame #0.*main.c:%d" % self.line4])
+                    substrs=["stop reason = step out"],
+                    patterns=["frame #0.*main.c:%d" % self.line4])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py Tue Sep  6 15:57:50 2016
@@ -6,10 +6,11 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CStringsTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
     def test_with_run_command(self):
         """Tests that C strings work as expected in expressions"""
@@ -17,39 +18,40 @@ class CStringsTestCase(TestBase):
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
         line = line_number('main.c', '// breakpoint 1')
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 
         self.expect("expression -- a[2]",
-                    patterns = ["\((const )?char\) \$0 = 'c'"])
+                    patterns=["\((const )?char\) \$0 = 'c'"])
 
         self.expect("expression -- z[2]",
-                    startstr = "(const char) $1 = 'x'")
+                    startstr="(const char) $1 = 'x'")
 
         # On Linux, the expression below will test GNU indirect function calls.
         self.expect("expression -- (int)strlen(\"hello\")",
-                    startstr = "(int) $2 = 5")
+                    startstr="(int) $2 = 5")
 
         self.expect("expression -- \"world\"[2]",
-                    startstr = "(const char) $3 = 'r'")
+                    startstr="(const char) $3 = 'r'")
 
         self.expect("expression -- \"\"[0]",
-                    startstr = "(const char) $4 = '\\0'")
+                    startstr="(const char) $4 = '\\0'")
 
         self.expect("expr --raw -- \"hello\"",
-            substrs = ['[0] = \'h\'',
-                       '[5] = \'\\0\''])
+                    substrs=['[0] = \'h\'',
+                             '[5] = \'\\0\''])
 
         self.expect("p \"hello\"",
-            substrs = ['[6]) $', 'hello'])
+                    substrs=['[6]) $', 'hello'])
 
         self.expect("p (char*)\"hello\"",
-                    substrs = ['(char *) $', ' = 0x',
-                               'hello'])
+                    substrs=['(char *) $', ' = 0x',
+                             'hello'])
 
         self.expect("p (int)strlen(\"\")",
-                    substrs = ['(int) $', ' = 0'])
+                    substrs=['(int) $', ' = 0'])
 
         self.expect("expression !z",
-                    substrs = ['false'])
+                    substrs=['false'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/struct_types/TestStructTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/struct_types/TestStructTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/struct_types/TestStructTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/struct_types/TestStructTypes.py Tue Sep  6 15:57:50 2016
@@ -1,4 +1,7 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")] )
+lldbinline.MakeInlineTest(
+    __file__, globals(), [
+        decorators.expectedFailureAll(
+            oslist=["windows"], bugnumber="llvm.org/pr24764")])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py Tue Sep  6 15:57:50 2016
@@ -3,14 +3,15 @@
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TlsGlobalTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,15 +20,31 @@ class TlsGlobalTestCase(TestBase):
         TestBase.setUp(self)
 
         if self.getPlatform() == "freebsd" or self.getPlatform() == "linux":
-            # LD_LIBRARY_PATH must be set so the shared libraries are found on startup
+            # LD_LIBRARY_PATH must be set so the shared libraries are found on
+            # startup
             if "LD_LIBRARY_PATH" in os.environ:
-                self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.environ["LD_LIBRARY_PATH"] + ":" + os.getcwd())
+                self.runCmd(
+                    "settings set target.env-vars " +
+                    self.dylibPath +
+                    "=" +
+                    os.environ["LD_LIBRARY_PATH"] +
+                    ":" +
+                    os.getcwd())
             else:
-                self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.getcwd())
-            self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars " + self.dylibPath))
-
-    @skipIfWindows # TLS works differently on Windows, this would need to be implemented separately.
-    @expectedFailureAll(bugnumber="llvm.org/pr28392", oslist=no_match(lldbplatformutil.getDarwinOSTriples()))
+                self.runCmd("settings set target.env-vars " +
+                            self.dylibPath + "=" + os.getcwd())
+            self.addTearDownHook(
+                lambda: self.runCmd(
+                    "settings remove target.env-vars " +
+                    self.dylibPath))
+
+    # TLS works differently on Windows, this would need to be implemented
+    # separately.
+    @skipIfWindows
+    @expectedFailureAll(
+        bugnumber="llvm.org/pr28392",
+        oslist=no_match(
+            lldbplatformutil.getDarwinOSTriples()))
     def test(self):
         """Test thread-local storage."""
         self.build()
@@ -35,14 +52,15 @@ class TlsGlobalTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         line1 = line_number('main.c', '// thread breakpoint')
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", line1, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", line1, num_expected_locations=1, loc_exact=True)
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.runCmd("process status", "Get process status")
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # BUG: sometimes lldb doesn't change threads to the stopped thread.
         # (unrelated to this test).
@@ -50,20 +68,21 @@ class TlsGlobalTestCase(TestBase):
 
         # Check that TLS evaluates correctly within the thread.
         self.expect("expr var_static", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ["\(int\) \$.* = 88"])
+                    patterns=["\(int\) \$.* = 88"])
         self.expect("expr var_shared", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ["\(int\) \$.* = 66"])
+                    patterns=["\(int\) \$.* = 66"])
 
         # Continue on the main thread
         line2 = line_number('main.c', '// main breakpoint')
-        lldbutil.run_break_set_by_file_and_line (self, "main.c", line2, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", line2, num_expected_locations=1, loc_exact=True)
         self.runCmd("continue", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.runCmd("process status", "Get process status")
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # BUG: sometimes lldb doesn't change threads to the stopped thread.
         # (unrelated to this test).
@@ -71,6 +90,6 @@ class TlsGlobalTestCase(TestBase):
 
         # Check that TLS evaluates correctly within the main thread.
         self.expect("expr var_static", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ["\(int\) \$.* = 44"])
+                    patterns=["\(int\) \$.* = 44"])
         self.expect("expr var_shared", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ["\(int\) \$.* = 33"])
+                    patterns=["\(int\) \$.* = 33"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py Tue Sep  6 15:57:50 2016
@@ -3,19 +3,22 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TypedefTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @expectedFailureAll(compiler="clang", bugnumber="llvm.org/pr19238")
-    @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr25626 expectedFailureClang fails on FreeBSD")
+    @expectedFailureAll(
+        oslist=["freebsd"],
+        bugnumber="llvm.org/pr25626 expectedFailureClang fails on FreeBSD")
     def test_typedef(self):
         """Test 'image lookup -t a' and check for correct display at different scopes."""
         self.build()
@@ -25,17 +28,28 @@ class TypedefTestCase(TestBase):
         """Test 'image lookup -t a' at different scopes and check for correct display."""
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        typearray = ("float", "float", "char", "double *", "float", "int", "double", "float", "float")
-        arraylen = len(typearray)+1
-        for i in range(1,arraylen):
-            loc_line = line_number('main.c', '// Set break point ' + str(i) + '.')
-            lldbutil.run_break_set_by_file_and_line (self, "main.c",loc_line, num_expected_locations=1, loc_exact=True)
+        typearray = (
+            "float",
+            "float",
+            "char",
+            "double *",
+            "float",
+            "int",
+            "double",
+            "float",
+            "float")
+        arraylen = len(typearray) + 1
+        for i in range(1, arraylen):
+            loc_line = line_number(
+                'main.c', '// Set break point ' + str(i) + '.')
+            lldbutil.run_break_set_by_file_and_line(
+                self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         for t in typearray:
             self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped', 'stop reason = breakpoint'])
+                        substrs=['stopped', 'stop reason = breakpoint'])
             self.expect("image lookup -t a", DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs = ['name = "' + t + '"'])
+                        substrs=['name = "' + t + '"'])
             self.runCmd("continue")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py Tue Sep  6 15:57:50 2016
@@ -2,6 +2,7 @@ import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class TestUnionMembers(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -10,22 +11,29 @@ class TestUnionMembers(TestBase):
         self._load_exe()
 
         # Set breakpoints
-        bp = self.target.BreakpointCreateBySourceRegex("Break here", self.src_file_spec)
-        self.assertTrue(bp.IsValid() and bp.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        bp = self.target.BreakpointCreateBySourceRegex(
+            "Break here", self.src_file_spec)
+        self.assertTrue(
+            bp.IsValid() and bp.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
-        self.process = self.target.LaunchSimple(None, None, self.get_process_working_directory())
+        self.process = self.target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
 
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("u");
+        val = frame.EvaluateExpression("u")
         self.assertTrue(val.IsValid())
-        val = frame.EvaluateExpression("u.s");
+        val = frame.EvaluateExpression("u.s")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetNumChildren(), 2)
 
@@ -39,7 +47,7 @@ class TestUnionMembers(TestBase):
         self.assertTrue(self.src_file_spec.IsValid(), "breakpoint file")
 
         # Get the path of the executable
-        exe_path  = os.path.join(cwd, 'a.out')
+        exe_path = os.path.join(cwd, 'a.out')
 
         # Load the executable
         self.target = self.dbg.CreateTarget(exe_path)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py Tue Sep  6 15:57:50 2016
@@ -6,11 +6,14 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CPPAutoTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(compiler="gcc", bugnumber="GCC generates incomplete debug info")
+    @expectedFailureAll(
+        compiler="gcc",
+        bugnumber="GCC generates incomplete debug info")
     @expectedFailureAll(oslist=['windows'], bugnumber="llvm.org/pr26339")
     def test_with_run_command(self):
         """Test that auto types work in the expression parser"""
@@ -18,10 +21,20 @@ class CPPAutoTestCase(TestBase):
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
         line = line_number('main.cpp', '// break here')
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 
         self.expect('expr auto f = 123456; f', substrs=['int', '123456'])
-        self.expect('expr struct Test { int x; int y; Test() : x(123), y(456) {} }; auto t = Test(); t', substrs=['Test', '123', '456'])
-        self.expect('expr auto s = helloworld; s', substrs=['string', 'hello world'])
+        self.expect(
+            'expr struct Test { int x; int y; Test() : x(123), y(456) {} }; auto t = Test(); t',
+            substrs=[
+                'Test',
+                '123',
+                '456'])
+        self.expect(
+            'expr auto s = helloworld; s',
+            substrs=[
+                'string',
+                'hello world'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py Tue Sep  6 15:57:50 2016
@@ -5,22 +5,24 @@ import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class CPPBoolTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def test_with_run_command(self):
         """Test that bool types work in the expression parser"""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
         line = line_number('main.cpp', '// breakpoint 1')
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 
         self.expect("expression -- bool second_bool = my_bool; second_bool",
-                    startstr = "(bool) $0 = false")
+                    startstr="(bool) $0 = false")
 
         self.expect("expression -- my_bool = true",
-                    startstr = "(bool) $1 = true")
+                    startstr="(bool) $1 = true")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py Tue Sep  6 15:57:50 2016
@@ -5,28 +5,31 @@ Test lldb breakpoint command for CPP met
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CPPBreakpointCommandsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @expectedFailureAll(oslist=["windows"])
-
     def make_breakpoint(self, name, type, expected_num_locations):
-        bkpt = self.target.BreakpointCreateByName (name,
-                                                   type,
-                                                   self.a_out_module,
-                                                   self.nested_comp_unit)
+        bkpt = self.target.BreakpointCreateByName(name,
+                                                  type,
+                                                  self.a_out_module,
+                                                  self.nested_comp_unit)
         num_locations = bkpt.GetNumLocations()
-        self.assertTrue (num_locations == expected_num_locations, 
-                         "Wrong number of locations for '%s', expected: %d got: %d"%(
-                         name, expected_num_locations, num_locations))
+        self.assertTrue(
+            num_locations == expected_num_locations,
+            "Wrong number of locations for '%s', expected: %d got: %d" %
+            (name,
+             expected_num_locations,
+             num_locations))
         return bkpt
 
     def test_cpp_breakpoint_cmds(self):
@@ -37,48 +40,48 @@ class CPPBreakpointCommandsTestCase(Test
 
         # Create a target from the debugger.
 
-        self.target = self.dbg.CreateTarget (exe)
+        self.target = self.dbg.CreateTarget(exe)
         self.assertTrue(self.target, VALID_TARGET)
 
         self.a_out_module = lldb.SBFileSpecList()
         self.a_out_module.Append(lldb.SBFileSpec(exe))
 
         self.nested_comp_unit = lldb.SBFileSpecList()
-        self.nested_comp_unit.Append (lldb.SBFileSpec("nested.cpp"))
+        self.nested_comp_unit.Append(lldb.SBFileSpec("nested.cpp"))
 
         # First provide ONLY the method name.  This should get everybody...
         self.make_breakpoint("Function",
-                              lldb.eFunctionNameTypeAuto,
-                              5)
+                             lldb.eFunctionNameTypeAuto,
+                             5)
 
         # Now add the Baz class specifier.  This should get the version contained in Bar,
         # AND the one contained in ::
         self.make_breakpoint("Baz::Function",
-                              lldb.eFunctionNameTypeAuto,
-                              2)
+                             lldb.eFunctionNameTypeAuto,
+                             2)
 
-        # Then add the Bar::Baz specifier.  This should get the version contained in Bar only
+        # Then add the Bar::Baz specifier.  This should get the version
+        # contained in Bar only
         self.make_breakpoint("Bar::Baz::Function",
-                              lldb.eFunctionNameTypeAuto,
-                              1)
+                             lldb.eFunctionNameTypeAuto,
+                             1)
 
-        self.make_breakpoint("Function", 
+        self.make_breakpoint("Function",
                              lldb.eFunctionNameTypeMethod,
-                              3)
+                             3)
 
-        self.make_breakpoint("Baz::Function", 
-                              lldb.eFunctionNameTypeMethod,
-                              2)
+        self.make_breakpoint("Baz::Function",
+                             lldb.eFunctionNameTypeMethod,
+                             2)
 
-        self.make_breakpoint("Bar::Baz::Function", 
+        self.make_breakpoint("Bar::Baz::Function",
                              lldb.eFunctionNameTypeMethod,
                              1)
 
-        self.make_breakpoint("Function", 
+        self.make_breakpoint("Function",
                              lldb.eFunctionNameTypeBase,
                              2)
 
-        self.make_breakpoint("Bar::Function", 
+        self.make_breakpoint("Bar::Function",
                              lldb.eFunctionNameTypeBase,
                              1)
-

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py Tue Sep  6 15:57:50 2016
@@ -7,28 +7,32 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CallCPPFunctionTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def setUp(self):
         TestBase.setUp(self)
         self.line = line_number('main.cpp', '// breakpoint')
-    
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_with_run_command(self):
         """Test calling a function by basename"""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list",
                     STOPPED_DUE_TO_BREAKPOINT,
-                    substrs = ['stopped', 'stop reason = breakpoint'])
+                    substrs=['stopped', 'stop reason = breakpoint'])
 
         self.expect("expression -- a_function_to_call()",
-                    startstr = "(int) $0 = 0")
+                    startstr="(int) $0 = 0")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py Tue Sep  6 15:57:50 2016
@@ -3,6 +3,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestCppChainedCalls(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -17,58 +18,85 @@ class TestCppChainedCalls(TestBase):
         self.assertTrue(src_file_spec.IsValid(), "Main source file")
 
         # Get the path of the executable
-        cwd = os.getcwd() 
+        cwd = os.getcwd()
         exe_file = "a.out"
-        exe_path  = os.path.join(cwd, exe_file)
+        exe_path = os.path.join(cwd, exe_file)
 
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(target.IsValid(), VALID_TARGET)
 
         # Break on main function
-        main_breakpoint = target.BreakpointCreateBySourceRegex("break here", src_file_spec)
-        self.assertTrue(main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        main_breakpoint = target.BreakpointCreateBySourceRegex(
+            "break here", src_file_spec)
+        self.assertTrue(
+            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
         args = None
         env = None
-        process = target.LaunchSimple(args, env, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            args, env, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         # Get frame for current thread
         frame = thread.GetSelectedFrame()
 
         # Test chained calls
         test_result = frame.EvaluateExpression("get(set(true))")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "true", "get(set(true)) = true")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "true",
+            "get(set(true)) = true")
 
         test_result = frame.EvaluateExpression("get(set(false))")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "get(set(false)) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "get(set(false)) = false")
 
         test_result = frame.EvaluateExpression("get(t & f)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "get(t & f) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "get(t & f) = false")
 
         test_result = frame.EvaluateExpression("get(f & t)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "get(f & t) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "get(f & t) = false")
 
         test_result = frame.EvaluateExpression("get(t & t)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "true", "get(t & t) = true")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "true",
+            "get(t & t) = true")
 
         test_result = frame.EvaluateExpression("get(f & f)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "get(f & f) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "get(f & f) = false")
 
         test_result = frame.EvaluateExpression("get(t & f)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "get(t & f) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "get(t & f) = false")
 
         test_result = frame.EvaluateExpression("get(f) && get(t)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "get(f) && get(t) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "get(f) && get(t) = false")
 
         test_result = frame.EvaluateExpression("get(f) && get(f)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "get(f) && get(t) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "get(f) && get(t) = false")
 
         test_result = frame.EvaluateExpression("get(t) && get(t)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "true", "get(t) && get(t) = true")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "true",
+            "get(t) && get(t) = true")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py Tue Sep  6 15:57:50 2016
@@ -6,13 +6,14 @@ Test that the C++11 support for char16_t
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class Char1632TestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,10 +23,12 @@ class Char1632TestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break for main.cpp.
         self.source = 'main.cpp'
-        self.lines = [ line_number(self.source, '// breakpoint1'), 
-                       line_number(self.source, '// breakpoint2') ]
+        self.lines = [line_number(self.source, '// breakpoint1'),
+                      line_number(self.source, '// breakpoint2')]
 
-    @expectedFailureAll(compiler="icc", bugnumber="ICC (13.1) does not emit the DW_TAG_base_type for char16_t and char32_t.")
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="ICC (13.1) does not emit the DW_TAG_base_type for char16_t and char32_t.")
     def test(self):
         """Test that the C++11 support for char16_t and char32_t works correctly."""
         self.build()
@@ -37,54 +40,83 @@ class Char1632TestCase(TestBase):
 
         # Set breakpoints
         for line in self.lines:
-            lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line)
+            lldbutil.run_break_set_by_file_and_line(self, "main.cpp", line)
 
-        # Now launch the process, and do not stop at entry point and stop at breakpoint1
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        # Now launch the process, and do not stop at entry point and stop at
+        # breakpoint1
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
 
         if self.TraceOn():
-             self.runCmd("frame variable")
+            self.runCmd("frame variable")
 
         # Check that we correctly report the const types
-        self.expect("frame variable cs16 cs32",
-            substrs = ['(const char16_t *) cs16 = ','(const char32_t *) cs32 = ','u"hello world ྒྙྐ"','U"hello world ྒྙྐ"'])
+        self.expect(
+            "frame variable cs16 cs32",
+            substrs=[
+                '(const char16_t *) cs16 = ',
+                '(const char32_t *) cs32 = ',
+                'u"hello world ྒྙྐ"',
+                'U"hello world ྒྙྐ"'])
 
         # Check that we correctly report the non-const types
-        self.expect("frame variable s16 s32",
-            substrs = ['(char16_t *) s16 = ','(char32_t *) s32 = ','u"ﺸﺵۻ"','U"ЕЙРГЖО"'])
+        self.expect(
+            "frame variable s16 s32",
+            substrs=[
+                '(char16_t *) s16 = ',
+                '(char32_t *) s32 = ',
+                'u"ﺸﺵۻ"',
+                'U"ЕЙРГЖО"'])
 
         # Check that we correctly report the array types
-        self.expect("frame variable as16 as32",
-            patterns = ['\(char16_t \[[0-9]+\]\) as16 = ', '\(char32_t \[[0-9]+\]\) as32 = '],
-            substrs = ['u"ﺸﺵۻ"','U"ЕЙРГЖО"'])
+        self.expect(
+            "frame variable as16 as32",
+            patterns=[
+                '\(char16_t \[[0-9]+\]\) as16 = ',
+                '\(char32_t \[[0-9]+\]\) as32 = '],
+            substrs=[
+                'u"ﺸﺵۻ"',
+                'U"ЕЙРГЖО"'])
 
-        self.runCmd("next") # step to after the string is nullified
+        self.runCmd("next")  # step to after the string is nullified
 
         # check that we don't crash on NULL
         self.expect("frame variable s32",
-            substrs = ['(char32_t *) s32 = 0x00000000'])
+                    substrs=['(char32_t *) s32 = 0x00000000'])
 
         # continue and hit breakpoint2
         self.runCmd("continue")
 
         # check that the new strings show
-        self.expect("frame variable s16 s32",
-            substrs = ['(char16_t *) s16 = 0x','(char32_t *) s32 = ','"色ハ匂ヘト散リヌルヲ"','"෴"'])
+        self.expect(
+            "frame variable s16 s32",
+            substrs=[
+                '(char16_t *) s16 = 0x',
+                '(char32_t *) s32 = ',
+                '"色ハ匂ヘト散リヌルヲ"',
+                '"à·´"'])
 
         # check the same as above for arrays
-        self.expect("frame variable as16 as32",
-            patterns = ['\(char16_t \[[0-9]+\]\) as16 = ', '\(char32_t \[[0-9]+\]\) as32 = '],
-            substrs = ['"色ハ匂ヘト散リヌルヲ"','"෴"'])
+        self.expect(
+            "frame variable as16 as32",
+            patterns=[
+                '\(char16_t \[[0-9]+\]\) as16 = ',
+                '\(char32_t \[[0-9]+\]\) as32 = '],
+            substrs=[
+                '"色ハ匂ヘト散リヌルヲ"',
+                '"à·´"'])
 
         # check that zero values are properly handles
         self.expect('frame variable cs16_zero', substrs=["U+0000 u'\\0'"])
-        self.expect('frame variable cs32_zero', substrs=["U+0x00000000 U'\\0'"])
+        self.expect(
+            'frame variable cs32_zero',
+            substrs=["U+0x00000000 U'\\0'"])
         self.expect('expression cs16_zero', substrs=["U+0000 u'\\0'"])
         self.expect('expression cs32_zero', substrs=["U+0x00000000 U'\\0'"])
 
         # Check that we can run expressions that return charN_t
-        self.expect("expression u'a'",substrs = ['(char16_t) $',"61 u'a'"])
-        self.expect("expression U'a'",substrs = ['(char32_t) $',"61 U'a'"])
+        self.expect("expression u'a'", substrs=['(char16_t) $', "61 u'a'"])
+        self.expect("expression U'a'", substrs=['(char32_t) $', "61 U'a'"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test display and Python APIs on file and
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class StaticVariableTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -28,30 +29,42 @@ class StaticVariableTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
-        # global variables are no longer displayed with the "frame variable" command. 
-        self.expect('target variable A::g_points', VARIABLES_DISPLAYED_CORRECTLY,
+        # global variables are no longer displayed with the "frame variable"
+        # command.
+        self.expect(
+            'target variable A::g_points',
+            VARIABLES_DISPLAYED_CORRECTLY,
             patterns=['\(PointType \[[1-9]*\]\) A::g_points = {.*}'])
         self.expect('target variable g_points', VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['(PointType [2]) g_points'])
+                    substrs=['(PointType [2]) g_points'])
 
         # On Mac OS X, gcc 4.2 emits the wrong debug info for A::g_points.
         # A::g_points is an array of two elements.
         if self.platformIsDarwin() or self.getPlatform() == "linux":
-            self.expect("target variable A::g_points[1].x", VARIABLES_DISPLAYED_CORRECTLY,
-                startstr = "(int) A::g_points[1].x = 11")
+            self.expect(
+                "target variable A::g_points[1].x",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                startstr="(int) A::g_points[1].x = 11")
 
     @expectedFailureDarwin(9980907)
-    @expectedFailureAll(compiler=["clang", "gcc"], bugnumber="Compiler emits incomplete debug info")
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr20550 failing on FreeBSD-11')
+    @expectedFailureAll(
+        compiler=[
+            "clang",
+            "gcc"],
+        bugnumber="Compiler emits incomplete debug info")
+    @expectedFailureAll(
+        oslist=['freebsd'],
+        bugnumber='llvm.org/pr20550 failing on FreeBSD-11')
     @add_test_categories(['pyapi'])
     def test_with_python_api(self):
         """Test Python APIs on file and class static variables."""
@@ -65,11 +78,13 @@ class StaticVariableTestCase(TestBase):
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         # Get the SBValue of 'A::g_points' and 'g_points'.
@@ -86,10 +101,12 @@ class StaticVariableTestCase(TestBase):
             name = val.GetName()
             self.assertTrue(name in ['g_points', 'A::g_points'])
             if name == 'g_points':
-                self.assertTrue(val.GetValueType() == lldb.eValueTypeVariableStatic)
+                self.assertTrue(
+                    val.GetValueType() == lldb.eValueTypeVariableStatic)
                 self.assertTrue(val.GetNumChildren() == 2)
             elif name == 'A::g_points':
-                self.assertTrue(val.GetValueType() == lldb.eValueTypeVariableGlobal)
+                self.assertTrue(
+                    val.GetValueType() == lldb.eValueTypeVariableGlobal)
                 self.assertTrue(val.GetNumChildren() == 2)
                 child1 = val.GetChildAtIndex(1)
                 self.DebugSBValue(child1)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ClassTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -27,7 +28,8 @@ class ClassTypesTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break on the ctor function of class C.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -40,17 +42,20 @@ class ClassTypesTestCase(TestBase):
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # We should be stopped on the ctor function of class C.
-        self.expect("frame variable --show-types this", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['C *',
-                       ' this = '])
+        self.expect(
+            "frame variable --show-types this",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'C *',
+                ' this = '])
 
     @add_test_categories(['pyapi'])
     def test_with_python_api(self):
@@ -77,11 +82,12 @@ class ClassTypesTestCase(TestBase):
 
         # Verify the breakpoint just created.
         self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
-            substrs = ['main.cpp',
-                       str(self.line)])
+                    substrs=['main.cpp',
+                             str(self.line)])
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
@@ -92,7 +98,8 @@ class ClassTypesTestCase(TestBase):
                       lldbutil.state_type_to_str(process.GetState()))
 
         # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         # The filename of frame #0 should be 'main.cpp' and the line number
@@ -100,9 +107,9 @@ class ClassTypesTestCase(TestBase):
         self.expect("%s:%d" % (lldbutil.get_filenames(thread)[0],
                                lldbutil.get_line_numbers(thread)[0]),
                     "Break correctly at main.cpp:%d" % self.line, exe=False,
-            startstr = "main.cpp:")
-            ### clang compiled code reported main.cpp:94?
-            ### startstr = "main.cpp:93")
+                    startstr="main.cpp:")
+        # clang compiled code reported main.cpp:94?
+        # startstr = "main.cpp:93")
 
         # We should be stopped on the breakpoint with a hit count of 1.
         self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
@@ -119,49 +126,54 @@ class ClassTypesTestCase(TestBase):
         # Is this a case of clang (116.1) generating bad debug info?
         #
         # Break on the ctor function of class C.
-        #self.expect("breakpoint set -M C", BREAKPOINT_CREATED,
+        # self.expect("breakpoint set -M C", BREAKPOINT_CREATED,
         #    startstr = "Breakpoint created: 1: name = 'C'")
 
-        # Make the test case more robust by using line number to break, instead.
-        lldbutil.run_break_set_by_file_and_line (self, None, self.line, num_expected_locations=-1)
+        # Make the test case more robust by using line number to break,
+        # instead.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=-1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Continue on inside the ctor() body...
         self.runCmd("register read pc")
         self.runCmd("thread step-over")
 
         # Verify that 'frame variable this' gets the data type correct.
-        self.expect("frame variable this",VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['C *'])
+        self.expect("frame variable this", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['C *'])
 
-        # Verify that frame variable --show-types this->m_c_int behaves correctly.
+        # Verify that frame variable --show-types this->m_c_int behaves
+        # correctly.
         self.runCmd("register read pc")
         self.runCmd("expr m_c_int")
-        self.expect("frame variable --show-types this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(int) this->m_c_int = 66')
+        self.expect(
+            "frame variable --show-types this->m_c_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr='(int) this->m_c_int = 66')
 
         # Verify that 'expression this' gets the data type correct.
         self.expect("expression this", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['C *'])
+                    substrs=['C *'])
 
         # rdar://problem/8430916
         # expr this->m_c_int returns an incorrect value
         #
         # Verify that expr this->m_c_int behaves correctly.
         self.expect("expression this->m_c_int", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ['\(int\) \$[0-9]+ = 66'])
+                    patterns=['\(int\) \$[0-9]+ = 66'])
 
-    def test_with_constructor_name (self):
+    def test_with_constructor_name(self):
         """Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
@@ -185,11 +197,12 @@ class ClassTypesTestCase(TestBase):
 
         # Verify the breakpoint just created.
         self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
-            substrs = ['main.cpp',
-                       str(self.line)])
+                    substrs=['main.cpp',
+                             str(self.line)])
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
@@ -200,10 +213,12 @@ class ClassTypesTestCase(TestBase):
                       lldbutil.state_type_to_str(process.GetState()))
 
         # The stop reason of the thread should be breakpoint.
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
 
         frame = thread.frames[0]
-        self.assertTrue (frame.IsValid(), "Got a valid frame.")
+        self.assertTrue(frame.IsValid(), "Got a valid frame.")
 
-        self.assertTrue ("C::C" in frame.name, "Constructor name includes class name.")
+        self.assertTrue("C::C" in frame.name,
+                        "Constructor name includes class name.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test the lldb disassemble command on eac
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class IterateFrameAndDisassembleTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -47,7 +48,8 @@ class IterateFrameAndDisassembleTestCase
         # disassemble it.
         target = self.dbg.GetSelectedTarget()
         process = target.GetProcess()
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
         depth = thread.GetNumFrames()
         for i in range(depth - 1):
@@ -62,7 +64,8 @@ class IterateFrameAndDisassembleTestCase
                 insts = function.GetInstructions(target)
                 for inst in insts:
                     # We could simply do 'print inst' to print out the disassembly.
-                    # But we want to print to stdout only if self.TraceOn() is True.
+                    # But we want to print to stdout only if self.TraceOn() is
+                    # True.
                     disasm = str(inst)
                     if self.TraceOn():
                         print(disasm)
@@ -79,14 +82,15 @@ class IterateFrameAndDisassembleTestCase
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break on the ctor function of class C.
-        bpno = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1)
+        bpno = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint %d.'%(bpno)])
+                    substrs=['stopped',
+                             'stop reason = breakpoint %d.' % (bpno)])
 
         # This test was failing because we fail to put the C:: in front of constructore.
         # We should maybe make another testcase to cover that specifically, but we shouldn't

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py Tue Sep  6 15:57:50 2016
@@ -1,4 +1,4 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals(), [] )
+lldbinline.MakeInlineTest(__file__, globals(), [])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py Tue Sep  6 15:57:50 2016
@@ -5,22 +5,25 @@ import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class CPPTestDiamondInheritance(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def test_with_run_command(self):
         """Test that virtual base classes work in when SBValue objects are used to explore the variable value"""
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
-        
+
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
         self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
         self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
         frame = thread.GetFrameAtIndex(0)
         j1 = frame.FindVariable("j1")
@@ -30,13 +33,19 @@ class CPPTestDiamondInheritance(TestBase
         j1_Derived2_VBase = j1_Derived2.GetChildAtIndex(0)
         j1_Derived1_VBase_m_value = j1_Derived1_VBase.GetChildAtIndex(0)
         j1_Derived2_VBase_m_value = j1_Derived2_VBase.GetChildAtIndex(0)
-        self.assertTrue(j1_Derived1_VBase.GetLoadAddress() == j1_Derived2_VBase.GetLoadAddress(), "ensure virtual base class is the same between Derived1 and Derived2")
-        self.assertTrue(j1_Derived1_VBase_m_value.GetValueAsUnsigned(1) == j1_Derived2_VBase_m_value.GetValueAsUnsigned(2), "ensure m_value in VBase is the same")
-        self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(0).GetValueAsUnsigned(0) == 12345, "ensure Derived2 from j1 is correct");
+        self.assertTrue(
+            j1_Derived1_VBase.GetLoadAddress() == j1_Derived2_VBase.GetLoadAddress(),
+            "ensure virtual base class is the same between Derived1 and Derived2")
+        self.assertTrue(j1_Derived1_VBase_m_value.GetValueAsUnsigned(
+            1) == j1_Derived2_VBase_m_value.GetValueAsUnsigned(2), "ensure m_value in VBase is the same")
+        self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(
+            0).GetValueAsUnsigned(0) == 12345, "ensure Derived2 from j1 is correct")
         thread.StepOver()
-        self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(0).GetValueAsUnsigned(0) == 12346, "ensure Derived2 from j2 is correct");
-    
+        self.assertTrue(frame.FindVariable("d").GetChildAtIndex(0).GetChildAtIndex(
+            0).GetValueAsUnsigned(0) == 12346, "ensure Derived2 from j2 is correct")
+
     def set_breakpoint(self, line):
         # Some compilers (for example GCC 4.4.7 and 4.6.1) emit multiple locations for the statement with the ternary
         # operator in the test program, while others emit only 1.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py Tue Sep  6 15:57:50 2016
@@ -5,20 +5,22 @@ Test lldb Python API SBValue::Cast(SBTyp
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CppValueCastTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @unittest2.expectedFailure("rdar://problem/10808472 SBValue::Cast test case is failing (virtual inheritance)")
+    @unittest2.expectedFailure(
+        "rdar://problem/10808472 SBValue::Cast test case is failing (virtual inheritance)")
     @add_test_categories(['pyapi'])
     def test_value_cast_with_virtual_inheritance(self):
         """Test SBValue::Cast(SBType) API for C++ types with virtual inheritance."""
@@ -34,23 +36,26 @@ class CppValueCastTestCase(TestBase):
         self.do_sbvalue_cast(self.exe_name)
 
     def setUp(self):
-        # Call super's setUp().                                                                                                           
+        # Call super's setUp().
         TestBase.setUp(self)
 
-        # Find the line number to break for main.c.                                                                                       
-        self.source = 'sbvalue-cast.cpp';
+        # Find the line number to break for main.c.
+        self.source = 'sbvalue-cast.cpp'
         self.line = line_number(self.source, '// Set breakpoint here.')
         self.exe_name = self.testMethodName
-        self.d_virtual = {'CXX_SOURCES': self.source, 'EXE': self.exe_name, 'CFLAGS_EXTRAS': '-DDO_VIRTUAL_INHERITANCE'}
+        self.d_virtual = {
+            'CXX_SOURCES': self.source,
+            'EXE': self.exe_name,
+            'CFLAGS_EXTRAS': '-DDO_VIRTUAL_INHERITANCE'}
         self.d_regular = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
 
-    def do_sbvalue_cast (self, exe_name):
+    def do_sbvalue_cast(self, exe_name):
         """Test SBValue::Cast(SBType) API for C++ types."""
         exe = os.path.join(os.getcwd(), exe_name)
 
         # Create a target from the debugger.
 
-        target = self.dbg.CreateTarget (exe)
+        target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
         # Set up our breakpoints:
@@ -59,7 +64,8 @@ class CppValueCastTestCase(TestBase):
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process.GetState() == lldb.eStateStopped,
                         PROCESS_STOPPED)
@@ -74,14 +80,16 @@ class CppValueCastTestCase(TestBase):
         error = lldb.SBError()
 
         # First stop is for DerivedA instance.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
         frame0 = thread.GetFrameAtIndex(0)
 
         tellerA = frame0.FindVariable('teller', lldb.eNoDynamicValues)
         self.DebugSBValue(tellerA)
-        self.assertTrue(tellerA.GetChildMemberWithName('m_base_val').GetValueAsUnsigned(error, 0) == 20)
+        self.assertTrue(tellerA.GetChildMemberWithName(
+            'm_base_val').GetValueAsUnsigned(error, 0) == 20)
 
         if self.TraceOn():
             for child in tellerA:
@@ -102,14 +110,15 @@ class CppValueCastTestCase(TestBase):
         self.assertTrue(a_member_val.GetValueAsUnsigned(error, 0) == 10)
 
         # Second stop is for DerivedB instance.
-        threads = lldbutil.continue_to_breakpoint (process, breakpoint)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.continue_to_breakpoint(process, breakpoint)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
         frame0 = thread.GetFrameAtIndex(0)
 
         tellerB = frame0.FindVariable('teller', lldb.eNoDynamicValues)
         self.DebugSBValue(tellerB)
-        self.assertTrue(tellerB.GetChildMemberWithName('m_base_val').GetValueAsUnsigned(error, 0) == 12)
+        self.assertTrue(tellerB.GetChildMemberWithName(
+            'm_base_val').GetValueAsUnsigned(error, 0) == 12)
 
         if self.TraceOn():
             for child in tellerB:

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py Tue Sep  6 15:57:50 2016
@@ -5,29 +5,32 @@ Use lldb Python API to test dynamic valu
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class DynamicValueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     def setUp(self):
-        # Call super's setUp().                                                                                                           
+        # Call super's setUp().
         TestBase.setUp(self)
 
-        # Find the line number to break for main.c.                                                                                       
+        # Find the line number to break for main.c.
 
-        self.do_something_line = line_number('pass-to-base.cpp', '// Break here in doSomething.')
-        self.main_first_call_line = line_number('pass-to-base.cpp',
-                                                 '// Break here and get real addresses of myB and otherB.')
-        self.main_second_call_line = line_number('pass-to-base.cpp',
-                                                       '// Break here and get real address of reallyA.')
+        self.do_something_line = line_number(
+            'pass-to-base.cpp', '// Break here in doSomething.')
+        self.main_first_call_line = line_number(
+            'pass-to-base.cpp',
+            '// Break here and get real addresses of myB and otherB.')
+        self.main_second_call_line = line_number(
+            'pass-to-base.cpp', '// Break here and get real address of reallyA.')
 
     @add_test_categories(['pyapi'])
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24663")
@@ -38,31 +41,36 @@ class DynamicValueTestCase(TestBase):
 
         # Create a target from the debugger.
 
-        target = self.dbg.CreateTarget (exe)
+        target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
         # Set up our breakpoints:
 
-        do_something_bpt = target.BreakpointCreateByLocation('pass-to-base.cpp', self.do_something_line)
+        do_something_bpt = target.BreakpointCreateByLocation(
+            'pass-to-base.cpp', self.do_something_line)
         self.assertTrue(do_something_bpt,
                         VALID_BREAKPOINT)
 
-        first_call_bpt = target.BreakpointCreateByLocation('pass-to-base.cpp', self.main_first_call_line)
+        first_call_bpt = target.BreakpointCreateByLocation(
+            'pass-to-base.cpp', self.main_first_call_line)
         self.assertTrue(first_call_bpt,
                         VALID_BREAKPOINT)
 
-        second_call_bpt = target.BreakpointCreateByLocation('pass-to-base.cpp', self.main_second_call_line)
+        second_call_bpt = target.BreakpointCreateByLocation(
+            'pass-to-base.cpp', self.main_second_call_line)
         self.assertTrue(second_call_bpt,
                         VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process.GetState() == lldb.eStateStopped,
                         PROCESS_STOPPED)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, first_call_bpt)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, first_call_bpt)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         frame = thread.GetFrameAtIndex(0)
@@ -71,153 +79,175 @@ class DynamicValueTestCase(TestBase):
         # with the dynamic values we get in doSomething:
 
         use_dynamic = lldb.eDynamicCanRunTarget
-        no_dynamic  = lldb.eNoDynamicValues
+        no_dynamic = lldb.eNoDynamicValues
 
-        myB = frame.FindVariable ('myB', no_dynamic);
-        self.assertTrue (myB)
-        myB_loc = int (myB.GetLocation(), 16)
+        myB = frame.FindVariable('myB', no_dynamic)
+        self.assertTrue(myB)
+        myB_loc = int(myB.GetLocation(), 16)
 
         otherB = frame.FindVariable('otherB', no_dynamic)
-        self.assertTrue (otherB)
-        otherB_loc = int (otherB.GetLocation(), 16)
+        self.assertTrue(otherB)
+        otherB_loc = int(otherB.GetLocation(), 16)
 
         # Okay now run to doSomething:
 
-        threads = lldbutil.continue_to_breakpoint (process, do_something_bpt)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.continue_to_breakpoint(process, do_something_bpt)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         frame = thread.GetFrameAtIndex(0)
 
         # Get "this" using FindVariable:
 
-        this_static = frame.FindVariable ('this', no_dynamic)
-        this_dynamic = frame.FindVariable ('this', use_dynamic)
-        self.examine_value_object_of_this_ptr (this_static, this_dynamic, myB_loc)
-        
+        this_static = frame.FindVariable('this', no_dynamic)
+        this_dynamic = frame.FindVariable('this', use_dynamic)
+        self.examine_value_object_of_this_ptr(
+            this_static, this_dynamic, myB_loc)
+
         # Now make sure that the "GetDynamicValue" works:
-        # This doesn't work currently because we can't get dynamic values from ConstResult objects.
+        # This doesn't work currently because we can't get dynamic values from
+        # ConstResult objects.
         fetched_dynamic_value = this_static.GetDynamicValue(use_dynamic)
-        self.examine_value_object_of_this_ptr (this_static, fetched_dynamic_value, myB_loc)
+        self.examine_value_object_of_this_ptr(
+            this_static, fetched_dynamic_value, myB_loc)
 
         # And conversely that the GetDynamicValue() interface also works:
         fetched_static_value = this_dynamic.GetStaticValue()
-        self.examine_value_object_of_this_ptr (fetched_static_value, this_dynamic, myB_loc)
+        self.examine_value_object_of_this_ptr(
+            fetched_static_value, this_dynamic, myB_loc)
 
         # Get "this" using FindValue, make sure that works too:
-        this_static = frame.FindValue ('this', lldb.eValueTypeVariableArgument, no_dynamic)
-        this_dynamic = frame.FindValue ('this', lldb.eValueTypeVariableArgument, use_dynamic)
-        self.examine_value_object_of_this_ptr (this_static, this_dynamic, myB_loc)
+        this_static = frame.FindValue(
+            'this', lldb.eValueTypeVariableArgument, no_dynamic)
+        this_dynamic = frame.FindValue(
+            'this', lldb.eValueTypeVariableArgument, use_dynamic)
+        self.examine_value_object_of_this_ptr(
+            this_static, this_dynamic, myB_loc)
 
         # Get "this" using the EvaluateExpression:
-        this_static = frame.EvaluateExpression ('this', False)
-        this_dynamic = frame.EvaluateExpression ('this', True)
-        self.examine_value_object_of_this_ptr (this_static, this_dynamic, myB_loc)
-        
+        this_static = frame.EvaluateExpression('this', False)
+        this_dynamic = frame.EvaluateExpression('this', True)
+        self.examine_value_object_of_this_ptr(
+            this_static, this_dynamic, myB_loc)
+
         # The "frame var" code uses another path to get into children, so let's
         # make sure that works as well:
 
-        self.expect('frame var -d run-target --ptr-depth=2 --show-types anotherA.m_client_A', 'frame var finds its way into a child member',
-            patterns = ['\(B \*\)'])
+        self.expect(
+            'frame var -d run-target --ptr-depth=2 --show-types anotherA.m_client_A',
+            'frame var finds its way into a child member',
+            patterns=['\(B \*\)'])
 
         # Now make sure we also get it right for a reference as well:
 
-        anotherA_static = frame.FindVariable ('anotherA', False)
-        self.assertTrue (anotherA_static)
-        anotherA_static_addr = int (anotherA_static.GetValue(), 16)
-
-        anotherA_dynamic = frame.FindVariable ('anotherA', True)
-        self.assertTrue (anotherA_dynamic)
-        anotherA_dynamic_addr = int (anotherA_dynamic.GetValue(), 16)
+        anotherA_static = frame.FindVariable('anotherA', False)
+        self.assertTrue(anotherA_static)
+        anotherA_static_addr = int(anotherA_static.GetValue(), 16)
+
+        anotherA_dynamic = frame.FindVariable('anotherA', True)
+        self.assertTrue(anotherA_dynamic)
+        anotherA_dynamic_addr = int(anotherA_dynamic.GetValue(), 16)
         anotherA_dynamic_typename = anotherA_dynamic.GetTypeName()
-        self.assertTrue (anotherA_dynamic_typename.find('B') != -1)
+        self.assertTrue(anotherA_dynamic_typename.find('B') != -1)
 
         self.assertTrue(anotherA_dynamic_addr < anotherA_static_addr)
 
-        anotherA_m_b_value_dynamic = anotherA_dynamic.GetChildMemberWithName('m_b_value', True)
-        self.assertTrue (anotherA_m_b_value_dynamic)
-        anotherA_m_b_val = int (anotherA_m_b_value_dynamic.GetValue(), 10)
-        self.assertTrue (anotherA_m_b_val == 300)
-
-        anotherA_m_b_value_static = anotherA_static.GetChildMemberWithName('m_b_value', True)
-        self.assertFalse (anotherA_m_b_value_static)
+        anotherA_m_b_value_dynamic = anotherA_dynamic.GetChildMemberWithName(
+            'm_b_value', True)
+        self.assertTrue(anotherA_m_b_value_dynamic)
+        anotherA_m_b_val = int(anotherA_m_b_value_dynamic.GetValue(), 10)
+        self.assertTrue(anotherA_m_b_val == 300)
+
+        anotherA_m_b_value_static = anotherA_static.GetChildMemberWithName(
+            'm_b_value', True)
+        self.assertFalse(anotherA_m_b_value_static)
 
-        # Okay, now continue again, and when we hit the second breakpoint in main
+        # Okay, now continue again, and when we hit the second breakpoint in
+        # main
 
-        threads = lldbutil.continue_to_breakpoint (process, second_call_bpt)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.continue_to_breakpoint(process, second_call_bpt)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         frame = thread.GetFrameAtIndex(0)
-        reallyA_value = frame.FindVariable ('reallyA', False)
+        reallyA_value = frame.FindVariable('reallyA', False)
         self.assertTrue(reallyA_value)
-        reallyA_loc = int (reallyA_value.GetLocation(), 16)
-        
+        reallyA_loc = int(reallyA_value.GetLocation(), 16)
+
         # Finally continue to doSomething again, and make sure we get the right value for anotherA,
         # which this time around is just an "A".
 
-        threads = lldbutil.continue_to_breakpoint (process, do_something_bpt)
+        threads = lldbutil.continue_to_breakpoint(process, do_something_bpt)
         self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         frame = thread.GetFrameAtIndex(0)
-        anotherA_value = frame.FindVariable ('anotherA', True)
+        anotherA_value = frame.FindVariable('anotherA', True)
         self.assertTrue(anotherA_value)
-        anotherA_loc = int (anotherA_value.GetValue(), 16)
-        self.assertTrue (anotherA_loc == reallyA_loc)
-        self.assertTrue (anotherA_value.GetTypeName().find ('B') == -1)
+        anotherA_loc = int(anotherA_value.GetValue(), 16)
+        self.assertTrue(anotherA_loc == reallyA_loc)
+        self.assertTrue(anotherA_value.GetTypeName().find('B') == -1)
 
-    def examine_value_object_of_this_ptr (self, this_static, this_dynamic, dynamic_location):
+    def examine_value_object_of_this_ptr(
+            self, this_static, this_dynamic, dynamic_location):
         # Get "this" as its static value
-        self.assertTrue (this_static)
-        this_static_loc = int (this_static.GetValue(), 16)
-        
+        self.assertTrue(this_static)
+        this_static_loc = int(this_static.GetValue(), 16)
+
         # Get "this" as its dynamic value
-        
-        self.assertTrue (this_dynamic)
+
+        self.assertTrue(this_dynamic)
         this_dynamic_typename = this_dynamic.GetTypeName()
-        self.assertTrue (this_dynamic_typename.find('B') != -1)
-        this_dynamic_loc = int (this_dynamic.GetValue(), 16)
-        
+        self.assertTrue(this_dynamic_typename.find('B') != -1)
+        this_dynamic_loc = int(this_dynamic.GetValue(), 16)
+
         # Make sure we got the right address for "this"
-        
-        self.assertTrue (this_dynamic_loc == dynamic_location)
+
+        self.assertTrue(this_dynamic_loc == dynamic_location)
 
         # And that the static address is greater than the dynamic one
 
-        self.assertTrue (this_static_loc > this_dynamic_loc)
-        
+        self.assertTrue(this_static_loc > this_dynamic_loc)
+
         # Now read m_b_value which is only in the dynamic value:
 
         use_dynamic = lldb.eDynamicCanRunTarget
-        no_dynamic  = lldb.eNoDynamicValues
+        no_dynamic = lldb.eNoDynamicValues
 
-        this_dynamic_m_b_value = this_dynamic.GetChildMemberWithName('m_b_value', use_dynamic)
-        self.assertTrue (this_dynamic_m_b_value)
-        
-        m_b_value = int (this_dynamic_m_b_value.GetValue(), 0)
-        self.assertTrue (m_b_value == 10)
-        
-        # Make sure it is not in the static version
+        this_dynamic_m_b_value = this_dynamic.GetChildMemberWithName(
+            'm_b_value', use_dynamic)
+        self.assertTrue(this_dynamic_m_b_value)
 
-        this_static_m_b_value = this_static.GetChildMemberWithName('m_b_value', no_dynamic)
-        self.assertFalse (this_static_m_b_value)
+        m_b_value = int(this_dynamic_m_b_value.GetValue(), 0)
+        self.assertTrue(m_b_value == 10)
 
-        # Okay, now let's make sure that we can get the dynamic type of a child element:
+        # Make sure it is not in the static version
 
-        contained_auto_ptr = this_dynamic.GetChildMemberWithName ('m_client_A', use_dynamic)
-        self.assertTrue (contained_auto_ptr)
-        contained_b = contained_auto_ptr.GetChildMemberWithName ('_M_ptr', use_dynamic)
+        this_static_m_b_value = this_static.GetChildMemberWithName(
+            'm_b_value', no_dynamic)
+        self.assertFalse(this_static_m_b_value)
+
+        # Okay, now let's make sure that we can get the dynamic type of a child
+        # element:
+
+        contained_auto_ptr = this_dynamic.GetChildMemberWithName(
+            'm_client_A', use_dynamic)
+        self.assertTrue(contained_auto_ptr)
+        contained_b = contained_auto_ptr.GetChildMemberWithName(
+            '_M_ptr', use_dynamic)
         if not contained_b:
-                contained_b = contained_auto_ptr.GetChildMemberWithName ('__ptr_', use_dynamic)
-        self.assertTrue (contained_b)
-        
-        contained_b_static = contained_auto_ptr.GetChildMemberWithName ('_M_ptr', no_dynamic)
+            contained_b = contained_auto_ptr.GetChildMemberWithName(
+                '__ptr_', use_dynamic)
+        self.assertTrue(contained_b)
+
+        contained_b_static = contained_auto_ptr.GetChildMemberWithName(
+            '_M_ptr', no_dynamic)
         if not contained_b_static:
-                contained_b_static = contained_auto_ptr.GetChildMemberWithName ('__ptr_', no_dynamic)
-        self.assertTrue (contained_b_static)
-        
-        contained_b_addr = int (contained_b.GetValue(), 16)
-        contained_b_static_addr = int (contained_b_static.GetValue(), 16)
-        
-        self.assertTrue (contained_b_addr < contained_b_static_addr)
+            contained_b_static = contained_auto_ptr.GetChildMemberWithName(
+                '__ptr_', no_dynamic)
+        self.assertTrue(contained_b_static)
+
+        contained_b_addr = int(contained_b.GetValue(), 16)
+        contained_b_static_addr = int(contained_b_static.GetValue(), 16)
+
+        self.assertTrue(contained_b_addr < contained_b_static_addr)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py Tue Sep  6 15:57:50 2016
@@ -3,54 +3,71 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class CPP11EnumTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     def test_int8_t(self):
         """Test C++11 enumeration class types as int8_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int8_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int8_t"'})
         self.image_lookup_for_enum_type()
 
     def test_int16_t(self):
         """Test C++11 enumeration class types as int16_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int16_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int16_t"'})
         self.image_lookup_for_enum_type()
 
     def test_int32_t(self):
         """Test C++11 enumeration class types as int32_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int32_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int32_t"'})
         self.image_lookup_for_enum_type()
 
     def test_int64_t(self):
         """Test C++11 enumeration class types as int64_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int64_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int64_t"'})
         self.image_lookup_for_enum_type()
 
     def test_uint8_t(self):
         """Test C++11 enumeration class types as uint8_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint8_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint8_t"'})
         self.image_lookup_for_enum_type()
 
     def test_uint16_t(self):
         """Test C++11 enumeration class types as uint16_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint16_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint16_t"'})
         self.image_lookup_for_enum_type()
 
     def test_uint32_t(self):
         """Test C++11 enumeration class types as uint32_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint32_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint32_t"'})
         self.image_lookup_for_enum_type()
 
     def test_uint64_t(self):
         """Test C++11 enumeration class types as uint64_t types."""
-        self.build(dictionary={'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint64_t"'})
+        self.build(
+            dictionary={
+                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint64_t"'})
         self.image_lookup_for_enum_type()
 
     def setUp(self):
@@ -65,23 +82,35 @@ class CPP11EnumTypesTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the main.
-        bkpt_id = lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        bkpt_id = lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Look up information about the 'DayType' enum type.
         # Check for correct display.
         self.expect("image lookup -t DayType", DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs = ['enum DayType {',
+                    substrs=['enum DayType {',
+                             'Monday',
+                             'Tuesday',
+                             'Wednesday',
+                             'Thursday',
+                             'Friday',
+                             'Saturday',
+                             'Sunday',
+                             'kNumDays',
+                             '}'])
+
+        enum_values = ['-4',
                        'Monday',
                        'Tuesday',
                        'Wednesday',
@@ -90,21 +119,12 @@ class CPP11EnumTypesTestCase(TestBase):
                        'Saturday',
                        'Sunday',
                        'kNumDays',
-                       '}'])
-
-        enum_values = [ '-4', 
-                        'Monday', 
-                        'Tuesday', 
-                        'Wednesday', 
-                        'Thursday',
-                        'Friday',
-                        'Saturday',
-                        'Sunday',
-                        'kNumDays',
-                        '5'];
+                       '5']
 
         bkpt = self.target().FindBreakpointByID(bkpt_id)
         for enum_value in enum_values:
-            self.expect("frame variable day", 'check for valid enumeration value',
-                substrs = [enum_value])
-            lldbutil.continue_to_breakpoint (self.process(), bkpt)
+            self.expect(
+                "frame variable day",
+                'check for valid enumeration value',
+                substrs=[enum_value])
+            lldbutil.continue_to_breakpoint(self.process(), bkpt)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test lldb exception breakpoint command f
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CPPBreakpointTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -20,9 +21,12 @@ class CPPBreakpointTestCase(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         self.source = 'exceptions.cpp'
-        self.catch_line = line_number(self.source, '// This is the line you should stop at for catch')
+        self.catch_line = line_number(
+            self.source, '// This is the line you should stop at for catch')
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24538, clang-cl does not support throw or catch")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24538, clang-cl does not support throw or catch")
     def test(self):
         """Test lldb exception breakpoint command for CPP."""
         self.build()
@@ -30,37 +34,51 @@ class CPPBreakpointTestCase(TestBase):
 
         # Create a target from the debugger.
 
-        target = self.dbg.CreateTarget (exe)
+        target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        exception_bkpt = target.BreakpointCreateForException (lldb.eLanguageTypeC_plus_plus, True, True)
-        self.assertTrue (exception_bkpt, "Made an exception breakpoint")
+        exception_bkpt = target.BreakpointCreateForException(
+            lldb.eLanguageTypeC_plus_plus, True, True)
+        self.assertTrue(exception_bkpt, "Made an exception breakpoint")
 
         # Now run, and make sure we hit our breakpoint:
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
-        self.assertTrue (process, "Got a valid process")
-        
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, "Got a valid process")
+
         stopped_threads = []
-        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint (process, exception_bkpt)
-        self.assertTrue (len(stopped_threads) == 1, "Stopped at our exception breakpoint.")
+        stopped_threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, exception_bkpt)
+        self.assertTrue(
+            len(stopped_threads) == 1,
+            "Stopped at our exception breakpoint.")
         thread = stopped_threads[0]
         # Make sure our throw function is still above us on the stack:
 
         frame_functions = lldbutil.get_function_names(thread)
-        self.assertTrue (frame_functions.count ("throws_exception_on_even(int)") == 1, "Our throw function is still on the stack.")
+        self.assertTrue(
+            frame_functions.count("throws_exception_on_even(int)") == 1,
+            "Our throw function is still on the stack.")
 
         # Okay we hit our exception throw breakpoint, now make sure we get our catch breakpoint.
         # One potential complication is that we might hit a couple of the exception breakpoints in getting out of the throw.
         # so loop till we don't see the throws function on the stack.  We should stop one more time for our exception breakpoint
         # and that should be the catch...
 
-        while frame_functions.count ("throws_exception_on_even(int)") == 1: 
-            stopped_threads = lldbutil.continue_to_breakpoint (process, exception_bkpt)
-            self.assertTrue (len(stopped_threads) == 1)
-        
+        while frame_functions.count("throws_exception_on_even(int)") == 1:
+            stopped_threads = lldbutil.continue_to_breakpoint(
+                process, exception_bkpt)
+            self.assertTrue(len(stopped_threads) == 1)
+
             thread = stopped_threads[0]
             frame_functions = lldbutil.get_function_names(thread)
 
-        self.assertTrue (frame_functions.count ("throws_exception_on_even(int)") == 0, "At catch our throw function is off the stack")
-        self.assertTrue (frame_functions.count ("intervening_function(int)") == 0,     "At catch our intervening function is off the stack")
-        self.assertTrue (frame_functions.count ("catches_exception(int)") == 1, "At catch our catch function is on the stack")
+        self.assertTrue(
+            frame_functions.count("throws_exception_on_even(int)") == 0,
+            "At catch our throw function is off the stack")
+        self.assertTrue(
+            frame_functions.count("intervening_function(int)") == 0,
+            "At catch our intervening function is off the stack")
+        self.assertTrue(
+            frame_functions.count("catches_exception(int)") == 1,
+            "At catch our catch function is on the stack")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py Tue Sep  6 15:57:50 2016
@@ -5,17 +5,19 @@ import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class FrameVariableAnonymousUnionsTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def test_with_run_command(self):
         """Tests that frame variable looks into anonymous unions"""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
         line = line_number('main.cpp', '// break here')
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=-1, loc_exact=False)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py Tue Sep  6 15:57:50 2016
@@ -6,10 +6,11 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestCppGlobalOperators(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def prepare_executable_and_get_frame(self):
         self.build()
 
@@ -17,29 +18,36 @@ class TestCppGlobalOperators(TestBase):
         src_file = "main.cpp"
         src_file_spec = lldb.SBFileSpec(src_file)
         self.assertTrue(src_file_spec.IsValid(), "Main source file")
-        
+
         # Get the path of the executable
         cwd = os.getcwd()
         exe_file = "a.out"
-        exe_path  = os.path.join(cwd, exe_file)
-        
+        exe_path = os.path.join(cwd, exe_file)
+
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(target.IsValid(), VALID_TARGET)
 
         # Break on main function
-        main_breakpoint = target.BreakpointCreateBySourceRegex("// break here", src_file_spec)
-        self.assertTrue(main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        main_breakpoint = target.BreakpointCreateBySourceRegex(
+            "// break here", src_file_spec)
+        self.assertTrue(
+            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
         args = None
         env = None
-        process = target.LaunchSimple(args, env, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            args, env, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         return thread.GetSelectedFrame()
 
@@ -48,18 +56,25 @@ class TestCppGlobalOperators(TestBase):
         frame = self.prepare_executable_and_get_frame()
 
         test_result = frame.EvaluateExpression("operator==(s1, s2)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "operator==(s1, s2) = false")
- 
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "operator==(s1, s2) = false")
+
         test_result = frame.EvaluateExpression("operator==(s1, s3)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "true", "operator==(s1, s3) = true")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "true",
+            "operator==(s1, s3) = true")
 
         test_result = frame.EvaluateExpression("operator==(s2, s3)")
-        self.assertTrue(test_result.IsValid() and test_result.GetValue() == "false", "operator==(s2, s3) = false")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValue() == "false",
+            "operator==(s2, s3) = false")
 
     def do_new_test(self, frame, expr, expected_value_name):
         """Evaluate a new expression, and check its result"""
 
-        expected_value = frame.FindValue(expected_value_name, lldb.eValueTypeVariableGlobal)
+        expected_value = frame.FindValue(
+            expected_value_name, lldb.eValueTypeVariableGlobal)
         self.assertTrue(expected_value.IsValid())
 
         expected_value_addr = expected_value.AddressOf()
@@ -67,7 +82,9 @@ class TestCppGlobalOperators(TestBase):
 
         got = frame.EvaluateExpression(expr)
         self.assertTrue(got.IsValid())
-        self.assertEqual(got.GetValueAsUnsigned(), expected_value_addr.GetValueAsUnsigned())
+        self.assertEqual(
+            got.GetValueAsUnsigned(),
+            expected_value_addr.GetValueAsUnsigned())
         got_type = got.GetType()
         self.assertTrue(got_type.IsPointerType())
         self.assertEqual(got_type.GetPointeeType().GetName(), "Struct")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py Tue Sep  6 15:57:50 2016
@@ -1,8 +1,10 @@
-import lldb, os
+import lldb
+import os
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestWithGmodulesDebugInfo(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -18,33 +20,53 @@ class TestWithGmodulesDebugInfo(TestBase
         self.assertTrue(src_file_spec.IsValid(), "breakpoint file")
 
         # Get the path of the executable
-        exe_path  = os.path.join(cwd, 'a.out')
+        exe_path = os.path.join(cwd, 'a.out')
 
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(target.IsValid(), VALID_TARGET)
 
         # Break on interesting line
-        breakpoint = target.BreakpointCreateBySourceRegex("break here", src_file_spec)
-        self.assertTrue(breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            "break here", src_file_spec)
+        self.assertTrue(
+            breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
         self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            thread.IsValid(),
+            "There should be a thread stopped due to breakpoint condition")
 
         # Get frame for current thread
         frame = thread.frames[0]
 
         testValue = frame.EvaluateExpression("test")
-        self.assertTrue(testValue.GetError().Success(), "Test expression value invalid: %s" % (testValue.GetError().GetCString()))
-        self.assertTrue(testValue.GetTypeName() == "IntContainer", "Test expression type incorrect")
+        self.assertTrue(
+            testValue.GetError().Success(),
+            "Test expression value invalid: %s" %
+            (testValue.GetError().GetCString()))
+        self.assertTrue(
+            testValue.GetTypeName() == "IntContainer",
+            "Test expression type incorrect")
 
         memberValue = testValue.GetChildMemberWithName("storage")
-        self.assertTrue(memberValue.GetError().Success(), "Member value missing or invalid: %s" % (testValue.GetError().GetCString()))
-        self.assertTrue(memberValue.GetTypeName() == "int", "Member type incorrect")
-        self.assertEqual(42, memberValue.GetValueAsSigned(), "Member value incorrect")
+        self.assertTrue(
+            memberValue.GetError().Success(),
+            "Member value missing or invalid: %s" %
+            (testValue.GetError().GetCString()))
+        self.assertTrue(
+            memberValue.GetTypeName() == "int",
+            "Member type incorrect")
+        self.assertEqual(
+            42,
+            memberValue.GetValueAsSigned(),
+            "Member value incorrect")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py Tue Sep  6 15:57:50 2016
@@ -3,6 +3,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestCppIncompleteTypes(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -13,25 +14,34 @@ class TestCppIncompleteTypes(TestBase):
         frame = self.get_test_frame('limit')
 
         value_f = frame.EvaluateExpression("f")
-        self.assertTrue(value_f.IsValid(), "'expr f' results in a valid SBValue object")
+        self.assertTrue(
+            value_f.IsValid(),
+            "'expr f' results in a valid SBValue object")
         self.assertTrue(value_f.GetError().Success(), "'expr f' is successful")
 
         value_a = frame.EvaluateExpression("a")
-        self.assertTrue(value_a.IsValid(), "'expr a' results in a valid SBValue object")
+        self.assertTrue(
+            value_a.IsValid(),
+            "'expr a' results in a valid SBValue object")
         self.assertTrue(value_a.GetError().Success(), "'expr a' is successful")
 
     @skipIf(compiler="gcc")
-    @skipIfWindows # Clang on Windows asserts in external record layout in this case.
+    # Clang on Windows asserts in external record layout in this case.
+    @skipIfWindows
     def test_partial_limit_debug_info(self):
         self.build()
         frame = self.get_test_frame('nolimit')
 
         value_f = frame.EvaluateExpression("f")
-        self.assertTrue(value_f.IsValid(), "'expr f' results in a valid SBValue object")
+        self.assertTrue(
+            value_f.IsValid(),
+            "'expr f' results in a valid SBValue object")
         self.assertTrue(value_f.GetError().Success(), "'expr f' is successful")
 
         value_a = frame.EvaluateExpression("a")
-        self.assertTrue(value_a.IsValid(), "'expr a' results in a valid SBValue object")
+        self.assertTrue(
+            value_a.IsValid(),
+            "'expr a' results in a valid SBValue object")
         self.assertTrue(value_a.GetError().Success(), "'expr a' is successful")
 
     def get_test_frame(self, exe):
@@ -42,25 +52,32 @@ class TestCppIncompleteTypes(TestBase):
 
         # Get the path of the executable
         cwd = os.getcwd()
-        exe_path  = os.path.join(cwd, exe)
+        exe_path = os.path.join(cwd, exe)
 
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(target.IsValid(), VALID_TARGET)
 
         # Break on main function
-        main_breakpoint = target.BreakpointCreateBySourceRegex("break here", src_file_spec)
-        self.assertTrue(main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        main_breakpoint = target.BreakpointCreateBySourceRegex(
+            "break here", src_file_spec)
+        self.assertTrue(
+            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
         args = None
         env = None
-        process = target.LaunchSimple(args, env, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            args, env, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         # Get frame for current thread
         return thread.GetSelectedFrame()

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py Tue Sep  6 15:57:50 2016
@@ -2,12 +2,14 @@
 
 from __future__ import print_function
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class InlinesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -16,7 +18,9 @@ class InlinesTestCase(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number to break inside main().
-        self.line = line_number('inlines.cpp', '// Set break point at this line.')
+        self.line = line_number(
+            'inlines.cpp',
+            '// Set break point at this line.')
 
     @expectedFailureAll("llvm.org/pr26710", oslist=["linux"], compiler="gcc")
     def test(self):
@@ -25,28 +29,34 @@ class InlinesTestCase(TestBase):
         self.runToBreakpoint()
 
         # Check that 'frame variable' finds a variable
-        self.expect("frame variable inner_input", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(int) inner_input =')
+        self.expect(
+            "frame variable inner_input",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr='(int) inner_input =')
 
         # Check that 'expr' finds a variable
         self.expect("expr inner_input", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(int) $0 =')
+                    startstr='(int) $0 =')
 
     def runToBreakpoint(self):
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the main.
-        lldbutil.run_break_set_by_file_and_line(self, "inlines.cpp", self.line, num_expected_locations=2,
-                                                loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "inlines.cpp",
+            self.line,
+            num_expected_locations=2,
+            loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs = ['stopped',
-                               'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/lambdas/TestLambdas.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/lambdas/TestLambdas.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/lambdas/TestLambdas.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/lambdas/TestLambdas.py Tue Sep  6 15:57:50 2016
@@ -1,4 +1,7 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals(), [lldbinline.expectedFailureAll(oslist=["windows"])])
+lldbinline.MakeInlineTest(
+    __file__, globals(), [
+        lldbinline.expectedFailureAll(
+            oslist=["windows"])])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py Tue Sep  6 15:57:50 2016
@@ -3,6 +3,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestWithLimitDebugInfo(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -18,32 +19,47 @@ class TestWithLimitDebugInfo(TestBase):
         self.assertTrue(src_file_spec.IsValid(), "breakpoint file")
 
         # Get the path of the executable
-        exe_path  = os.path.join(cwd, 'a.out')
+        exe_path = os.path.join(cwd, 'a.out')
 
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(target.IsValid(), VALID_TARGET)
 
         # Break on main function
-        breakpoint = target.BreakpointCreateBySourceRegex("break here", src_file_spec)
-        self.assertTrue(breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            "break here", src_file_spec)
+        self.assertTrue(
+            breakpoint.IsValid() and breakpoint.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
-        process = target.LaunchSimple(None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         thread.StepInto()
 
         # Get frame for current thread
         frame = thread.GetSelectedFrame()
 
         v1 = frame.EvaluateExpression("1")
-        self.assertTrue(v1.IsValid(), "'expr 1' results in a valid SBValue object")
-        self.assertTrue(v1.GetError().Success(), "'expr 1' succeeds without an error.")
+        self.assertTrue(
+            v1.IsValid(),
+            "'expr 1' results in a valid SBValue object")
+        self.assertTrue(
+            v1.GetError().Success(),
+            "'expr 1' succeeds without an error.")
 
         v2 = frame.EvaluateExpression("this")
-        self.assertTrue(v2.IsValid(), "'expr this' results in a valid SBValue object")
-        self.assertTrue(v2.GetError().Success(), "'expr this' succeeds without an error.")
+        self.assertTrue(
+            v2.IsValid(),
+            "'expr this' results in a valid SBValue object")
+        self.assertTrue(
+            v2.GetError().Success(),
+            "'expr this' succeeds without an error.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py Tue Sep  6 15:57:50 2016
@@ -2,6 +2,7 @@ import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class TestMembersAndLocalsWithSameName(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -10,77 +11,101 @@ class TestMembersAndLocalsWithSameName(T
         self._load_exe()
 
         # Set breakpoints
-        bp1 = self.target.BreakpointCreateBySourceRegex("Break 1", self.src_file_spec)
-        self.assertTrue(bp1.IsValid() and bp1.GetNumLocations() >= 1, VALID_BREAKPOINT)
-        bp2 = self.target.BreakpointCreateBySourceRegex("Break 2", self.src_file_spec)
-        self.assertTrue(bp2.IsValid() and bp2.GetNumLocations() >= 1, VALID_BREAKPOINT)
-        bp3 = self.target.BreakpointCreateBySourceRegex("Break 3", self.src_file_spec)
-        self.assertTrue(bp3.IsValid() and bp3.GetNumLocations() >= 1, VALID_BREAKPOINT)
-        bp4 = self.target.BreakpointCreateBySourceRegex("Break 4", self.src_file_spec)
-        self.assertTrue(bp4.IsValid() and bp4.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        bp1 = self.target.BreakpointCreateBySourceRegex(
+            "Break 1", self.src_file_spec)
+        self.assertTrue(
+            bp1.IsValid() and bp1.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
+        bp2 = self.target.BreakpointCreateBySourceRegex(
+            "Break 2", self.src_file_spec)
+        self.assertTrue(
+            bp2.IsValid() and bp2.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
+        bp3 = self.target.BreakpointCreateBySourceRegex(
+            "Break 3", self.src_file_spec)
+        self.assertTrue(
+            bp3.IsValid() and bp3.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
+        bp4 = self.target.BreakpointCreateBySourceRegex(
+            "Break 4", self.src_file_spec)
+        self.assertTrue(
+            bp4.IsValid() and bp4.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
-        self.process = self.target.LaunchSimple(None, None, self.get_process_working_directory())
+        self.process = self.target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
 
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
 
         self._test_globals()
 
         self.process.Continue()
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("a");
+        val = frame.EvaluateExpression("a")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 12345)
 
-        val = frame.EvaluateExpression("b");
+        val = frame.EvaluateExpression("b")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 54321)
 
-        val = frame.EvaluateExpression("c");
+        val = frame.EvaluateExpression("c")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 34567)
 
         self.process.Continue()
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("a");
+        val = frame.EvaluateExpression("a")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 10001)
 
-        val = frame.EvaluateExpression("b");
+        val = frame.EvaluateExpression("b")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 10002)
 
-        val = frame.EvaluateExpression("c");
+        val = frame.EvaluateExpression("c")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 10003)
 
         self.process.Continue()
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("a");
+        val = frame.EvaluateExpression("a")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 1)
 
-        val = frame.EvaluateExpression("b");
+        val = frame.EvaluateExpression("b")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 2)
 
-        val = frame.EvaluateExpression("c");
+        val = frame.EvaluateExpression("c")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 778899)
 
@@ -88,77 +113,101 @@ class TestMembersAndLocalsWithSameName(T
         self._load_exe()
 
         # Set breakpoints
-        bp1 = self.target.BreakpointCreateBySourceRegex("Break 1", self.src_file_spec)
-        self.assertTrue(bp1.IsValid() and bp1.GetNumLocations() >= 1, VALID_BREAKPOINT)
-        bp5 = self.target.BreakpointCreateBySourceRegex("Break 5", self.src_file_spec)
-        self.assertTrue(bp5.IsValid() and bp5.GetNumLocations() >= 1, VALID_BREAKPOINT)
-        bp6 = self.target.BreakpointCreateBySourceRegex("Break 6", self.src_file_spec)
-        self.assertTrue(bp6.IsValid() and bp6.GetNumLocations() >= 1, VALID_BREAKPOINT)
-        bp7 = self.target.BreakpointCreateBySourceRegex("Break 7", self.src_file_spec)
-        self.assertTrue(bp7.IsValid() and bp7.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        bp1 = self.target.BreakpointCreateBySourceRegex(
+            "Break 1", self.src_file_spec)
+        self.assertTrue(
+            bp1.IsValid() and bp1.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
+        bp5 = self.target.BreakpointCreateBySourceRegex(
+            "Break 5", self.src_file_spec)
+        self.assertTrue(
+            bp5.IsValid() and bp5.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
+        bp6 = self.target.BreakpointCreateBySourceRegex(
+            "Break 6", self.src_file_spec)
+        self.assertTrue(
+            bp6.IsValid() and bp6.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
+        bp7 = self.target.BreakpointCreateBySourceRegex(
+            "Break 7", self.src_file_spec)
+        self.assertTrue(
+            bp7.IsValid() and bp7.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
-        self.process = self.target.LaunchSimple(None, None, self.get_process_working_directory())
+        self.process = self.target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
 
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
 
         self._test_globals()
 
         self.process.Continue()
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("a");
+        val = frame.EvaluateExpression("a")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 12345)
 
-        val = frame.EvaluateExpression("b");
+        val = frame.EvaluateExpression("b")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 54321)
 
-        val = frame.EvaluateExpression("c");
+        val = frame.EvaluateExpression("c")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 34567)
 
         self.process.Continue()
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("a");
+        val = frame.EvaluateExpression("a")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 10001)
 
-        val = frame.EvaluateExpression("b");
+        val = frame.EvaluateExpression("b")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 10002)
 
-        val = frame.EvaluateExpression("c");
+        val = frame.EvaluateExpression("c")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 10003)
 
         self.process.Continue()
-        self.assertTrue(self.process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            self.process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("a");
+        val = frame.EvaluateExpression("a")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 1)
 
-        val = frame.EvaluateExpression("b");
+        val = frame.EvaluateExpression("b")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 2)
 
-        val = frame.EvaluateExpression("c");
+        val = frame.EvaluateExpression("c")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 778899)
 
@@ -172,26 +221,27 @@ class TestMembersAndLocalsWithSameName(T
         self.assertTrue(self.src_file_spec.IsValid(), "breakpoint file")
 
         # Get the path of the executable
-        exe_path  = os.path.join(cwd, 'a.out')
+        exe_path = os.path.join(cwd, 'a.out')
 
         # Load the executable
         self.target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(self.target.IsValid(), VALID_TARGET)
 
     def _test_globals(self):
-        thread = lldbutil.get_stopped_thread(self.process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            self.process, lldb.eStopReasonBreakpoint)
         self.assertTrue(thread.IsValid())
         frame = thread.GetSelectedFrame()
         self.assertTrue(frame.IsValid())
 
-        val = frame.EvaluateExpression("a");
+        val = frame.EvaluateExpression("a")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 112233)
 
-        val = frame.EvaluateExpression("b");
+        val = frame.EvaluateExpression("b")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 445566)
 
-        val = frame.EvaluateExpression("c");
+        val = frame.EvaluateExpression("c")
         self.assertTrue(val.IsValid())
         self.assertEqual(val.GetValueAsUnsigned(), 778899)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test the printing of anonymous and named
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class NamespaceBreakpointTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,7 +22,12 @@ class NamespaceBreakpointTestCase(TestBa
         """Test that we can set breakpoints correctly by basename to find all functions whose basename is "func"."""
         self.build()
 
-        names = [ "func()", "func(int)", "A::B::func()", "A::func()", "A::func(int)"]
+        names = [
+            "func()",
+            "func(int)",
+            "A::B::func()",
+            "A::func()",
+            "A::func(int)"]
 
         # Create a target by the debugger.
         exe = os.path.join(os.getcwd(), "a.out")
@@ -30,11 +36,15 @@ class NamespaceBreakpointTestCase(TestBa
         module_list = lldb.SBFileSpecList()
         module_list.Append(lldb.SBFileSpec(exe, False))
         cu_list = lldb.SBFileSpecList()
-        # Set a breakpoint by name "func" which should pick up all functions whose basename is "func"
-        bp = target.BreakpointCreateByName ("func", lldb.eFunctionNameTypeAuto, module_list, cu_list);
+        # Set a breakpoint by name "func" which should pick up all functions
+        # whose basename is "func"
+        bp = target.BreakpointCreateByName(
+            "func", lldb.eFunctionNameTypeAuto, module_list, cu_list)
         for bp_loc in bp:
             name = bp_loc.GetAddress().GetFunction().GetName()
-            self.assertTrue(name in names, "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeAuto")        
+            self.assertTrue(
+                name in names,
+                "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeAuto")
 
     @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
     def test_breakpoints_func_full(self):
@@ -42,7 +52,7 @@ class NamespaceBreakpointTestCase(TestBa
            (no namespaces)."""
         self.build()
 
-        names = [ "func()", "func(int)"]
+        names = ["func()", "func(int)"]
 
         # Create a target by the debugger.
         exe = os.path.join(os.getcwd(), "a.out")
@@ -52,18 +62,22 @@ class NamespaceBreakpointTestCase(TestBa
         module_list.Append(lldb.SBFileSpec(exe, False))
         cu_list = lldb.SBFileSpecList()
 
-        # Set a breakpoint by name "func" whose fullly qualified named matches "func" which 
-        # should pick up only functions whose basename is "func" and has no containing context
-        bp = target.BreakpointCreateByName ("func", lldb.eFunctionNameTypeFull, module_list, cu_list);
+        # Set a breakpoint by name "func" whose fullly qualified named matches "func" which
+        # should pick up only functions whose basename is "func" and has no
+        # containing context
+        bp = target.BreakpointCreateByName(
+            "func", lldb.eFunctionNameTypeFull, module_list, cu_list)
         for bp_loc in bp:
             name = bp_loc.GetAddress().GetFunction().GetName()
-            self.assertTrue(name in names, "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeFull")        
+            self.assertTrue(
+                name in names,
+                "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeFull")
 
     def test_breakpoints_a_func_full(self):
         """Test that we can set breakpoints correctly by fullname to find all functions whose fully qualified name is "A::func"."""
         self.build()
 
-        names = [ "A::func()", "A::func(int)"]
+        names = ["A::func()", "A::func(int)"]
 
         # Create a target by the debugger.
         exe = os.path.join(os.getcwd(), "a.out")
@@ -73,12 +87,16 @@ class NamespaceBreakpointTestCase(TestBa
         module_list.Append(lldb.SBFileSpec(exe, False))
         cu_list = lldb.SBFileSpecList()
 
-        # Set a breakpoint by name "A::func" whose fullly qualified named matches "A::func" which 
-        # should pick up only functions whose basename is "func" and is contained in the "A" namespace
-        bp = target.BreakpointCreateByName ("A::func", lldb.eFunctionNameTypeFull, module_list, cu_list);
+        # Set a breakpoint by name "A::func" whose fullly qualified named matches "A::func" which
+        # should pick up only functions whose basename is "func" and is
+        # contained in the "A" namespace
+        bp = target.BreakpointCreateByName(
+            "A::func", lldb.eFunctionNameTypeFull, module_list, cu_list)
         for bp_loc in bp:
             name = bp_loc.GetAddress().GetFunction().GetName()
-            self.assertTrue(name in names, "make sure breakpoint locations are correct for 'A::func' with eFunctionNameTypeFull")        
+            self.assertTrue(
+                name in names,
+                "make sure breakpoint locations are correct for 'A::func' with eFunctionNameTypeFull")
 
 
 class NamespaceTestCase(TestBase):
@@ -88,14 +106,15 @@ class NamespaceTestCase(TestBase):
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
-        # Find the line numbers for declarations of namespace variables i and j.
-        self.line_var_i = line_number('main.cpp',
-                '// Find the line number for anonymous namespace variable i.')
-        self.line_var_j = line_number('main.cpp',
-                '// Find the line number for named namespace variable j.')
+        # Find the line numbers for declarations of namespace variables i and
+        # j.
+        self.line_var_i = line_number(
+            'main.cpp', '// Find the line number for anonymous namespace variable i.')
+        self.line_var_j = line_number(
+            'main.cpp', '// Find the line number for named namespace variable j.')
         # And the line number to break at.
         self.line_break = line_number('main.cpp',
-                '// Set break point at this line.')
+                                      '// Set break point at this line.')
         # Break inside do {} while and evaluate value
         self.line_break_ns1 = line_number('main.cpp', '// Evaluate ns1::value')
         self.line_break_ns2 = line_number('main.cpp', '// Evaluate ns2::value')
@@ -104,8 +123,8 @@ class NamespaceTestCase(TestBase):
         self.runCmd(command, RUN_SUCCEEDED)
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
     # rdar://problem/8668674
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
@@ -114,22 +133,39 @@ class NamespaceTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line_break_ns1, num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line_break_ns2, num_expected_locations=1, loc_exact=True)
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line_break, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "main.cpp",
+            self.line_break_ns1,
+            num_expected_locations=1,
+            loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "main.cpp",
+            self.line_break_ns2,
+            num_expected_locations=1,
+            loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "main.cpp",
+            self.line_break,
+            num_expected_locations=1,
+            loc_exact=True)
 
         self.runToBkpt("run")
         # Evaluate ns1::value
-        self.expect("expression -- value", startstr = "(int) $0 = 100")
+        self.expect("expression -- value", startstr="(int) $0 = 100")
 
         self.runToBkpt("continue")
         # Evaluate ns2::value
-        self.expect("expression -- value", startstr = "(int) $1 = 200")
-        
+        self.expect("expression -- value", startstr="(int) $1 = 200")
+
         self.runToBkpt("continue")
-        # On Mac OS X, gcc 4.2 emits the wrong debug info with respect to types.
+        # On Mac OS X, gcc 4.2 emits the wrong debug info with respect to
+        # types.
         slist = ['(int) a = 12', 'anon_uint', 'a_uint', 'b_uint', 'y_uint']
-        if self.platformIsDarwin() and self.getCompiler() in ['clang', 'llvm-gcc']:
+        if self.platformIsDarwin() and self.getCompiler() in [
+                'clang', 'llvm-gcc']:
             slist = ['(int) a = 12',
                      '::my_uint_t', 'anon_uint = 0',
                      '(A::uint_t) a_uint = 1',
@@ -138,16 +174,20 @@ class NamespaceTestCase(TestBase):
 
         # 'frame variable' displays the local variables with type information.
         self.expect('frame variable', VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = slist)
+                    substrs=slist)
 
         # 'frame variable' with basename 'i' should work.
-        self.expect("frame variable --show-declaration --show-globals i",
-            startstr = "main.cpp:%d: (int) (anonymous namespace)::i = 3" % self.line_var_i)
+        self.expect(
+            "frame variable --show-declaration --show-globals i",
+            startstr="main.cpp:%d: (int) (anonymous namespace)::i = 3" %
+            self.line_var_i)
         # main.cpp:12: (int) (anonymous namespace)::i = 3
 
         # 'frame variable' with basename 'j' should work, too.
-        self.expect("frame variable --show-declaration --show-globals j",
-            startstr = "main.cpp:%d: (int) A::B::j = 4" % self.line_var_j)
+        self.expect(
+            "frame variable --show-declaration --show-globals j",
+            startstr="main.cpp:%d: (int) A::B::j = 4" %
+            self.line_var_j)
         # main.cpp:19: (int) A::B::j = 4
 
         # 'frame variable' should support address-of operator.
@@ -155,41 +195,44 @@ class NamespaceTestCase(TestBase):
 
         # 'frame variable' with fully qualified name 'A::B::j' should work.
         self.expect("frame variable A::B::j", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(int) A::B::j = 4',
-            patterns = [' = 4'])
+                    startstr='(int) A::B::j = 4',
+                    patterns=[' = 4'])
 
         # So should the anonymous namespace case.
-        self.expect("frame variable '(anonymous namespace)::i'", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = '(int) (anonymous namespace)::i = 3',
-            patterns = [' = 3'])
+        self.expect(
+            "frame variable '(anonymous namespace)::i'",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr='(int) (anonymous namespace)::i = 3',
+            patterns=[' = 3'])
 
         # rdar://problem/8660275
         # test/namespace: 'expression -- i+j' not working
         # This has been fixed.
         self.expect("expression -- i + j",
-            startstr = "(int) $2 = 7")
+                    startstr="(int) $2 = 7")
         # (int) $2 = 7
 
         self.runCmd("expression -- i")
         self.runCmd("expression -- j")
 
         # rdar://problem/8668674
-        # expression command with fully qualified namespace for a variable does not work
+        # expression command with fully qualified namespace for a variable does
+        # not work
         self.expect("expression -- ::i", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = [' = 3'])
+                    patterns=[' = 3'])
         self.expect("expression -- A::B::j", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = [' = 4'])
+                    patterns=[' = 4'])
 
         # expression command with function in anonymous namespace
         self.expect("expression -- myanonfunc(3)",
-            patterns = [' = 6'])
+                    patterns=[' = 6'])
 
         # global namespace qualification with function in anonymous namespace
         self.expect("expression -- ::myanonfunc(4)",
-            patterns = [' = 8'])
+                    patterns=[' = 8'])
 
         self.expect("p myanonfunc",
-            patterns = ['\(anonymous namespace\)::myanonfunc\(int\)'])
+                    patterns=['\(anonymous namespace\)::myanonfunc\(int\)'])
 
-        self.expect("p variadic_sum",
-            patterns = ['\(anonymous namespace\)::variadic_sum\(int, ...\)'])
+        self.expect("p variadic_sum", patterns=[
+                    '\(anonymous namespace\)::variadic_sum\(int, ...\)'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py Tue Sep  6 15:57:50 2016
@@ -5,12 +5,14 @@ Test the printing of anonymous and named
 from __future__ import print_function
 
 
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class NamespaceLookupTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,88 +21,131 @@ class NamespaceLookupTestCase(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         # Break inside different scopes and evaluate value
-        self.line_break_global_scope = line_number('ns.cpp', '// BP_global_scope')
+        self.line_break_global_scope = line_number(
+            'ns.cpp', '// BP_global_scope')
         self.line_break_file_scope = line_number('ns2.cpp', '// BP_file_scope')
         self.line_break_ns_scope = line_number('ns2.cpp', '// BP_ns_scope')
-        self.line_break_nested_ns_scope = line_number('ns2.cpp', '// BP_nested_ns_scope')
-        self.line_break_nested_ns_scope_after_using = line_number('ns2.cpp', '// BP_nested_ns_scope_after_using')
-        self.line_break_before_using_directive = line_number('ns3.cpp', '// BP_before_using_directive')
-        self.line_break_after_using_directive = line_number('ns3.cpp', '// BP_after_using_directive')
+        self.line_break_nested_ns_scope = line_number(
+            'ns2.cpp', '// BP_nested_ns_scope')
+        self.line_break_nested_ns_scope_after_using = line_number(
+            'ns2.cpp', '// BP_nested_ns_scope_after_using')
+        self.line_break_before_using_directive = line_number(
+            'ns3.cpp', '// BP_before_using_directive')
+        self.line_break_after_using_directive = line_number(
+            'ns3.cpp', '// BP_after_using_directive')
 
     def runToBkpt(self, command):
         self.runCmd(command, RUN_SUCCEEDED)
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
-    @expectedFailureAll(oslist=["windows", "linux", "freebsd"], bugnumber="llvm.org/pr25819")
+    @expectedFailureAll(
+        oslist=[
+            "windows",
+            "linux",
+            "freebsd"],
+        bugnumber="llvm.org/pr25819")
     def test_scope_lookup_with_run_command(self):
         """Test scope lookup of functions in lldb."""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns.cpp", self.line_break_global_scope, num_expected_locations=1, loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line (self, "ns2.cpp", self.line_break_ns_scope, num_expected_locations=1, loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line (self, "ns2.cpp", self.line_break_nested_ns_scope, num_expected_locations=1, loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line (self, "ns2.cpp", self.line_break_nested_ns_scope_after_using, num_expected_locations=1, loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line (self, "ns3.cpp", self.line_break_before_using_directive, num_expected_locations=1, loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line (self, "ns3.cpp", self.line_break_after_using_directive, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns.cpp",
+            self.line_break_global_scope,
+            num_expected_locations=1,
+            loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns2.cpp",
+            self.line_break_ns_scope,
+            num_expected_locations=1,
+            loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns2.cpp",
+            self.line_break_nested_ns_scope,
+            num_expected_locations=1,
+            loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns2.cpp",
+            self.line_break_nested_ns_scope_after_using,
+            num_expected_locations=1,
+            loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns3.cpp",
+            self.line_break_before_using_directive,
+            num_expected_locations=1,
+            loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns3.cpp",
+            self.line_break_after_using_directive,
+            num_expected_locations=1,
+            loc_exact=False)
 
         # Run to BP_global_scope at global scope
         self.runToBkpt("run")
         # Evaluate func() - should call ::func()
-        self.expect("expr -- func()", startstr = "(int) $0 = 1")
+        self.expect("expr -- func()", startstr="(int) $0 = 1")
         # Evaluate A::B::func() - should call A::B::func()
-        self.expect("expr -- A::B::func()", startstr = "(int) $1 = 4")
+        self.expect("expr -- A::B::func()", startstr="(int) $1 = 4")
         # Evaluate func(10) - should call ::func(int)
-        self.expect("expr -- func(10)", startstr = "(int) $2 = 11")
+        self.expect("expr -- func(10)", startstr="(int) $2 = 11")
         # Evaluate ::func() - should call A::func()
-        self.expect("expr -- ::func()", startstr = "(int) $3 = 1")
+        self.expect("expr -- ::func()", startstr="(int) $3 = 1")
         # Evaluate A::foo() - should call A::foo()
-        self.expect("expr -- A::foo()", startstr = "(int) $4 = 42")
+        self.expect("expr -- A::foo()", startstr="(int) $4 = 42")
 
         # Continue to BP_ns_scope at ns scope
         self.runToBkpt("continue")
         # Evaluate func(10) - should call A::func(int)
-        self.expect("expr -- func(10)", startstr = "(int) $5 = 13")
+        self.expect("expr -- func(10)", startstr="(int) $5 = 13")
         # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr = "(int) $6 = 4")
+        self.expect("expr -- B::func()", startstr="(int) $6 = 4")
         # Evaluate func() - should call A::func()
-        self.expect("expr -- func()", startstr = "(int) $7 = 3")
+        self.expect("expr -- func()", startstr="(int) $7 = 3")
 
         # Continue to BP_nested_ns_scope at nested ns scope
         self.runToBkpt("continue")
         # Evaluate func() - should call A::B::func()
-        self.expect("expr -- func()", startstr = "(int) $8 = 4")
+        self.expect("expr -- func()", startstr="(int) $8 = 4")
         # Evaluate A::func() - should call A::func()
-        self.expect("expr -- A::func()", startstr = "(int) $9 = 3")
+        self.expect("expr -- A::func()", startstr="(int) $9 = 3")
 
         # Evaluate func(10) - should call A::func(10)
         # NOTE: Under the rules of C++, this test would normally get an error
         # because A::B::func() hides A::func(), but lldb intentionally
         # disobeys these rules so that the intended overload can be found
         # by only removing duplicates if they have the same type.
-        self.expect("expr -- func(10)", startstr = "(int) $10 = 13")
+        self.expect("expr -- func(10)", startstr="(int) $10 = 13")
 
-        # Continue to BP_nested_ns_scope_after_using at nested ns scope after using declaration
+        # Continue to BP_nested_ns_scope_after_using at nested ns scope after
+        # using declaration
         self.runToBkpt("continue")
         # Evaluate A::func(10) - should call A::func(int)
-        self.expect("expr -- A::func(10)", startstr = "(int) $11 = 13")
+        self.expect("expr -- A::func(10)", startstr="(int) $11 = 13")
 
-        # Continue to BP_before_using_directive at global scope before using declaration
+        # Continue to BP_before_using_directive at global scope before using
+        # declaration
         self.runToBkpt("continue")
         # Evaluate ::func() - should call ::func()
-        self.expect("expr -- ::func()", startstr = "(int) $12 = 1")
+        self.expect("expr -- ::func()", startstr="(int) $12 = 1")
         # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr = "(int) $13 = 4")
+        self.expect("expr -- B::func()", startstr="(int) $13 = 4")
 
-        # Continue to BP_after_using_directive at global scope after using declaration
+        # Continue to BP_after_using_directive at global scope after using
+        # declaration
         self.runToBkpt("continue")
         # Evaluate ::func() - should call ::func()
-        self.expect("expr -- ::func()", startstr = "(int) $14 = 1")
+        self.expect("expr -- ::func()", startstr="(int) $14 = 1")
         # Evaluate B::func() - should call B::func()
-        self.expect("expr -- B::func()", startstr = "(int) $15 = 4")
+        self.expect("expr -- B::func()", startstr="(int) $15 = 4")
 
     @unittest2.expectedFailure("lldb scope lookup of functions bugs")
     def test_function_scope_lookup_with_run_command(self):
@@ -108,26 +153,36 @@ class NamespaceLookupTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns.cpp", self.line_break_global_scope, num_expected_locations=1, loc_exact=False)
-        lldbutil.run_break_set_by_file_and_line (self, "ns2.cpp", self.line_break_ns_scope, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns.cpp",
+            self.line_break_global_scope,
+            num_expected_locations=1,
+            loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns2.cpp",
+            self.line_break_ns_scope,
+            num_expected_locations=1,
+            loc_exact=False)
 
         # Run to BP_global_scope at global scope
         self.runToBkpt("run")
         # Evaluate foo() - should call ::foo()
         # FIXME: lldb finds Y::foo because lookup for variables is done
         # before functions.
-        self.expect("expr -- foo()", startstr = "(int) $0 = 42")
+        self.expect("expr -- foo()", startstr="(int) $0 = 42")
         # Evaluate ::foo() - should call ::foo()
         # FIXME: lldb finds Y::foo because lookup for variables is done
         # before functions and :: is ignored.
-        self.expect("expr -- ::foo()", startstr = "(int) $1 = 42")
+        self.expect("expr -- ::foo()", startstr="(int) $1 = 42")
 
         # Continue to BP_ns_scope at ns scope
         self.runToBkpt("continue")
         # Evaluate foo() - should call A::foo()
         # FIXME: lldb finds Y::foo because lookup for variables is done
         # before functions.
-        self.expect("expr -- foo()", startstr = "(int) $2 = 42")
+        self.expect("expr -- foo()", startstr="(int) $2 = 42")
 
     @unittest2.expectedFailure("lldb file scope lookup bugs")
     def test_file_scope_lookup_with_run_command(self):
@@ -135,14 +190,19 @@ class NamespaceLookupTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns2.cpp", self.line_break_file_scope, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns2.cpp",
+            self.line_break_file_scope,
+            num_expected_locations=1,
+            loc_exact=False)
 
         # Run to BP_file_scope at file scope
         self.runToBkpt("run")
         # Evaluate func() - should call static ns2.cpp:func()
         # FIXME: This test fails because lldb doesn't know about file scopes so
         # finds the global ::func().
-        self.expect("expr -- func()", startstr = "(int) $0 = 2")
+        self.expect("expr -- func()", startstr="(int) $0 = 2")
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr25819")
     def test_scope_lookup_before_using_with_run_command(self):
@@ -150,30 +210,51 @@ class NamespaceLookupTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns3.cpp", self.line_break_before_using_directive, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns3.cpp",
+            self.line_break_before_using_directive,
+            num_expected_locations=1,
+            loc_exact=False)
 
-        # Run to BP_before_using_directive at global scope before using declaration
+        # Run to BP_before_using_directive at global scope before using
+        # declaration
         self.runToBkpt("run")
         # Evaluate func() - should call ::func()
-        self.expect("expr -- func()", startstr = "(int) $0 = 1")
+        self.expect("expr -- func()", startstr="(int) $0 = 1")
 
     # NOTE: this test may fail on older systems that don't emit import
     # entries in DWARF - may need to add checks for compiler versions here.
-    @skipIf(compiler="gcc", oslist=["linux"], debug_info=["dwo"]) # Skip to avoid crash
-    @expectedFailureAll(oslist=["windows", "linux", "freebsd"], bugnumber="llvm.org/pr25819")
+    @skipIf(
+        compiler="gcc",
+        oslist=["linux"],
+        debug_info=["dwo"])  # Skip to avoid crash
+    @expectedFailureAll(
+        oslist=[
+            "windows",
+            "linux",
+            "freebsd"],
+        bugnumber="llvm.org/pr25819")
     def test_scope_after_using_directive_lookup_with_run_command(self):
         """Test scope lookup after using directive in lldb."""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns3.cpp", self.line_break_after_using_directive, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns3.cpp",
+            self.line_break_after_using_directive,
+            num_expected_locations=1,
+            loc_exact=False)
 
-        # Run to BP_after_using_directive at global scope after using declaration
+        # Run to BP_after_using_directive at global scope after using
+        # declaration
         self.runToBkpt("run")
         # Evaluate func2() - should call A::func2()
-        self.expect("expr -- func2()", startstr = "(int) $0 = 3")
+        self.expect("expr -- func2()", startstr="(int) $0 = 3")
 
-    @unittest2.expectedFailure("lldb scope lookup after using declaration bugs")
+    @unittest2.expectedFailure(
+        "lldb scope lookup after using declaration bugs")
     # NOTE: this test may fail on older systems that don't emit import
     # emtries in DWARF - may need to add checks for compiler versions here.
     def test_scope_after_using_declaration_lookup_with_run_command(self):
@@ -181,12 +262,18 @@ class NamespaceLookupTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns2.cpp", self.line_break_nested_ns_scope_after_using, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns2.cpp",
+            self.line_break_nested_ns_scope_after_using,
+            num_expected_locations=1,
+            loc_exact=False)
 
-        # Run to BP_nested_ns_scope_after_using at nested ns scope after using declaration
+        # Run to BP_nested_ns_scope_after_using at nested ns scope after using
+        # declaration
         self.runToBkpt("run")
         # Evaluate func() - should call A::func()
-        self.expect("expr -- func()", startstr = "(int) $0 = 3")
+        self.expect("expr -- func()", startstr="(int) $0 = 3")
 
     @unittest2.expectedFailure("lldb scope lookup ambiguity after using bugs")
     def test_scope_ambiguity_after_using_lookup_with_run_command(self):
@@ -194,22 +281,38 @@ class NamespaceLookupTestCase(TestBase):
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns3.cpp", self.line_break_after_using_directive, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns3.cpp",
+            self.line_break_after_using_directive,
+            num_expected_locations=1,
+            loc_exact=False)
 
-        # Run to BP_after_using_directive at global scope after using declaration
+        # Run to BP_after_using_directive at global scope after using
+        # declaration
         self.runToBkpt("run")
         # Evaluate func() - should get error: ambiguous
         # FIXME: This test fails because lldb removes duplicates if they have
         # the same type.
-        self.expect("expr -- func()", startstr = "error")
+        self.expect("expr -- func()", startstr="error")
 
-    @expectedFailureAll(oslist=["windows", "linux", "freebsd"], bugnumber="llvm.org/pr25819")
+    @expectedFailureAll(
+        oslist=[
+            "windows",
+            "linux",
+            "freebsd"],
+        bugnumber="llvm.org/pr25819")
     def test_scope_lookup_shadowed_by_using_with_run_command(self):
         """Test scope lookup shadowed by using in lldb."""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "ns2.cpp", self.line_break_nested_ns_scope, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "ns2.cpp",
+            self.line_break_nested_ns_scope,
+            num_expected_locations=1,
+            loc_exact=False)
 
         # Run to BP_nested_ns_scope at nested ns scope
         self.runToBkpt("run")
@@ -218,5 +321,4 @@ class NamespaceLookupTestCase(TestBase):
         # because A::B::func() shadows A::func(), but lldb intentionally
         # disobeys these rules so that the intended overload can be found
         # by only removing duplicates if they have the same type.
-        self.expect("expr -- func(10)", startstr = "(int) $0 = 13")
-
+        self.expect("expr -- func(10)", startstr="(int) $0 = 13")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py Tue Sep  6 15:57:50 2016
@@ -3,24 +3,31 @@
 from __future__ import print_function
 
 
-
 import unittest2
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class NamespaceDefinitionsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(bugnumber="llvm.org/pr28948", compiler="gcc", compiler_version=["<", "4.9"])
+    @expectedFailureAll(
+        bugnumber="llvm.org/pr28948",
+        compiler="gcc",
+        compiler_version=[
+            "<",
+            "4.9"])
     def test_expr(self):
         self.build()
         self.common_setup()
 
-        self.expect("expression -- Foo::MyClass()", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ['thing = '])
+        self.expect(
+            "expression -- Foo::MyClass()",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['thing = '])
 
     def setUp(self):
         # Call super's setUp().
@@ -29,7 +36,7 @@ class NamespaceDefinitionsTestCase(TestB
         self.source = 'main.cpp'
         self.line = line_number(self.source, '// Set breakpoint here')
         self.shlib_names = ["a", "b"]
-    
+
     def common_setup(self):
         # Run in synchronous mode
         self.dbg.SetAsync(False)
@@ -39,21 +46,24 @@ class NamespaceDefinitionsTestCase(TestB
         self.assertTrue(target, VALID_TARGET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, self.source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
 
-        # Register our shared libraries for remote targets so they get automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(target, self.shlib_names)
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
+        environment = self.registerSharedLibrariesWithTarget(
+            target, self.shlib_names)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
-
+                    substrs=[' resolved, hit count = 1'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py Tue Sep  6 15:57:50 2016
@@ -6,6 +6,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestCppNsImport(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,79 +24,116 @@ class TestCppNsImport(TestBase):
         # Get the path of the executable
         cwd = os.getcwd()
         exe_file = "a.out"
-        exe_path  = os.path.join(cwd, exe_file)
+        exe_path = os.path.join(cwd, exe_file)
 
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(target.IsValid(), VALID_TARGET)
 
         # Break on main function
-        break_0 = target.BreakpointCreateBySourceRegex("// break 0", src_file_spec)
-        self.assertTrue(break_0.IsValid() and break_0.GetNumLocations() >= 1, VALID_BREAKPOINT)
-        break_1 = target.BreakpointCreateBySourceRegex("// break 1", src_file_spec)
-        self.assertTrue(break_1.IsValid() and break_1.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        break_0 = target.BreakpointCreateBySourceRegex(
+            "// break 0", src_file_spec)
+        self.assertTrue(
+            break_0.IsValid() and break_0.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
+        break_1 = target.BreakpointCreateBySourceRegex(
+            "// break 1", src_file_spec)
+        self.assertTrue(
+            break_1.IsValid() and break_1.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
         args = None
         env = None
-        process = target.LaunchSimple(args, env, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            args, env, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         # Get current fream of the thread at the breakpoint
         frame = thread.GetSelectedFrame()
 
         # Test imported namespaces
         test_result = frame.EvaluateExpression("n")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 1, "n = 1")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 1,
+            "n = 1")
 
         test_result = frame.EvaluateExpression("N::n")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 1, "N::n = 1")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 1,
+            "N::n = 1")
 
         test_result = frame.EvaluateExpression("nested")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 3, "nested = 3")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 3,
+            "nested = 3")
 
         test_result = frame.EvaluateExpression("anon")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 2, "anon = 2")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 2,
+            "anon = 2")
 
         test_result = frame.EvaluateExpression("global")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 4, "global = 4")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 4,
+            "global = 4")
 
         test_result = frame.EvaluateExpression("fun_var")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 9, "fun_var = 9")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 9,
+            "fun_var = 9")
 
         test_result = frame.EvaluateExpression("Fun::fun_var")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 0, "Fun::fun_var = 0")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 0,
+            "Fun::fun_var = 0")
 
         test_result = frame.EvaluateExpression("not_imported")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 35, "not_imported = 35")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 35,
+            "not_imported = 35")
 
         # Currently there is no way to distinguish between "::imported" and "imported" in ClangExpressionDeclMap so this fails
         #test_result = frame.EvaluateExpression("::imported")
         #self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 89, "::imported = 89")
 
         test_result = frame.EvaluateExpression("Imported::imported")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 99, "Imported::imported = 99")
-        
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 99,
+            "Imported::imported = 99")
+
         test_result = frame.EvaluateExpression("imported")
-        self.assertTrue(test_result.IsValid() and test_result.GetError().Fail(), "imported is ambiguous")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetError().Fail(),
+            "imported is ambiguous")
 
         test_result = frame.EvaluateExpression("single")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 3, "single = 3")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 3,
+            "single = 3")
 
         # Continue to second breakpoint
         process.Continue()
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         # Get current fream of the thread at the breakpoint
         frame = thread.GetSelectedFrame()
 
         # Test function inside namespace
         test_result = frame.EvaluateExpression("fun_var")
-        self.assertTrue(test_result.IsValid() and test_result.GetValueAsSigned() == 5, "fun_var = 5")
+        self.assertTrue(
+            test_result.IsValid() and test_result.GetValueAsSigned() == 5,
+            "fun_var = 5")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py Tue Sep  6 15:57:50 2016
@@ -7,31 +7,35 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CPPStaticMethodsTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def setUp(self):
         TestBase.setUp(self)
         self.line = line_number('main.cpp', '// breakpoint')
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_with_run_command(self):
         """Test that functions with the same name are resolved correctly"""
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list",
                     STOPPED_DUE_TO_BREAKPOINT,
-                    substrs = ['stopped', 'stop reason = breakpoint'])
+                    substrs=['stopped', 'stop reason = breakpoint'])
 
         self.expect("expression -- Dump(myB)",
-                    startstr = "(int) $0 = 2")
+                    startstr="(int) $0 = 2")
 
         self.expect("expression -- Static()",
-                    startstr = "(int) $1 = 1")
+                    startstr="(int) $1 = 1")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py Tue Sep  6 15:57:50 2016
@@ -1,4 +1,7 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.expectedFailureAll(bugnumber="rdar://problem/24599697")] )
+lldbinline.MakeInlineTest(
+    __file__, globals(), [
+        decorators.expectedFailureAll(
+            bugnumber="rdar://problem/24599697")])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py Tue Sep  6 15:57:50 2016
@@ -7,13 +7,18 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class RvalueReferencesTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
-    #rdar://problem/11479676
-    @expectedFailureAll(compiler="icc", bugnumber="ICC (13.1, 14-beta) do not emit DW_TAG_rvalue_reference_type.")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+
+    # rdar://problem/11479676
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="ICC (13.1, 14-beta) do not emit DW_TAG_rvalue_reference_type.")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_with_run_command(self):
         """Test that rvalues are supported in the C++ expression parser"""
         self.build()
@@ -27,24 +32,25 @@ class RvalueReferencesTestCase(TestBase)
         # Note that clang as of r187480 doesn't emit DW_TAG_const_type, unlike gcc 4.8.1
         # With gcc 4.8.1, lldb reports the type as (int &&const)
         self.expect("frame variable i",
-                    startstr = "(int &&",
-                    substrs = ["i = 0x", "&i = 3"])
+                    startstr="(int &&",
+                    substrs=["i = 0x", "&i = 3"])
 
         self.expect("expression -- i",
-                    startstr = "(int) ",
-                    substrs = ["3"])
+                    startstr="(int) ",
+                    substrs=["3"])
 
         self.expect("breakpoint delete 1")
 
         self.runCmd("process continue")
-        
+
         self.expect("expression -- foo(2)")
 
         self.expect("expression -- int &&j = 3; foo(j)",
-                    error = True)
+                    error=True)
 
         self.expect("expression -- int &&k = 6; k",
-                    startstr = "(int) $1 = 6")
+                    startstr="(int) $1 = 6")
 
     def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=1, loc_exact=True)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py Tue Sep  6 15:57:50 2016
@@ -6,6 +6,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestCppScopes(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -23,25 +24,32 @@ class TestCppScopes(TestBase):
         # Get the path of the executable
         cwd = os.getcwd()
         exe_file = "a.out"
-        exe_path  = os.path.join(cwd, exe_file)
+        exe_path = os.path.join(cwd, exe_file)
 
         # Load the executable
         target = self.dbg.CreateTarget(exe_path)
         self.assertTrue(target.IsValid(), VALID_TARGET)
 
         # Break on main function
-        main_breakpoint = target.BreakpointCreateBySourceRegex("// break here", src_file_spec)
-        self.assertTrue(main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1, VALID_BREAKPOINT)
+        main_breakpoint = target.BreakpointCreateBySourceRegex(
+            "// break here", src_file_spec)
+        self.assertTrue(
+            main_breakpoint.IsValid() and main_breakpoint.GetNumLocations() >= 1,
+            VALID_BREAKPOINT)
 
         # Launch the process
         args = None
         env = None
-        process = target.LaunchSimple(args, env, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            args, env, self.get_process_working_directory())
         self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
 
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         # Get current fream of the thread at the breakpoint
         frame = thread.GetSelectedFrame()
@@ -57,12 +65,18 @@ class TestCppScopes(TestBase):
             'a': 4444
         }
 
-        self.assertTrue(global_variables.GetSize() == 4, "target variable returns all variables")
+        self.assertTrue(
+            global_variables.GetSize() == 4,
+            "target variable returns all variables")
         for variable in global_variables:
             name = variable.GetName()
-            self.assertTrue(name in global_variables_assert, "target variable returns wrong variable " + name)
+            self.assertTrue(
+                name in global_variables_assert,
+                "target variable returns wrong variable " + name)
 
         for name in global_variables_assert:
             value = frame.EvaluateExpression(name)
             assert_value = global_variables_assert[name]
-            self.assertTrue(value.IsValid() and value.GetValueAsSigned() == assert_value, name + " = " + str(assert_value))
+            self.assertTrue(
+                value.IsValid() and value.GetValueAsSigned() == assert_value,
+                name + " = " + str(assert_value))

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test that variables with signed types di
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class SignedTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,7 +22,8 @@ class SignedTypesTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break inside main().
         self.source = 'main.cpp'
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
 
     def test(self):
         """Test that variables with signed types display correctly."""
@@ -34,27 +36,33 @@ class SignedTypesTestCase(TestBase):
         target = self.dbg.CreateTarget("a.out")
         self.assertTrue(target, VALID_TARGET)
 
-        lldbutil.run_break_set_by_file_and_line (self, self.source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, self.source, self.line, num_expected_locations=1, loc_exact=True)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped', 'stop reason = breakpoint'])
+                    substrs=['stopped', 'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Execute the puts().
         self.runCmd("thread step-over")
 
         # Test that signed types display correctly.
-        self.expect("frame variable --show-types --no-args", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = ["\((short int|short)\) the_signed_short = 99",
-                       "\((signed char|char)\) the_signed_char = 'c'"],
-            substrs = ["(int) the_signed_int = 99",
-                       "(long) the_signed_long = 99",
-                       "(long long) the_signed_long_long = 99"])
+        self.expect(
+            "frame variable --show-types --no-args",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            patterns=[
+                "\((short int|short)\) the_signed_short = 99",
+                "\((signed char|char)\) the_signed_char = 'c'"],
+            substrs=[
+                "(int) the_signed_int = 99",
+                "(long) the_signed_long = 99",
+                "(long long) the_signed_long_long = 99"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py Tue Sep  6 15:57:50 2016
@@ -5,18 +5,18 @@ Tests that C++ member and static variabl
 from __future__ import print_function
 
 
-
 import unittest2
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CPPStaticMembersTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
-    @unittest2.expectedFailure # llvm.org/pr15401
+
+    @unittest2.expectedFailure  # llvm.org/pr15401
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
     def test_with_run_command(self):
         """Test that member variables have the correct layout, scope and qualifiers when stopped inside and outside C++ methods"""
@@ -28,33 +28,35 @@ class CPPStaticMembersTestCase(TestBase)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
         self.expect("expression my_a.access()",
-                    startstr = "(long) $0 = 10")
-        
+                    startstr="(long) $0 = 10")
+
         self.expect("expression my_a.m_a",
-                    startstr = "(short) $1 = 1")
-        
-        # Note: SymbolFileDWARF::ParseChildMembers doesn't call AddFieldToRecordType, consistent with clang's AST layout.
+                    startstr="(short) $1 = 1")
+
+        # Note: SymbolFileDWARF::ParseChildMembers doesn't call
+        # AddFieldToRecordType, consistent with clang's AST layout.
         self.expect("expression my_a.s_d",
-                    startstr = "(int) $2 = 4")
-        
+                    startstr="(int) $2 = 4")
+
         self.expect("expression my_a.s_b",
-                    startstr = "(long) $3 = 2")
-        
+                    startstr="(long) $3 = 2")
+
         self.expect("expression A::s_b",
-                    startstr = "(long) $4 = 2")
+                    startstr="(long) $4 = 2")
 
-        # should not be available in global scope 
+        # should not be available in global scope
         self.expect("expression s_d",
-                    startstr = "error: use of undeclared identifier 's_d'")
-        
+                    startstr="error: use of undeclared identifier 's_d'")
+
         self.runCmd("process continue")
         self.expect("expression m_c",
-                    startstr = "(char) $5 = \'\\x03\'")
-        
+                    startstr="(char) $5 = \'\\x03\'")
+
         self.expect("expression s_b",
-                    startstr = "(long) $6 = 2")
+                    startstr="(long) $6 = 2")
 
         self.runCmd("process continue")
 
     def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=1, loc_exact=False)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py Tue Sep  6 15:57:50 2016
@@ -7,10 +7,11 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CPPStaticMethodsTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def setUp(self):
         TestBase.setUp(self)
         self.line = line_number('main.cpp', '// Break at this line')
@@ -21,17 +22,18 @@ class CPPStaticMethodsTestCase(TestBase)
         self.build()
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list",
                     STOPPED_DUE_TO_BREAKPOINT,
-                    substrs = ['stopped', 'stop reason = breakpoint'])
+                    substrs=['stopped', 'stop reason = breakpoint'])
 
         self.expect("expression -- A::getStaticValue()",
-                    startstr = "(int) $0 = 5")
+                    startstr="(int) $0 = 5")
 
         self.expect("expression -- my_a.getMemberValue()",
-                    startstr = "(int) $1 = 3")
+                    startstr="(int) $1 = 3")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test some expressions involving STL data
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class STLTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,7 +23,8 @@ class STLTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break inside main().
         self.source = 'main.cpp'
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
 
     @expectedFailureAll(bugnumber="rdar://problem/10400981")
     def test(self):
@@ -32,42 +34,46 @@ class STLTestCase(TestBase):
 
         # The following two lines, if uncommented, will enable loggings.
         #self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res)
-        #self.assertTrue(res.Succeeded())
+        # self.assertTrue(res.Succeeded())
 
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # rdar://problem/8543077
         # test/stl: clang built binaries results in the breakpoint locations = 3,
         # is this a problem with clang generated debug info?
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Stop at 'std::string hello_world ("Hello World!");'.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['main.cpp:%d' % self.line,
-                       'stop reason = breakpoint'])
+                    substrs=['main.cpp:%d' % self.line,
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Now try some expressions....
 
-        self.runCmd('expr for (int i = 0; i < hello_world.length(); ++i) { (void)printf("%c\\n", hello_world[i]); }')
+        self.runCmd(
+            'expr for (int i = 0; i < hello_world.length(); ++i) { (void)printf("%c\\n", hello_world[i]); }')
 
         # rdar://problem/10373783
         # rdar://problem/10400981
         self.expect('expr associative_array.size()',
-            substrs = [' = 3'])
+                    substrs=[' = 3'])
         self.expect('expr associative_array.count(hello_world)',
-            substrs = [' = 1'])
+                    substrs=[' = 1'])
         self.expect('expr associative_array[hello_world]',
-            substrs = [' = 1'])
+                    substrs=[' = 1'])
         self.expect('expr associative_array["hello"]',
-            substrs = [' = 2'])
+                    substrs=[' = 2'])
 
-    @expectedFailureAll(compiler="icc", bugnumber="ICC (13.1, 14-beta) do not emit DW_TAG_template_type_parameter.")
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="ICC (13.1, 14-beta) do not emit DW_TAG_template_type_parameter.")
     @add_test_categories(['pyapi'])
     def test_SBType_template_aspects(self):
         """Test APIs for getting template arguments from an SBType."""
@@ -83,13 +89,17 @@ class STLTestCase(TestBase):
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # Get Frame #0.
         self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            thread.IsValid(),
+            "There should be a thread stopped due to breakpoint condition")
         frame0 = thread.GetFrameAtIndex(0)
 
         # Get the type for variable 'associative_array'.
@@ -102,8 +112,9 @@ class STLTestCase(TestBase):
         num_template_args = map_type.GetNumberOfTemplateArguments()
         self.assertTrue(num_template_args > 0)
 
-        # We expect the template arguments to contain at least 'string' and 'int'.
-        expected_types = { 'string': False, 'int': False }
+        # We expect the template arguments to contain at least 'string' and
+        # 'int'.
+        expected_types = {'string': False, 'int': False}
         for i in range(num_template_args):
             t = map_type.GetTemplateArgumentType(i)
             self.DebugSBType(t)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test the lldb disassemble command on lib
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class StdCXXDisassembleTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,7 +25,9 @@ class StdCXXDisassembleTestCase(TestBase
 
     # rdar://problem/8504895
     # Crash while doing 'disassemble -n "-[NSNumber descriptionWithLocale:]"
-    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
+    @unittest2.skipIf(
+        TestBase.skipLongRunningTest(),
+        "Skip this long running test")
     def test_stdcxx_disasm(self):
         """Do 'disassemble' on each and every 'Code' symbol entry from the std c++ lib."""
         self.build()
@@ -36,7 +39,8 @@ class StdCXXDisassembleTestCase(TestBase
         # is this a problem with clang generated debug info?
         #
         # Break on line 13 of main.cpp.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -46,12 +50,13 @@ class StdCXXDisassembleTestCase(TestBase
 
         # The process should be in a 'stopped' state.
         self.expect(str(process), STOPPED_DUE_TO_BREAKPOINT, exe=False,
-            substrs = ["a.out",
-                       "stopped"])
+                    substrs=["a.out",
+                             "stopped"])
 
         # Disassemble the functions on the call stack.
         self.runCmd("thread backtrace")
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
         self.assertIsNotNone(thread)
         depth = thread.GetNumFrames()
         for i in range(depth - 1):
@@ -65,7 +70,8 @@ class StdCXXDisassembleTestCase(TestBase
         for i in range(target.GetNumModules()):
             module = target.GetModuleAtIndex(i)
             fs = module.GetFileSpec()
-            if (fs.GetFilename().startswith("libstdc++") or fs.GetFilename().startswith("libc++")):
+            if (fs.GetFilename().startswith("libstdc++")
+                    or fs.GetFilename().startswith("libc++")):
                 lib_stdcxx = str(fs)
                 break
 
@@ -73,7 +79,7 @@ class StdCXXDisassembleTestCase(TestBase
         # module is the corresponding SBModule.
 
         self.expect(lib_stdcxx, "Libraray StdC++ is located", exe=False,
-            substrs = ["lib"])
+                    substrs=["lib"])
 
         self.runCmd("image dump symtab '%s'" % lib_stdcxx)
         raw_output = self.res.GetOutput()

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py Tue Sep  6 15:57:50 2016
@@ -1,7 +1,7 @@
 """
 Test that C++ template classes that have integer parameters work correctly.
 
-We must reconstruct the types correctly so the template types are correct 
+We must reconstruct the types correctly so the template types are correct
 and display correctly, and also make sure the expression parser works and
 is able the find all needed functions when evaluating expressions
 """
@@ -10,10 +10,11 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TemplateArgsTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def prepareProcess(self):
         self.build()
 
@@ -22,66 +23,107 @@ class TemplateArgsTestCase(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        # Set breakpoints inside and outside methods that take pointers to the containing struct.
+        # Set breakpoints inside and outside methods that take pointers to the
+        # containing struct.
         line = line_number('main.cpp', '// Breakpoint 1')
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=1, loc_exact=True)
 
         arguments = None
-        environment = None 
+        environment = None
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (arguments, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            arguments, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
- 
+
         # Get the thread of the process
-        self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
 
         # Get frame for current thread
         return thread.GetSelectedFrame()
 
     def test_integer_args(self):
         frame = self.prepareProcess()
-        
-        testpos = frame.FindVariable('testpos') 
-        self.assertTrue(testpos.IsValid(), 'make sure we find a local variabble named "testpos"')
+
+        testpos = frame.FindVariable('testpos')
+        self.assertTrue(
+            testpos.IsValid(),
+            'make sure we find a local variabble named "testpos"')
         self.assertTrue(testpos.GetType().GetName() == 'TestObj<1>')
-        
+
         expr_result = frame.EvaluateExpression("testpos.getArg()")
-        self.assertTrue(expr_result.IsValid(), 'got a valid expression result from expression "testpos.getArg()"');
+        self.assertTrue(
+            expr_result.IsValid(),
+            'got a valid expression result from expression "testpos.getArg()"')
         self.assertTrue(expr_result.GetValue() == "1", "testpos.getArg() == 1")
-        self.assertTrue(expr_result.GetType().GetName() == "int", 'expr_result.GetType().GetName() == "int"')     
-        
-        testneg = frame.FindVariable('testneg') 
-        self.assertTrue(testneg.IsValid(), 'make sure we find a local variabble named "testneg"')
-        self.assertTrue(testneg.GetType().GetName() == 'TestObj<-1>')        
-        
+        self.assertTrue(
+            expr_result.GetType().GetName() == "int",
+            'expr_result.GetType().GetName() == "int"')
+
+        testneg = frame.FindVariable('testneg')
+        self.assertTrue(
+            testneg.IsValid(),
+            'make sure we find a local variabble named "testneg"')
+        self.assertTrue(testneg.GetType().GetName() == 'TestObj<-1>')
+
         expr_result = frame.EvaluateExpression("testneg.getArg()")
-        self.assertTrue(expr_result.IsValid(), 'got a valid expression result from expression "testneg.getArg()"');
-        self.assertTrue(expr_result.GetValue() == "-1", "testneg.getArg() == -1")
-        self.assertTrue(expr_result.GetType().GetName() == "int", 'expr_result.GetType().GetName() == "int"')
+        self.assertTrue(
+            expr_result.IsValid(),
+            'got a valid expression result from expression "testneg.getArg()"')
+        self.assertTrue(
+            expr_result.GetValue() == "-1",
+            "testneg.getArg() == -1")
+        self.assertTrue(
+            expr_result.GetType().GetName() == "int",
+            'expr_result.GetType().GetName() == "int"')
 
-    # Gcc does not generate the necessary DWARF attribute for enum template parameters.
+    # Gcc does not generate the necessary DWARF attribute for enum template
+    # parameters.
     @expectedFailureAll(bugnumber="llvm.org/pr28354", compiler="gcc")
     def test_enum_args(self):
         frame = self.prepareProcess()
 
-        # Make sure "member" can be displayed and also used in an expression correctly
-        member = frame.FindVariable('member') 
-        self.assertTrue(member.IsValid(), 'make sure we find a local variabble named "member"')
-        self.assertTrue(member.GetType().GetName() == 'EnumTemplate<EnumType::Member>')
-        
+        # Make sure "member" can be displayed and also used in an expression
+        # correctly
+        member = frame.FindVariable('member')
+        self.assertTrue(
+            member.IsValid(),
+            'make sure we find a local variabble named "member"')
+        self.assertTrue(member.GetType().GetName() ==
+                        'EnumTemplate<EnumType::Member>')
+
         expr_result = frame.EvaluateExpression("member.getMember()")
-        self.assertTrue(expr_result.IsValid(), 'got a valid expression result from expression "member.getMember()"');
-        self.assertTrue(expr_result.GetValue() == "123", "member.getMember() == 123")
-        self.assertTrue(expr_result.GetType().GetName() == "int", 'expr_result.GetType().GetName() == "int"')     
-
-        # Make sure "subclass" can be displayed and also used in an expression correctly
-        subclass = frame.FindVariable('subclass') 
-        self.assertTrue(subclass.IsValid(), 'make sure we find a local variabble named "subclass"')
-        self.assertTrue(subclass.GetType().GetName() == 'EnumTemplate<EnumType::Subclass>')
-        
+        self.assertTrue(
+            expr_result.IsValid(),
+            'got a valid expression result from expression "member.getMember()"')
+        self.assertTrue(
+            expr_result.GetValue() == "123",
+            "member.getMember() == 123")
+        self.assertTrue(
+            expr_result.GetType().GetName() == "int",
+            'expr_result.GetType().GetName() == "int"')
+
+        # Make sure "subclass" can be displayed and also used in an expression
+        # correctly
+        subclass = frame.FindVariable('subclass')
+        self.assertTrue(
+            subclass.IsValid(),
+            'make sure we find a local variabble named "subclass"')
+        self.assertTrue(subclass.GetType().GetName() ==
+                        'EnumTemplate<EnumType::Subclass>')
+
         expr_result = frame.EvaluateExpression("subclass.getMember()")
-        self.assertTrue(expr_result.IsValid(), 'got a valid expression result from expression "subclass.getMember()"');
-        self.assertTrue(expr_result.GetValue() == "246", "subclass.getMember() == 246")
-        self.assertTrue(expr_result.GetType().GetName() == "int", 'expr_result.GetType().GetName() == "int"')     
+        self.assertTrue(
+            expr_result.IsValid(),
+            'got a valid expression result from expression "subclass.getMember()"')
+        self.assertTrue(
+            expr_result.GetValue() == "246",
+            "subclass.getMember() == 246")
+        self.assertTrue(
+            expr_result.GetType().GetName() == "int",
+            'expr_result.GetType().GetName() == "int"')

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py Tue Sep  6 15:57:50 2016
@@ -6,14 +6,21 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class CPPThisTestCase(TestBase):
-    
+
     mydir = TestBase.compute_mydir(__file__)
-    
-    #rdar://problem/9962849
-    @expectedFailureAll(compiler="gcc", bugnumber="llvm.org/pr15439 The 'this' pointer isn't available during expression evaluation when stopped in an inlined member function")
-    @expectedFailureAll(compiler="icc", bugnumber="ICC doesn't emit correct DWARF inline debug info for inlined member functions.")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+
+    # rdar://problem/9962849
+    @expectedFailureAll(
+        compiler="gcc",
+        bugnumber="llvm.org/pr15439 The 'this' pointer isn't available during expression evaluation when stopped in an inlined member function")
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="ICC doesn't emit correct DWARF inline debug info for inlined member functions.")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_with_run_command(self):
         """Test that the appropriate member variables are available when stopped in C++ static, inline, and const methods"""
         self.build()
@@ -27,26 +34,27 @@ class CPPThisTestCase(TestBase):
         self.runCmd("process launch", RUN_SUCCEEDED)
 
         self.expect("expression -- m_a = 2",
-                    startstr = "(int) $0 = 2")
-        
+                    startstr="(int) $0 = 2")
+
         self.runCmd("process continue")
-        
+
         # This would be disallowed if we enforced const.  But we don't.
         self.expect("expression -- m_a = 2",
-                    startstr = "(int) $1 = 2")
-        
-        self.expect("expression -- (int)getpid(); m_a", 
-                    startstr = "(int) $2 = 2")
+                    startstr="(int) $1 = 2")
+
+        self.expect("expression -- (int)getpid(); m_a",
+                    startstr="(int) $2 = 2")
 
         self.runCmd("process continue")
 
         self.expect("expression -- s_a",
-                    startstr = "(int) $3 = 5")
+                    startstr="(int) $3 = 5")
 
         self.runCmd("process continue")
 
         self.expect("expression -- m_a",
-                    startstr = "(int) $4 = 2")
-    
+                    startstr="(int) $4 = 2")
+
     def set_breakpoint(self, line):
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", line, num_expected_locations=1, loc_exact=False)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", line, num_expected_locations=1, loc_exact=False)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py Tue Sep  6 15:57:50 2016
@@ -6,8 +6,8 @@ Test that the expression parser returns
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -26,23 +26,30 @@ from lldbsuite.test import lldbutil
 #  [5] = e\0\0\0
 #}
 
+
 class UnicodeLiteralsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_expr1(self):
         """Test that the expression parser returns proper Unicode strings."""
         self.build()
         self.rdar12991846(expr=1)
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_expr2(self):
         """Test that the expression parser returns proper Unicode strings."""
         self.build()
         self.rdar12991846(expr=2)
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     def test_expr3(self):
         """Test that the expression parser returns proper Unicode strings."""
         self.build()
@@ -53,12 +60,14 @@ class UnicodeLiteralsTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break for main.cpp.
         self.source = 'main.cpp'
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
 
     def rdar12991846(self, expr=None):
         """Test that the expression parser returns proper Unicode strings."""
         if self.getArchitecture() in ['i386']:
-            self.skipTest("Skipping because this test is known to crash on i386")
+            self.skipTest(
+                "Skipping because this test is known to crash on i386")
 
         exe = os.path.join(os.getcwd(), "a.out")
 
@@ -67,16 +76,20 @@ class UnicodeLiteralsTestCase(TestBase):
         self.assertTrue(target, VALID_TARGET)
 
         # Break on the struct declration statement in main.cpp.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line)
+        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
 
-        if expr == 1: self.expect('expression L"hello"', substrs = ['hello'])
+        if expr == 1:
+            self.expect('expression L"hello"', substrs=['hello'])
 
-        if expr == 2: self.expect('expression u"hello"', substrs = ['hello'])
+        if expr == 2:
+            self.expect('expression u"hello"', substrs=['hello'])
 
-        if expr == 3: self.expect('expression U"hello"', substrs = ['hello'])
+        if expr == 3:
+            self.expect('expression U"hello"', substrs=['hello'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py Tue Sep  6 15:57:50 2016
@@ -5,11 +5,11 @@ Test that template instaniations of std:
 from __future__ import print_function
 
 
-
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
 
+
 class UniqueTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -18,8 +18,9 @@ class UniqueTypesTestCase(TestBase):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number inside main.cpp.
-        self.line = line_number("main.cpp",
-          "// Set breakpoint here to verify that std::vector 'longs' and 'shorts' have unique types.")
+        self.line = line_number(
+            "main.cpp",
+            "// Set breakpoint here to verify that std::vector 'longs' and 'shorts' have unique types.")
 
     def test(self):
         """Test for unique types of std::vector<long> and std::vector<short>."""
@@ -27,36 +28,43 @@ class UniqueTypesTestCase(TestBase):
 
         compiler = self.getCompiler()
         compiler_basename = os.path.basename(compiler)
-        if "clang" in compiler_basename and int(self.getCompilerVersion().split('.')[0]) < 3:
-            self.skipTest("rdar://problem/9173060 lldb hangs while running unique-types for clang version < 3")
+        if "clang" in compiler_basename and int(
+                self.getCompilerVersion().split('.')[0]) < 3:
+            self.skipTest(
+                "rdar://problem/9173060 lldb hangs while running unique-types for clang version < 3")
 
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
-        # Do a "frame variable --show-types longs" and verify "long" is in each line of output.
+        # Do a "frame variable --show-types longs" and verify "long" is in each
+        # line of output.
         self.runCmd("frame variable --show-types longs")
         output = self.res.GetOutput()
         for x in [line.strip() for line in output.split(os.linesep)]:
-            # Skip empty line, closing brace, and messages about more variables than can be displayed.
+            # Skip empty line, closing brace, and messages about more variables
+            # than can be displayed.
             if not x or x == '}' or x == '...' or "Some of your variables have more members than the debugger will show by default" in x:
                 continue
             self.expect(x, "Expect type 'long'", exe=False,
-                substrs = ['long'])
+                        substrs=['long'])
 
-        # Do a "frame variable --show-types shorts" and verify "short" is in each line of output.
+        # Do a "frame variable --show-types shorts" and verify "short" is in
+        # each line of output.
         self.runCmd("frame variable --show-types shorts")
         output = self.res.GetOutput()
         for x in [line.strip() for line in output.split(os.linesep)]:
-            # Skip empty line, closing brace, and messages about more variables than can be displayed.
+            # Skip empty line, closing brace, and messages about more variables
+            # than can be displayed.
             if not x or x == '}' or x == '...' or "Some of your variables have more members than the debugger will show by default" in x:
                 continue
             self.expect(x, "Expect type 'short'", exe=False,
-                substrs = ['short'])
+                        substrs=['short'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test that variables with unsigned types
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class UnsignedTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -34,23 +35,31 @@ class UnsignedTypesTestCase(TestBase):
         # if GCC is the target compiler, we cannot rely on an exact line match.
         need_exact = "gcc" not in self.getCompiler()
         # Break on line 19 in main() aftre the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=need_exact)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "main.cpp",
+            self.line,
+            num_expected_locations=-1,
+            loc_exact=need_exact)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped', 'stop reason = breakpoint'])
+                    substrs=['stopped', 'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # Test that unsigned types display correctly.
-        self.expect("frame variable --show-types --no-args", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(unsigned char) the_unsigned_char = 'c'",
-            patterns = ["\((short unsigned int|unsigned short)\) the_unsigned_short = 99"],
-            substrs = ["(unsigned int) the_unsigned_int = 99",
-                       "(unsigned long) the_unsigned_long = 99",
-                       "(unsigned long long) the_unsigned_long_long = 99",
-                       "(uint32_t) the_uint32 = 99"])
+        self.expect(
+            "frame variable --show-types --no-args",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(unsigned char) the_unsigned_char = 'c'",
+            patterns=["\((short unsigned int|unsigned short)\) the_unsigned_short = 99"],
+            substrs=[
+                "(unsigned int) the_unsigned_int = 99",
+                "(unsigned long) the_unsigned_long = 99",
+                "(unsigned long long) the_unsigned_long_long = 99",
+                "(uint32_t) the_uint32 = 99"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py Tue Sep  6 15:57:50 2016
@@ -4,15 +4,19 @@ Test C++ virtual function and virtual in
 
 from __future__ import print_function
 
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 def Msg(expr, val):
-    return "'expression %s' matches the output (from compiled code): %s" % (expr, val)
+    return "'expression %s' matches the output (from compiled code): %s" % (
+        expr, val)
+
 
 class CppVirtualMadness(TestBase):
 
@@ -29,7 +33,9 @@ class CppVirtualMadness(TestBase):
         self.source = 'main.cpp'
         self.line = line_number(self.source, '// Set first breakpoint here.')
 
-    @expectedFailureAll(compiler="icc", bugnumber="llvm.org/pr16808 lldb does not call the correct virtual function with icc.")
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="llvm.org/pr16808 lldb does not call the correct virtual function with icc.")
     @expectedFailureAll(oslist=['windows'])
     def test_virtual_madness(self):
         """Test that expression works correctly with virtual inheritance as well as virtual function."""
@@ -38,7 +44,7 @@ class CppVirtualMadness(TestBase):
         # Bring the program to the point where we can issue a series of
         # 'expression' command to compare against the golden output.
         self.dbg.SetAsync(False)
-        
+
         # Create a target by the debugger.
         target = self.dbg.CreateTarget("a.out")
         self.assertTrue(target, VALID_TARGET)
@@ -48,18 +54,25 @@ class CppVirtualMadness(TestBase):
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
-        
+
         self.assertTrue(process.GetState() == lldb.eStateStopped)
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
+        thread = lldbutil.get_stopped_thread(
+            process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            thread.IsValid(),
+            "There should be a thread stopped due to breakpoint condition")
 
         # First, capture the golden output from the program itself.
         golden = thread.GetFrameAtIndex(0).FindVariable("golden")
-        self.assertTrue(golden.IsValid(), "Encountered an error reading the process's golden variable")
+        self.assertTrue(
+            golden.IsValid(),
+            "Encountered an error reading the process's golden variable")
         error = lldb.SBError()
-        golden_str = process.ReadCStringFromMemory(golden.AddressOf().GetValueAsUnsigned(), 4096, error);
+        golden_str = process.ReadCStringFromMemory(
+            golden.AddressOf().GetValueAsUnsigned(), 4096, error)
         self.assertTrue(error.Success())
         self.assertTrue("c_as_C" in golden_str)
 
@@ -84,7 +97,7 @@ class CppVirtualMadness(TestBase):
 
             self.runCmd("expression %s" % my_expr)
             output = self.res.GetOutput()
-            
+
             # The expression output must match the oracle.
             self.expect(output, Msg(my_expr, val), exe=False,
-                substrs = [val])
+                        substrs=[val])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py Tue Sep  6 15:57:50 2016
@@ -1,4 +1,4 @@
-#coding=utf8
+# coding=utf8
 """
 Test that C++ supports wchar_t correctly.
 """
@@ -6,12 +6,13 @@ Test that C++ supports wchar_t correctly
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
+
 class CxxWCharTTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,7 +22,8 @@ class CxxWCharTTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break for main.cpp.
         self.source = 'main.cpp'
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
 
     def test(self):
         """Test that C++ supports wchar_t correctly."""
@@ -33,42 +35,46 @@ class CxxWCharTTestCase(TestBase):
         self.assertTrue(target, VALID_TARGET)
 
         # Break on the struct declration statement in main.cpp.
-        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line)
+        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         if not process:
             self.fail("SBTarget.Launch() failed")
 
         # Check that we correctly report templates on wchar_t
         self.expect("frame variable foo_y",
-            substrs = ['(Foo<wchar_t>) foo_y = '])
+                    substrs=['(Foo<wchar_t>) foo_y = '])
 
         # Check that we correctly report templates on int
         self.expect("frame variable foo_x",
-            substrs = ['(Foo<int>) foo_x = '])
+                    substrs=['(Foo<int>) foo_x = '])
 
         # Check that we correctly report wchar_t
         self.expect("frame variable foo_y.object",
-            substrs = ['(wchar_t) foo_y.object = '])
+                    substrs=['(wchar_t) foo_y.object = '])
 
         # Check that we correctly report int
         self.expect("frame variable foo_x.object",
-            substrs = ['(int) foo_x.object = '])
+                    substrs=['(int) foo_x.object = '])
 
         # Check that we can run expressions that return wchar_t
-        self.expect("expression L'a'",substrs = ['(wchar_t) $',"L'a'"])
+        self.expect("expression L'a'", substrs=['(wchar_t) $', "L'a'"])
 
         # Mazel Tov if this works!
         self.expect("frame variable mazeltov",
-            substrs = ['(const wchar_t *) mazeltov = ','L"מזל טוב"'])
+                    substrs=['(const wchar_t *) mazeltov = ', 'L"מזל טוב"'])
 
-        self.expect("frame variable ws_NULL",substrs = ['(wchar_t *) ws_NULL = 0x0'])
-        self.expect("frame variable ws_empty",substrs = [' L""'])
+        self.expect(
+            "frame variable ws_NULL",
+            substrs=['(wchar_t *) ws_NULL = 0x0'])
+        self.expect("frame variable ws_empty", substrs=[' L""'])
+
+        self.expect("frame variable array", substrs=[
+                    'L"Hey, I\'m a super wchar_t string'])
+        self.expect("frame variable array", substrs=['[0]'], matching=False)
 
-        self.expect("frame variable array",substrs = ['L"Hey, I\'m a super wchar_t string'])
-        self.expect("frame variable array",substrs = ['[0]'], matching=False)
-        
         self.expect('frame variable wchar_zero', substrs=["L'\\0'"])
         self.expect('expression wchar_zero', substrs=["L'\\0'"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/go/expressions/TestExpressions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/go/expressions/TestExpressions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/go/expressions/TestExpressions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/go/expressions/TestExpressions.py Tue Sep  6 15:57:50 2016
@@ -1,18 +1,20 @@
 """Test the go expression parser/interpreter."""
 
-import os, time
+import os
+import time
 import unittest2
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestGoUserExpression(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @add_test_categories(['pyapi'])
-    @skipIfRemote # Not remote test suit ready
+    @skipIfRemote  # Not remote test suit ready
     @skipUnlessGoInstalled
     def test_with_dsym_and_python_api(self):
         """Test GoASTUserExpress."""
@@ -25,7 +27,8 @@ class TestGoUserExpression(TestBase):
         TestBase.setUp(self)
         # Find the line numbers to break inside main().
         self.main_source = "main.go"
-        self.break_line = line_number(self.main_source, '// Set breakpoint here.')
+        self.break_line = line_number(
+            self.main_source, '// Set breakpoint here.')
 
     def check_builtin(self, name, size=0, typeclass=lldb.eTypeClassBuiltin):
         tl = self.target().FindTypes(name)
@@ -42,23 +45,28 @@ class TestGoUserExpression(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        bpt = target.BreakpointCreateByLocation(self.main_source, self.break_line)
+        bpt = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line)
         self.assertTrue(bpt, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, bpt)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
 
         # Make sure we stopped at the first breakpoint.
-        self.assertTrue (len(thread_list) != 0, "No thread stopped at our breakpoint.")
-        self.assertTrue (len(thread_list) == 1, "More than one thread stopped at our breakpoint.")
+        self.assertTrue(
+            len(thread_list) != 0,
+            "No thread stopped at our breakpoint.")
+        self.assertTrue(len(thread_list) == 1,
+                        "More than one thread stopped at our breakpoint.")
 
         frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue (frame, "Got a valid frame 0 frame.")
+        self.assertTrue(frame, "Got a valid frame 0 frame.")
 
     def go_expressions(self):
         frame = self.frame()
@@ -66,7 +74,7 @@ class TestGoUserExpression(TestBase):
         self.assertEqual(1, v.GetValueAsSigned())
         x = frame.EvaluateExpression("x")
         self.assertEqual(22, x.GetValueAsSigned())
-        
+
         a = frame.EvaluateExpression("a")
         self.assertEqual(3, a.GetNumChildren())
         a0 = a.GetChildAtIndex(0)
@@ -75,23 +83,23 @@ class TestGoUserExpression(TestBase):
         # Array indexing
         a0 = frame.EvaluateExpression("a[0]")
         self.assertEqual(8, a0.GetValueAsSigned())
-        
+
         # Slice indexing
         b1 = frame.EvaluateExpression("b[1]")
         self.assertEqual(9, b1.GetValueAsSigned())
-        
+
         # Test global in this package
         g = frame.EvaluateExpression("myGlobal")
         self.assertEqual(17, g.GetValueAsSigned(), str(g))
-        
+
         # Global with package name
         g = frame.EvaluateExpression("main.myGlobal")
         self.assertEqual(17, g.GetValueAsSigned(), str(g))
-        
+
         # Global with quoted package name
         g = frame.EvaluateExpression('"main".myGlobal')
         self.assertEqual(17, g.GetValueAsSigned(), str(g))
-                
+
         # Casting with package local type
         s = frame.EvaluateExpression("*(*myStruct)(i.data)")
         sb = s.GetChildMemberWithName("a")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/go/formatters/TestGoFormatters.py Tue Sep  6 15:57:50 2016
@@ -1,18 +1,20 @@
 """Test the Go Data Formatter Plugin."""
 
-import os, time
+import os
+import time
 import unittest2
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestGoLanguage(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipIfFreeBSD # llvm.org/pr24895 triggers assertion failure
-    @skipIfRemote # Not remote test suite ready
+    @skipIfFreeBSD  # llvm.org/pr24895 triggers assertion failure
+    @skipIfRemote  # Not remote test suite ready
     @no_debug_info_test
     @skipUnlessGoInstalled
     def test_go_formatter_plugin(self):
@@ -34,29 +36,37 @@ class TestGoLanguage(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        self.bpt = target.BreakpointCreateByLocation(self.main_source, self.break_line)
+        self.bpt = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line)
         self.assertTrue(self.bpt, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, self.bpt)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            process, self.bpt)
 
         # Make sure we stopped at the first breakpoint.
-        self.assertTrue (len(thread_list) != 0, "No thread stopped at our breakpoint.")
-        self.assertTrue (len(thread_list) == 1, "More than one thread stopped at our breakpoint.")
+        self.assertTrue(
+            len(thread_list) != 0,
+            "No thread stopped at our breakpoint.")
+        self.assertTrue(len(thread_list) == 1,
+                        "More than one thread stopped at our breakpoint.")
 
         frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue (frame, "Got a valid frame 0 frame.")
+        self.assertTrue(frame, "Got a valid frame 0 frame.")
 
     def check_formatters(self):
         a = self.frame().FindVariable('a')
         self.assertEqual('(string) a = "my string"', str(a))
         b = self.frame().FindVariable('b')
-        self.assertEqual("([]int) b = (len 2, cap 7) {\n  [0] = 0\n  [1] = 0\n}", str(b))
+        self.assertEqual(
+            "([]int) b = (len 2, cap 7) {\n  [0] = 0\n  [1] = 0\n}",
+            str(b))
 
 
 if __name__ == '__main__':

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/go/goroutines/TestGoroutines.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/go/goroutines/TestGoroutines.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/go/goroutines/TestGoroutines.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/go/goroutines/TestGoroutines.py Tue Sep  6 15:57:50 2016
@@ -3,20 +3,21 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestGoASTContext(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @add_test_categories(['pyapi'])
-    @skipIfFreeBSD # llvm.org/pr24895 triggers assertion failure
-    @skipIfRemote # Not remote test suite ready
+    @skipIfFreeBSD  # llvm.org/pr24895 triggers assertion failure
+    @skipIfRemote  # Not remote test suite ready
     @no_debug_info_test
     @skipUnlessGoInstalled
     def test_goroutine_plugin(self):
@@ -40,47 +41,64 @@ class TestGoASTContext(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        self.bpt1 = target.BreakpointCreateByLocation(self.main_source, self.break_line1)
+        self.bpt1 = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line1)
         self.assertTrue(self.bpt1, VALID_BREAKPOINT)
-        self.bpt2 = target.BreakpointCreateByLocation(self.main_source, self.break_line2)
+        self.bpt2 = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line2)
         self.assertTrue(self.bpt2, VALID_BREAKPOINT)
-        self.bpt3 = target.BreakpointCreateByLocation(self.main_source, self.break_line3)
+        self.bpt3 = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line3)
         self.assertTrue(self.bpt3, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, self.bpt1)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            process, self.bpt1)
 
         # Make sure we stopped at the first breakpoint.
-        self.assertTrue (len(thread_list) != 0, "No thread stopped at our breakpoint.")
-        self.assertTrue (len(thread_list) == 1, "More than one thread stopped at our breakpoint.")
+        self.assertTrue(
+            len(thread_list) != 0,
+            "No thread stopped at our breakpoint.")
+        self.assertTrue(len(thread_list) == 1,
+                        "More than one thread stopped at our breakpoint.")
 
         frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue (frame, "Got a valid frame 0 frame.")
+        self.assertTrue(frame, "Got a valid frame 0 frame.")
 
     def check_goroutines(self):
         self.assertLess(len(self.process().threads), 20)
         self.process().Continue()
 
         # Make sure we stopped at the 2nd breakpoint
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (self.process(), self.bpt2)
-        self.assertTrue (len(thread_list) != 0, "No thread stopped at our breakpoint.")
-        self.assertTrue (len(thread_list) == 1, "More than one thread stopped at our breakpoint.")
-        
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            self.process(), self.bpt2)
+        self.assertTrue(
+            len(thread_list) != 0,
+            "No thread stopped at our breakpoint.")
+        self.assertTrue(len(thread_list) == 1,
+                        "More than one thread stopped at our breakpoint.")
+
         # There's (at least) 21 goroutines.
         self.assertGreater(len(self.process().threads), 20)
         # self.dbg.HandleCommand("log enable lldb os")
 
-        # Now test that stepping works if the memory thread moves to a different backing thread.
+        # Now test that stepping works if the memory thread moves to a
+        # different backing thread.
         for i in list(range(11)):
             self.thread().StepOver()
-            self.assertEqual(lldb.eStopReasonPlanComplete, self.thread().GetStopReason(), self.thread().GetStopDescription(100))
-        
+            self.assertEqual(
+                lldb.eStopReasonPlanComplete,
+                self.thread().GetStopReason(),
+                self.thread().GetStopDescription(100))
+
         # Disable the plugin and make sure the goroutines disappear
-        self.dbg.HandleCommand("settings set plugin.os.goroutines.enable false")
+        self.dbg.HandleCommand(
+            "settings set plugin.os.goroutines.enable false")
         self.thread().StepInstruction(False)
         self.assertLess(len(self.process().threads), 20)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/go/types/TestGoASTContext.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/go/types/TestGoASTContext.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/go/types/TestGoASTContext.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/go/types/TestGoASTContext.py Tue Sep  6 15:57:50 2016
@@ -3,20 +3,21 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestGoASTContext(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     @add_test_categories(['pyapi'])
-    @skipIfFreeBSD # llvm.org/pr24895 triggers assertion failure
-    @skipIfRemote # Not remote test suit ready
+    @skipIfFreeBSD  # llvm.org/pr24895 triggers assertion failure
+    @skipIfRemote  # Not remote test suit ready
     @no_debug_info_test
     @skipUnlessGoInstalled
     def test_with_dsym_and_python_api(self):
@@ -31,7 +32,8 @@ class TestGoASTContext(TestBase):
         TestBase.setUp(self)
         # Find the line numbers to break inside main().
         self.main_source = "main.go"
-        self.break_line = line_number(self.main_source, '// Set breakpoint here.')
+        self.break_line = line_number(
+            self.main_source, '// Set breakpoint here.')
 
     def check_builtin(self, name, size=0, typeclass=lldb.eTypeClassBuiltin):
         tl = self.target().FindTypes(name)
@@ -48,23 +50,28 @@ class TestGoASTContext(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        bpt = target.BreakpointCreateByLocation(self.main_source, self.break_line)
+        bpt = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line)
         self.assertTrue(bpt, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, bpt)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
 
         # Make sure we stopped at the first breakpoint.
-        self.assertTrue (len(thread_list) != 0, "No thread stopped at our breakpoint.")
-        self.assertTrue (len(thread_list) == 1, "More than one thread stopped at our breakpoint.")
+        self.assertTrue(
+            len(thread_list) != 0,
+            "No thread stopped at our breakpoint.")
+        self.assertTrue(len(thread_list) == 1,
+                        "More than one thread stopped at our breakpoint.")
 
         frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue (frame, "Got a valid frame 0 frame.")
+        self.assertTrue(frame, "Got a valid frame 0 frame.")
 
     def go_builtin_types(self):
         address_size = self.target().GetAddressByteSize()
@@ -93,19 +100,19 @@ class TestGoASTContext(TestBase):
     def check_main_vars(self):
         v = self.var('theBool')
         self.assertEqual('true', v.value)
-        
+
         v = self.var('theInt')
         self.assertEqual('-7', v.value)
-        
+
         v = self.var('theComplex')
         self.assertEqual('1 + 2i', v.value)
-        
+
         v = self.var('thePointer')
         self.assertTrue(v.TypeIsPointerType())
         self.assertEqual('-10', v.Dereference().value)
         self.assertEqual(1, v.GetNumChildren())
         self.assertEqual('-10', v.GetChildAtIndex(0).value)
-        
+
         # print()
         # print(os.getpid())
         # time.sleep(60)
@@ -115,8 +122,11 @@ class TestGoASTContext(TestBase):
         self.assertEqual(2, v.GetNumChildren())
         self.assertEqual('7', v.GetChildAtIndex(0).value)
         self.assertEqual('7', v.GetChildMemberWithName('myInt').value)
-        self.assertEqual(v.load_addr, v.GetChildAtIndex(1).GetValueAsUnsigned())
-        self.assertEqual(v.load_addr, v.GetChildMemberWithName('myPointer').GetValueAsUnsigned())
+        self.assertEqual(
+            v.load_addr,
+            v.GetChildAtIndex(1).GetValueAsUnsigned())
+        self.assertEqual(v.load_addr, v.GetChildMemberWithName(
+            'myPointer').GetValueAsUnsigned())
 
         # Test accessing struct fields through pointers.
         v = v.GetChildMemberWithName('myPointer')

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py Tue Sep  6 15:57:50 2016
@@ -3,11 +3,13 @@
 from __future__ import print_function
 
 
-
-import os, time, re
+import os
+import time
+import re
 import lldb
 from lldbsuite.test.lldbtest import *
 
+
 class MixedLanguagesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -21,12 +23,14 @@ class MixedLanguagesTestCase(TestBase):
         # Execute the cleanup function during test case tear down
         # to restore the frame format.
         def cleanup():
-            self.runCmd("settings set frame-format %s" % self.format_string, check=False)
+            self.runCmd(
+                "settings set frame-format %s" %
+                self.format_string, check=False)
         self.addTearDownHook(cleanup)
         self.runCmd("settings show frame-format")
         m = re.match(
-                '^frame-format \(format-string\) = "(.*)\"$',
-                self.res.GetOutput())
+            '^frame-format \(format-string\) = "(.*)\"$',
+            self.res.GetOutput())
         self.assertTrue(m, "Bad settings string")
         self.format_string = m.group(1)
 
@@ -34,23 +38,23 @@ class MixedLanguagesTestCase(TestBase):
         format_string = "frame #${frame.index}: ${frame.pc}{ ${module.file.basename}`${function.name}{${function.pc-offset}}}{, lang=${language}}\n"
         self.runCmd("settings set frame-format %s" % format_string)
         self.expect("settings show frame-format", SETTING_MSG("frame-format"),
-            substrs = [format_string])
+                    substrs=[format_string])
 
         # Run to BP at main (in main.c) and test that the language is C.
         self.runCmd("breakpoint set -n main")
         self.runCmd("run")
         self.expect("thread backtrace",
-            substrs = ["`main", "lang=c"])
+                    substrs=["`main", "lang=c"])
         # Make sure evaluation of C++11 fails.
         self.expect("expr foo != nullptr", error=True,
-            startstr = "error")
+                    startstr="error")
 
         # Run to BP at foo (in foo.cpp) and test that the language is C++.
         self.runCmd("breakpoint set -n foo")
         self.runCmd("continue")
         self.expect("thread backtrace",
-            substrs = ["`::foo()", "lang=c++"])
+                    substrs=["`::foo()", "lang=c++"])
         # Make sure we can evaluate an expression requiring C++11
         # (note: C++11 is enabled by default for C++).
         self.expect("expr foo != nullptr",
-            patterns = ["true"])
+                    patterns=["true"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/bitfield_ivars/TestBitfieldIvars.py Tue Sep  6 15:57:50 2016
@@ -1,4 +1,12 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows, decorators.expectedFailureAll(bugnumber="rdar://problem/17990991")])
+lldbinline.MakeInlineTest(
+    __file__,
+    globals(),
+    [
+        decorators.skipIfFreeBSD,
+        decorators.skipIfLinux,
+        decorators.skipIfWindows,
+        decorators.expectedFailureAll(
+            bugnumber="rdar://problem/17990991")])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestObjCIvarsInBlocks(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,7 +25,9 @@ class TestObjCIvarsInBlocks(TestBase):
 
     @skipUnlessDarwin
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(archs=["i[3-6]86"], bugnumber="This test requires the 2.0 runtime, so it will fail on i386")
+    @expectedFailureAll(
+        archs=["i[3-6]86"],
+        bugnumber="This test requires the 2.0 runtime, so it will fail on i386")
     def test_with_python_api(self):
         """Test printing the ivars of the self when captured in blocks"""
         self.build()
@@ -33,72 +36,100 @@ class TestObjCIvarsInBlocks(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        breakpoint = target.BreakpointCreateBySourceRegex ('// Break here inside the block.', self.class_source_file_spec)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            '// Break here inside the block.', self.class_source_file_spec)
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
-        breakpoint_two = target.BreakpointCreateBySourceRegex ('// Break here inside the class method block.', self.class_source_file_spec)
+        breakpoint_two = target.BreakpointCreateBySourceRegex(
+            '// Break here inside the class method block.', self.class_source_file_spec)
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
-        self.assertTrue (process, "Created a process.")
-        self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped it too.")
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        self.assertTrue (len(thread_list) == 1)
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, "Created a process.")
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            "Stopped it too.")
+
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertTrue(len(thread_list) == 1)
         thread = thread_list[0]
-        
+
         frame = thread.GetFrameAtIndex(0)
-        self.assertTrue (frame, "frame 0 is valid")
-        
-        # First use the FindVariable API to see if we can find the ivar by undecorated name:
-        direct_blocky = frame.GetValueForVariablePath ("blocky_ivar")
+        self.assertTrue(frame, "frame 0 is valid")
+
+        # First use the FindVariable API to see if we can find the ivar by
+        # undecorated name:
+        direct_blocky = frame.GetValueForVariablePath("blocky_ivar")
         self.assertTrue(direct_blocky, "Found direct access to blocky_ivar.")
-        
-        # Now get it as a member of "self" and make sure the two values are equal:
-        self_var = frame.GetValueForVariablePath ("self")
-        self.assertTrue (self_var, "Found self in block.")
-        indirect_blocky = self_var.GetChildMemberWithName ("blocky_ivar")
-        self.assertTrue (indirect_blocky, "Found blocky_ivar through self")
-        
+
+        # Now get it as a member of "self" and make sure the two values are
+        # equal:
+        self_var = frame.GetValueForVariablePath("self")
+        self.assertTrue(self_var, "Found self in block.")
+        indirect_blocky = self_var.GetChildMemberWithName("blocky_ivar")
+        self.assertTrue(indirect_blocky, "Found blocky_ivar through self")
+
         error = lldb.SBError()
         direct_value = direct_blocky.GetValueAsSigned(error)
-        self.assertTrue (error.Success(), "Got direct value for blocky_ivar")
+        self.assertTrue(error.Success(), "Got direct value for blocky_ivar")
 
-        indirect_value = indirect_blocky.GetValueAsSigned (error)
-        self.assertTrue (error.Success(), "Got indirect value for blocky_ivar")
-        
-        self.assertTrue (direct_value == indirect_value, "Direct and indirect values are equal.")
+        indirect_value = indirect_blocky.GetValueAsSigned(error)
+        self.assertTrue(error.Success(), "Got indirect value for blocky_ivar")
 
-        # Now make sure that we can get at the captured ivar through the expression parser.
-        # Doing a little trivial math will force this into the real expression parser:
-        direct_expr = frame.EvaluateExpression ("blocky_ivar + 10")
-        self.assertTrue (direct_expr, "Got blocky_ivar through the expression parser")
-        
-        # Again, get the value through self directly and make sure they are the same:
-        indirect_expr = frame.EvaluateExpression ("self->blocky_ivar + 10")
-        self.assertTrue (indirect_expr, "Got blocky ivar through expression parser using self.")
-        
-        direct_value = direct_expr.GetValueAsSigned (error)
-        self.assertTrue (error.Success(), "Got value from direct use of expression parser")
-
-        indirect_value = indirect_expr.GetValueAsSigned (error)
-        self.assertTrue (error.Success(), "Got value from indirect access using the expression parser")
+        self.assertTrue(
+            direct_value == indirect_value,
+            "Direct and indirect values are equal.")
 
-        self.assertTrue (direct_value == indirect_value, "Direct ivar access and indirect through expression parser produce same value.")
+        # Now make sure that we can get at the captured ivar through the expression parser.
+        # Doing a little trivial math will force this into the real expression
+        # parser:
+        direct_expr = frame.EvaluateExpression("blocky_ivar + 10")
+        self.assertTrue(
+            direct_expr,
+            "Got blocky_ivar through the expression parser")
+
+        # Again, get the value through self directly and make sure they are the
+        # same:
+        indirect_expr = frame.EvaluateExpression("self->blocky_ivar + 10")
+        self.assertTrue(
+            indirect_expr,
+            "Got blocky ivar through expression parser using self.")
+
+        direct_value = direct_expr.GetValueAsSigned(error)
+        self.assertTrue(
+            error.Success(),
+            "Got value from direct use of expression parser")
+
+        indirect_value = indirect_expr.GetValueAsSigned(error)
+        self.assertTrue(
+            error.Success(),
+            "Got value from indirect access using the expression parser")
+
+        self.assertTrue(
+            direct_value == indirect_value,
+            "Direct ivar access and indirect through expression parser produce same value.")
 
         process.Continue()
-        self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped at the second breakpoint.")
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint_two)
-        self.assertTrue (len(thread_list) == 1)
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            "Stopped at the second breakpoint.")
+
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint_two)
+        self.assertTrue(len(thread_list) == 1)
         thread = thread_list[0]
-        
+
         frame = thread.GetFrameAtIndex(0)
-        self.assertTrue (frame, "frame 0 is valid")
-        
+        self.assertTrue(frame, "frame 0 is valid")
+
         expr = frame.EvaluateExpression("(ret)")
-        self.assertTrue (expr, "Successfully got a local variable in a block in a class method.")
+        self.assertTrue(
+            expr, "Successfully got a local variable in a block in a class method.")
 
-        ret_value_signed = expr.GetValueAsSigned (error)
+        ret_value_signed = expr.GetValueAsSigned(error)
         # print('ret_value_signed = %i' % (ret_value_signed))
-        self.assertTrue (ret_value_signed == 5, "The local variable in the block was what we expected.")
+        self.assertTrue(
+            ret_value_signed == 5,
+            "The local variable in the block was what we expected.")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ForwardDeclTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,7 +26,7 @@ class ForwardDeclTestCase(TestBase):
     @skipUnlessDarwin
     def test_expr(self):
         self.build()
-        
+
         # Create a target by the debugger.
         target = self.dbg.CreateTarget("a.out")
         self.assertTrue(target, VALID_TARGET)
@@ -33,23 +34,26 @@ class ForwardDeclTestCase(TestBase):
         # Create the breakpoint inside function 'main'.
         breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        
-        # Register our shared libraries for remote targets so they get automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(target, self.shlib_names)
+
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
+        environment = self.registerSharedLibrariesWithTarget(
+            target, self.shlib_names)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         # This should display correctly.
         self.expect("expression [j getMember]", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 0x"])
+                    substrs=["= 0x"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py Tue Sep  6 15:57:50 2016
@@ -6,13 +6,14 @@ parser.
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ConstStringTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -30,25 +31,30 @@ class ConstStringTestCase(TestBase):
         """Test constant string generation amd comparison by the expression parser."""
         self.build(dictionary=self.d)
         self.setTearDownCleanup(self.d)
-        
+
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            self.main_source,
+            self.line,
+            num_expected_locations=1,
+            loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
         self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = [" at %s:%d" % (self.main_source, self.line),
-                       "stop reason = breakpoint"])
+                    substrs=[" at %s:%d" % (self.main_source, self.line),
+                             "stop reason = breakpoint"])
 
         self.expect('expression (int)[str compare:@"hello"]',
-            startstr = "(int) $0 = 0")
+                    startstr="(int) $0 = 0")
         self.expect('expression (int)[str compare:@"world"]',
-            startstr = "(int) $1 = -1")
+                    startstr="(int) $1 = -1")
 
         # Test empty strings, too.
         self.expect('expression (int)[@"" length]',
-            startstr = "(int) $2 = 0")
+                    startstr="(int) $2 = 0")
 
         self.expect('expression (int)[@"123" length]',
-            startstr = "(int) $3 = 3")
+                    startstr="(int) $3 = 3")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test the lldb disassemble command on fou
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 @skipUnlessDarwin
 class FoundationDisassembleTestCase(TestBase):
 
@@ -20,20 +21,23 @@ class FoundationDisassembleTestCase(Test
 
     # rdar://problem/8504895
     # Crash while doing 'disassemble -n "-[NSNumber descriptionWithLocale:]"
-    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test")
+    @unittest2.skipIf(
+        TestBase.skipLongRunningTest(),
+        "Skip this long running test")
     def test_foundation_disasm(self):
         """Do 'disassemble -n func' on each and every 'Code' symbol entry from the Foundation.framework."""
         self.build()
-        
+
         # Enable synchronous mode
         self.dbg.SetAsync(False)
-        
+
         # Create a target by the debugger.
         target = self.dbg.CreateTarget("a.out")
         self.assertTrue(target, VALID_TARGET)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
 
         foundation_framework = None
@@ -43,7 +47,9 @@ class FoundationDisassembleTestCase(Test
                 foundation_framework = module.file.fullpath
                 break
 
-        self.assertTrue(foundation_framework != None, "Foundation.framework path located")
+        self.assertTrue(
+            foundation_framework is not None,
+            "Foundation.framework path located")
         self.runCmd("image dump symtab '%s'" % foundation_framework)
         raw_output = self.res.GetOutput()
         # Now, grab every 'Code' symbol and feed it into the command:
@@ -64,7 +70,6 @@ class FoundationDisassembleTestCase(Test
                 #print("line:", line)
                 #print("func:", func)
                 self.runCmd('disassemble -n "%s"' % func)
-        
 
     def test_simple_disasm(self):
         """Test the lldb 'disassemble' command"""
@@ -80,25 +85,45 @@ class FoundationDisassembleTestCase(Test
 
         # Stop at +[NSString stringWithFormat:].
         symbol_name = "+[NSString stringWithFormat:]"
-        break_results = lldbutil.run_break_set_command (self, "_regexp-break %s"%(symbol_name))
-        
-        lldbutil.check_breakpoint_result (self, break_results, symbol_name=symbol_name, num_locations=1)
+        break_results = lldbutil.run_break_set_command(
+            self, "_regexp-break %s" % (symbol_name))
+
+        lldbutil.check_breakpoint_result(
+            self,
+            break_results,
+            symbol_name=symbol_name,
+            num_locations=1)
 
         # Stop at -[MyString initWithNSString:].
-        lldbutil.run_break_set_by_symbol (self, '-[MyString initWithNSString:]', num_expected_locations=1, sym_exact=True)
+        lldbutil.run_break_set_by_symbol(
+            self,
+            '-[MyString initWithNSString:]',
+            num_expected_locations=1,
+            sym_exact=True)
 
         # Stop at the "description" selector.
-        lldbutil.run_break_set_by_selector (self, 'description', num_expected_locations=1, module_name='a.out')
+        lldbutil.run_break_set_by_selector(
+            self,
+            'description',
+            num_expected_locations=1,
+            module_name='a.out')
 
         # Stop at -[NSAutoreleasePool release].
-        break_results = lldbutil.run_break_set_command (self, "_regexp-break -[NSAutoreleasePool release]")
-        lldbutil.check_breakpoint_result (self, break_results, symbol_name='-[NSAutoreleasePool release]', num_locations=1)
+        break_results = lldbutil.run_break_set_command(
+            self, "_regexp-break -[NSAutoreleasePool release]")
+        lldbutil.check_breakpoint_result(
+            self,
+            break_results,
+            symbol_name='-[NSAutoreleasePool release]',
+            num_locations=1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # First stop is +[NSString stringWithFormat:].
-        self.expect("thread backtrace", "Stop at +[NSString stringWithFormat:]",
-            substrs = ["Foundation`+[NSString stringWithFormat:]"])
+        self.expect(
+            "thread backtrace",
+            "Stop at +[NSString stringWithFormat:]",
+            substrs=["Foundation`+[NSString stringWithFormat:]"])
 
         # Do the disassemble for the currently stopped function.
         self.runCmd("disassemble -f")
@@ -108,8 +133,10 @@ class FoundationDisassembleTestCase(Test
         self.runCmd("process continue")
 
         # Followed by a.out`-[MyString initWithNSString:].
-        self.expect("thread backtrace", "Stop at a.out`-[MyString initWithNSString:]",
-            substrs = ["a.out`-[MyString initWithNSString:]"])
+        self.expect(
+            "thread backtrace",
+            "Stop at a.out`-[MyString initWithNSString:]",
+            substrs=["a.out`-[MyString initWithNSString:]"])
 
         # Do the disassemble for the currently stopped function.
         self.runCmd("disassemble -f")
@@ -118,7 +145,7 @@ class FoundationDisassembleTestCase(Test
 
         # Followed by -[MyString description].
         self.expect("thread backtrace", "Stop at -[MyString description]",
-            substrs = ["a.out`-[MyString description]"])
+                    substrs=["a.out`-[MyString description]"])
 
         # Do the disassemble for the currently stopped function.
         self.runCmd("disassemble -f")
@@ -129,7 +156,7 @@ class FoundationDisassembleTestCase(Test
 
         # Followed by -[NSAutoreleasePool release].
         self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
-            substrs = ["Foundation`-[NSAutoreleasePool release]"])
+                    substrs=["Foundation`-[NSAutoreleasePool release]"])
 
         # Do the disassemble for the currently stopped function.
         self.runCmd("disassemble -f")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py Tue Sep  6 15:57:50 2016
@@ -6,8 +6,9 @@ Also lookup objective-c data types and e
 from __future__ import print_function
 
 
-
-import os, os.path, time
+import os
+import os.path
+import time
 import lldb
 import string
 from lldbsuite.test.decorators import *
@@ -15,6 +16,8 @@ from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
 file_index = 0
+
+
 @skipUnlessDarwin
 class FoundationTestCase(TestBase):
 
@@ -25,7 +28,9 @@ class FoundationTestCase(TestBase):
         TestBase.setUp(self)
         # Find the line number to break inside main().
         self.main_source = "main.m"
-        self.line = line_number(self.main_source, '// Set break point at this line.')
+        self.line = line_number(
+            self.main_source,
+            '// Set break point at this line.')
 
     def test_break(self):
         """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
@@ -34,54 +39,78 @@ class FoundationTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Stop at +[NSString stringWithFormat:].
-        break_results = lldbutil.run_break_set_command(self, "_regexp-break +[NSString stringWithFormat:]")
-        lldbutil.check_breakpoint_result (self, break_results, symbol_name='+[NSString stringWithFormat:]', num_locations=1)
+        break_results = lldbutil.run_break_set_command(
+            self, "_regexp-break +[NSString stringWithFormat:]")
+        lldbutil.check_breakpoint_result(
+            self,
+            break_results,
+            symbol_name='+[NSString stringWithFormat:]',
+            num_locations=1)
 
         # Stop at -[MyString initWithNSString:].
-        lldbutil.run_break_set_by_symbol (self, '-[MyString initWithNSString:]', num_expected_locations=1, sym_exact=True)
+        lldbutil.run_break_set_by_symbol(
+            self,
+            '-[MyString initWithNSString:]',
+            num_expected_locations=1,
+            sym_exact=True)
 
         # Stop at the "description" selector.
-        lldbutil.run_break_set_by_selector (self, 'description', num_expected_locations=1, module_name='a.out')
+        lldbutil.run_break_set_by_selector(
+            self,
+            'description',
+            num_expected_locations=1,
+            module_name='a.out')
 
         # Stop at -[NSAutoreleasePool release].
-        break_results = lldbutil.run_break_set_command(self, "_regexp-break -[NSAutoreleasePool release]")
-        lldbutil.check_breakpoint_result (self, break_results, symbol_name='-[NSAutoreleasePool release]', num_locations=1)
+        break_results = lldbutil.run_break_set_command(
+            self, "_regexp-break -[NSAutoreleasePool release]")
+        lldbutil.check_breakpoint_result(
+            self,
+            break_results,
+            symbol_name='-[NSAutoreleasePool release]',
+            num_locations=1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # First stop is +[NSString stringWithFormat:].
-        self.expect("thread backtrace", "Stop at +[NSString stringWithFormat:]",
-            substrs = ["Foundation`+[NSString stringWithFormat:]"])
+        self.expect(
+            "thread backtrace",
+            "Stop at +[NSString stringWithFormat:]",
+            substrs=["Foundation`+[NSString stringWithFormat:]"])
 
         self.runCmd("process continue")
 
         # Second stop is still +[NSString stringWithFormat:].
-        self.expect("thread backtrace", "Stop at +[NSString stringWithFormat:]",
-            substrs = ["Foundation`+[NSString stringWithFormat:]"])
+        self.expect(
+            "thread backtrace",
+            "Stop at +[NSString stringWithFormat:]",
+            substrs=["Foundation`+[NSString stringWithFormat:]"])
 
         self.runCmd("process continue")
 
         # Followed by a.out`-[MyString initWithNSString:].
-        self.expect("thread backtrace", "Stop at a.out`-[MyString initWithNSString:]",
-            substrs = ["a.out`-[MyString initWithNSString:]"])
+        self.expect(
+            "thread backtrace",
+            "Stop at a.out`-[MyString initWithNSString:]",
+            substrs=["a.out`-[MyString initWithNSString:]"])
 
         self.runCmd("process continue")
 
         # Followed by -[MyString description].
         self.expect("thread backtrace", "Stop at -[MyString description]",
-            substrs = ["a.out`-[MyString description]"])
+                    substrs=["a.out`-[MyString description]"])
 
         self.runCmd("process continue")
 
         # Followed by the same -[MyString description].
         self.expect("thread backtrace", "Stop at -[MyString description]",
-            substrs = ["a.out`-[MyString description]"])
+                    substrs=["a.out`-[MyString description]"])
 
         self.runCmd("process continue")
 
         # Followed by -[NSAutoreleasePool release].
         self.expect("thread backtrace", "Stop at -[NSAutoreleasePool release]",
-            substrs = ["Foundation`-[NSAutoreleasePool release]"])
+                    substrs=["Foundation`-[NSAutoreleasePool release]"])
 
     # rdar://problem/8542091
     # rdar://problem/8492646
@@ -92,32 +121,40 @@ class FoundationTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Stop at -[MyString description].
-        lldbutil.run_break_set_by_symbol (self, '-[MyString description]', num_expected_locations=1, sym_exact=True)
+        lldbutil.run_break_set_by_symbol(
+            self,
+            '-[MyString description]',
+            num_expected_locations=1,
+            sym_exact=True)
 #        self.expect("breakpoint set -n '-[MyString description]", BREAKPOINT_CREATED,
-#            startstr = "Breakpoint created: 1: name = '-[MyString description]', locations = 1")
+# startstr = "Breakpoint created: 1: name = '-[MyString description]',
+# locations = 1")
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The backtrace should show we stop at -[MyString description].
         self.expect("thread backtrace", "Stop at -[MyString description]",
-            substrs = ["a.out`-[MyString description]"])
+                    substrs=["a.out`-[MyString description]"])
 
         # Lookup objc data type MyString and evaluate some expressions.
 
         self.expect("image lookup -t NSString", DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs = ['name = "NSString"',
-                       'compiler_type = "@interface NSString'])
+                    substrs=['name = "NSString"',
+                             'compiler_type = "@interface NSString'])
 
         self.expect("image lookup -t MyString", DATA_TYPES_DISPLAYED_CORRECTLY,
-            substrs = ['name = "MyString"',
-                       'compiler_type = "@interface MyString',
-                       'NSString * str;',
-                       'NSDate * date;'])
-
-        self.expect("frame variable --show-types --scope", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["ARG: (MyString *) self"],
-            patterns = ["ARG: \(.*\) _cmd",
-                        "(objc_selector *)|(SEL)"])
+                    substrs=['name = "MyString"',
+                             'compiler_type = "@interface MyString',
+                             'NSString * str;',
+                             'NSDate * date;'])
+
+        self.expect(
+            "frame variable --show-types --scope",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=["ARG: (MyString *) self"],
+            patterns=[
+                "ARG: \(.*\) _cmd",
+                "(objc_selector *)|(SEL)"])
 
         # rdar://problem/8651752
         # don't crash trying to ask clang how many children an empty record has
@@ -126,28 +163,37 @@ class FoundationTestCase(TestBase):
         # rdar://problem/8492646
         # test/foundation fails after updating to tot r115023
         # self->str displays nothing as output
-        self.expect("frame variable --show-types self->str", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(NSString *) self->str")
+        self.expect(
+            "frame variable --show-types self->str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(NSString *) self->str")
 
         # rdar://problem/8447030
         # 'frame variable self->date' displays the wrong data member
-        self.expect("frame variable --show-types self->date", VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(NSDate *) self->date")
+        self.expect(
+            "frame variable --show-types self->date",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            startstr="(NSDate *) self->date")
 
         # This should display the str and date member fields as well.
-        self.expect("frame variable --show-types *self", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(MyString) *self",
-                       "(NSString *) str",
-                       "(NSDate *) date"])
-        
+        self.expect(
+            "frame variable --show-types *self",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "(MyString) *self",
+                "(NSString *) str",
+                "(NSDate *) date"])
+
         # isa should be accessible.
         self.expect("expression self->isa", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["(Class)"])
+                    substrs=["(Class)"])
 
         # This should fail expectedly.
-        self.expect("expression self->non_existent_member",
-                    COMMAND_FAILED_AS_EXPECTED, error=True,
-            startstr = "error: 'MyString' does not have a member named 'non_existent_member'")
+        self.expect(
+            "expression self->non_existent_member",
+            COMMAND_FAILED_AS_EXPECTED,
+            error=True,
+            startstr="error: 'MyString' does not have a member named 'non_existent_member'")
 
         # Use expression parser.
         self.runCmd("expression self->str")
@@ -163,7 +209,8 @@ class FoundationTestCase(TestBase):
         #
 
         self.runCmd("breakpoint delete 1")
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("process continue")
 
@@ -171,12 +218,15 @@ class FoundationTestCase(TestBase):
         # test/foundation: expr -o -- my not working?
         #
         # Test new feature with r115115:
-        # Add "-o" option to "expression" which prints the object description if available.
-        self.expect("expression --object-description -- my", "Object description displayed correctly",
-            patterns = ["Hello from.*a.out.*with timestamp: "])
+        # Add "-o" option to "expression" which prints the object description
+        # if available.
+        self.expect(
+            "expression --object-description -- my",
+            "Object description displayed correctly",
+            patterns=["Hello from.*a.out.*with timestamp: "])
 
     @add_test_categories(['pyapi'])
-    def test_print_ivars_correctly (self):
+    def test_print_ivars_correctly(self):
         self.build()
         # See: <rdar://problem/8717050> lldb needs to use the ObjC runtime symbols for ivar offsets
         # Only fails for the ObjC 2.0 runtime.
@@ -189,7 +239,8 @@ class FoundationTestCase(TestBase):
         self.assertTrue(break1, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
@@ -205,7 +256,7 @@ class FoundationTestCase(TestBase):
         cur_frame = thread.GetFrameAtIndex(0)
 
         line_number = cur_frame.GetLineEntry().GetLine()
-        self.assertTrue (line_number == self.line, "Hit the first breakpoint.")
+        self.assertTrue(line_number == self.line, "Hit the first breakpoint.")
 
         my_var = cur_frame.FindVariable("my")
         self.assertTrue(my_var, "Made a variable object for my")
@@ -222,7 +273,9 @@ class FoundationTestCase(TestBase):
 
         my_str_value = int(my_str_var.GetValue(), 0)
 
-        self.assertTrue(str_value == my_str_value, "Got the correct value for my->str")
+        self.assertTrue(
+            str_value == my_str_value,
+            "Got the correct value for my->str")
 
     def test_expression_lookups_objc(self):
         """Test running an expression detect spurious debug info lookups (DWARF)."""
@@ -231,32 +284,43 @@ class FoundationTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Stop at -[MyString initWithNSString:].
-        lldbutil.run_break_set_by_symbol (self, '-[MyString initWithNSString:]', num_expected_locations=1, sym_exact=True)
+        lldbutil.run_break_set_by_symbol(
+            self,
+            '-[MyString initWithNSString:]',
+            num_expected_locations=1,
+            sym_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         global file_index
         # Log any DWARF lookups
         ++file_index
-        logfile = os.path.join(os.getcwd(), "dwarf-lookups-" + self.getArchitecture() + "-" + str(file_index) + ".txt")
+        logfile = os.path.join(
+            os.getcwd(),
+            "dwarf-lookups-" +
+            self.getArchitecture() +
+            "-" +
+            str(file_index) +
+            ".txt")
         self.runCmd("log enable -f %s dwarf lookups" % (logfile))
         self.runCmd("expr self")
         self.runCmd("log disable dwarf lookups")
-        
+
         def cleanup():
-            if os.path.exists (logfile):
-                os.unlink (logfile)
-        
+            if os.path.exists(logfile):
+                os.unlink(logfile)
+
         self.addTearDownHook(cleanup)
-        
-        if os.path.exists (logfile):
+
+        if os.path.exists(logfile):
             f = open(logfile)
             lines = f.readlines()
             num_errors = 0
             for line in lines:
                 if string.find(line, "$__lldb") != -1:
                     if num_errors == 0:
-                        print("error: found spurious name lookups when evaluating an expression:")
+                        print(
+                            "error: found spurious name lookups when evaluating an expression:")
                     num_errors += 1
                     print(line, end='')
             self.assertTrue(num_errors == 0, "Spurious lookups detected")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py Tue Sep  6 15:57:50 2016
@@ -5,28 +5,44 @@ Test more expression command sequences w
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 @skipUnlessDarwin
 class FoundationTestCase2(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
-    
+
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line numbers to break at.
         self.lines = []
-        self.lines.append(line_number('main.m', '// Break here for selector: tests'))
-        self.lines.append(line_number('main.m', '// Break here for NSArray tests'))
-        self.lines.append(line_number('main.m', '// Break here for NSString tests'))
-        self.lines.append(line_number('main.m', '// Break here for description test'))
-        self.lines.append(line_number('main.m', '// Set break point at this line'))
+        self.lines.append(
+            line_number(
+                'main.m',
+                '// Break here for selector: tests'))
+        self.lines.append(
+            line_number(
+                'main.m',
+                '// Break here for NSArray tests'))
+        self.lines.append(
+            line_number(
+                'main.m',
+                '// Break here for NSString tests'))
+        self.lines.append(
+            line_number(
+                'main.m',
+                '// Break here for description test'))
+        self.lines.append(
+            line_number(
+                'main.m',
+                '// Set break point at this line'))
 
     def test_more_expr_commands(self):
         """More expression commands for objective-c."""
@@ -36,15 +52,16 @@ class FoundationTestCase2(TestBase):
 
         # Create a bunch of breakpoints.
         for line in self.lines:
-            lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+            lldbutil.run_break_set_by_file_and_line(
+                self, "main.m", line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Test_Selector:
         self.runCmd("thread backtrace")
         self.expect("expression (char *)sel_getName(sel)",
-            substrs = ["(char *)",
-                       "length"])
+                    substrs=["(char *)",
+                             "length"])
 
         self.runCmd("process continue")
 
@@ -59,8 +76,8 @@ class FoundationTestCase2(TestBase):
         # Test_MyString:
         self.runCmd("thread backtrace")
         self.expect("expression (char *)sel_getName(_cmd)",
-            substrs = ["(char *)",
-                       "description"])
+                    substrs=["(char *)",
+                             "description"])
 
         self.runCmd("process continue")
 
@@ -72,25 +89,29 @@ class FoundationTestCase2(TestBase):
 
         # Break inside Test_NSArray:
         line = self.lines[1]
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Test_NSArray:
         self.runCmd("thread backtrace")
         self.expect("expression (int)[nil_mutable_array count]",
-            patterns = ["\(int\) \$.* = 0"])
+                    patterns=["\(int\) \$.* = 0"])
         self.expect("expression (int)[array1 count]",
-            patterns = ["\(int\) \$.* = 3"])
+                    patterns=["\(int\) \$.* = 3"])
         self.expect("expression (int)[array2 count]",
-            patterns = ["\(int\) \$.* = 3"])
+                    patterns=["\(int\) \$.* = 3"])
         self.expect("expression (int)array1.count",
-            patterns = ["\(int\) \$.* = 3"])
+                    patterns=["\(int\) \$.* = 3"])
         self.expect("expression (int)array2.count",
-            patterns = ["\(int\) \$.* = 3"])
+                    patterns=["\(int\) \$.* = 3"])
         self.runCmd("process continue")
 
-    @expectedFailureAll(oslist=["macosx"], debug_info="gmodules", bugnumber="llvm.org/pr27861")
+    @expectedFailureAll(
+        oslist=["macosx"],
+        debug_info="gmodules",
+        bugnumber="llvm.org/pr27861")
     def test_NSString_expr_commands(self):
         """Test expression commands for NSString."""
         self.build()
@@ -99,20 +120,21 @@ class FoundationTestCase2(TestBase):
 
         # Break inside Test_NSString:
         line = self.lines[2]
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # Test_NSString:
         self.runCmd("thread backtrace")
         self.expect("expression (int)[str length]",
-            patterns = ["\(int\) \$.* ="])
+                    patterns=["\(int\) \$.* ="])
         self.expect("expression (int)[str_id length]",
-            patterns = ["\(int\) \$.* ="])
+                    patterns=["\(int\) \$.* ="])
         self.expect("expression [str description]",
-            patterns = ["\(id\) \$.* = 0x"])
+                    patterns=["\(id\) \$.* = 0x"])
         self.expect("expression (id)[str_id description]",
-            patterns = ["\(id\) \$.* = 0x"])
+                    patterns=["\(id\) \$.* = 0x"])
         self.expect("expression str.length")
         self.expect("expression str.description")
         self.expect('expression str = @"new"')
@@ -125,15 +147,21 @@ class FoundationTestCase2(TestBase):
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        
+
         line = self.lines[4]
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
-        
-        self.expect("expression --show-types -- *my",
-            patterns = ["\(MyString\) \$.* = ", "\(MyBase\)", "\(NSObject\)", "\(Class\)"])
+
+        self.expect(
+            "expression --show-types -- *my",
+            patterns=[
+                "\(MyString\) \$.* = ",
+                "\(MyBase\)",
+                "\(NSObject\)",
+                "\(Class\)"])
         self.runCmd("process continue")
 
     @expectedFailureAll(archs=["i[3-6]86"])
@@ -142,30 +170,35 @@ class FoundationTestCase2(TestBase):
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        
+
         line = self.lines[4]
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
-        self.expect('po [NSError errorWithDomain:@"Hello" code:35 userInfo:@{@"NSDescription" : @"be completed."}]',
-            substrs = ["Error Domain=Hello", "Code=35", "be completed."])
+        self.expect(
+            'po [NSError errorWithDomain:@"Hello" code:35 userInfo:@{@"NSDescription" : @"be completed."}]',
+            substrs=[
+                "Error Domain=Hello",
+                "Code=35",
+                "be completed."])
         self.runCmd("process continue")
-        
+
     def test_NSError_p(self):
         """Test that p of the result of an unknown method does require a cast."""
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        
+
         line = self.lines[4]
 
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
-        self.expect("p [NSError thisMethodIsntImplemented:0]",
-                    error = True, 
-                    patterns = ["no known method", "cast the message send to the method's return type"])
+        self.expect("p [NSError thisMethodIsntImplemented:0]", error=True, patterns=[
+                    "no known method", "cast the message send to the method's return type"])
         self.runCmd("process continue")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py Tue Sep  6 15:57:50 2016
@@ -5,14 +5,15 @@ Test SBValue.GetObjectDescription() with
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ObjectDescriptionAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -22,7 +23,8 @@ class ObjectDescriptionAPITestCase(TestB
         TestBase.setUp(self)
         # Find the line number to break at.
         self.source = 'main.m'
-        self.line = line_number(self.source, '// Set break point at this line.')
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
 
     # rdar://problem/10857337
     @skipUnlessDarwin
@@ -42,11 +44,13 @@ class ObjectDescriptionAPITestCase(TestB
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
         # Make sure we hit our breakpoint:
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        self.assertTrue (len(thread_list) == 1)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertTrue(len(thread_list) == 1)
 
         thread = thread_list[0]
         frame0 = thread.GetFrameAtIndex(0)
@@ -59,7 +63,8 @@ class ObjectDescriptionAPITestCase(TestB
                 print("val:", v)
                 print("object description:", v.GetObjectDescription())
             if v.GetName() == 'my_global_str':
-                self.assertTrue(v.GetObjectDescription() == 'This is a global string')
+                self.assertTrue(v.GetObjectDescription() ==
+                                'This is a global string')
 
         # But not here!
         value_list2 = target.FindGlobalVariables('my_global_str', 3)
@@ -69,4 +74,5 @@ class ObjectDescriptionAPITestCase(TestB
                 print("val:", v)
                 print("object description:", v.GetObjectDescription())
             if v.GetName() == 'my_global_str':
-                self.assertTrue(v.GetObjectDescription() == 'This is a global string')
+                self.assertTrue(v.GetObjectDescription() ==
+                                'This is a global string')

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py Tue Sep  6 15:57:50 2016
@@ -5,19 +5,23 @@ Test that Objective-C methods from the r
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 @skipUnlessDarwin
 class RuntimeTypesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["macosx"], debug_info="gmodules", bugnumber="llvm.org/pr27862")
+    @expectedFailureAll(
+        oslist=["macosx"],
+        debug_info="gmodules",
+        bugnumber="llvm.org/pr27862")
     def test_break(self):
         """Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
         if self.getArchitecture() != 'x86_64':
@@ -28,23 +32,31 @@ class RuntimeTypesTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Stop at -[MyString description].
-        lldbutil.run_break_set_by_symbol (self, '-[MyString description]', num_expected_locations=1, sym_exact=True)
+        lldbutil.run_break_set_by_symbol(
+            self,
+            '-[MyString description]',
+            num_expected_locations=1,
+            sym_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The backtrace should show we stop at -[MyString description].
         self.expect("thread backtrace", "Stop at -[MyString description]",
-            substrs = ["a.out`-[MyString description]"])
+                    substrs=["a.out`-[MyString description]"])
 
         # Use runtime information about NSString.
 
         # The length property should be usable.
         self.expect("expression str.length", VARIABLES_DISPLAYED_CORRECTLY,
-            patterns = [r"(\(unsigned long long\))|\(NSUInteger\)"])
+                    patterns=[r"(\(unsigned long long\))|\(NSUInteger\)"])
 
         # Static methods on NSString should work.
-        self.expect("expr [NSString stringWithCString:\"foo\" encoding:1]", VALID_TYPE,
-            substrs = ["(id)", "$1"])
+        self.expect(
+            "expr [NSString stringWithCString:\"foo\" encoding:1]",
+            VALID_TYPE,
+            substrs=[
+                "(id)",
+                "$1"])
 
         self.expect("po $1", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["foo"])
+                    substrs=["foo"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py Tue Sep  6 15:57:50 2016
@@ -5,7 +5,6 @@ Test symbol table access for main.m.
 from __future__ import print_function
 
 
-
 import os
 import time
 
@@ -14,6 +13,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 @skipUnlessDarwin
 class FoundationSymtabTestCase(TestBase):
 
@@ -23,7 +23,8 @@ class FoundationSymtabTestCase(TestBase)
                     '-[MyString dealloc]',
                     '-[MyString description]',
                     '-[MyString descriptionPauses]',     # synthesized property
-                    '-[MyString setDescriptionPauses:]', # synthesized property
+                    # synthesized property
+                    '-[MyString setDescriptionPauses:]',
                     'Test_Selector',
                     'Test_NSString',
                     'Test_MyString',
@@ -42,7 +43,8 @@ class FoundationSymtabTestCase(TestBase)
         self.assertTrue(target, VALID_TARGET)
 
         # Launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         #
         # Exercise Python APIs to access the symbol table entries.

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestObjCGlobalVar(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -29,26 +30,31 @@ class TestObjCGlobalVar(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        bkpt = target.BreakpointCreateBySourceRegex ('NSLog', self.main_source)
+        bkpt = target.BreakpointCreateBySourceRegex('NSLog', self.main_source)
         self.assertTrue(bkpt, VALID_BREAKPOINT)
 
         # Before we launch, make an SBValue for our global object pointer:
         g_obj_ptr = target.FindFirstGlobalVariable("g_obj_ptr")
         self.assertTrue(g_obj_ptr.GetError().Success(), "Made the g_obj_ptr")
-        self.assertTrue(g_obj_ptr.GetValueAsUnsigned(10) == 0, "g_obj_ptr is initially null")
+        self.assertTrue(
+            g_obj_ptr.GetValueAsUnsigned(10) == 0,
+            "g_obj_ptr is initially null")
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, bkpt)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
         if len(threads) != 1:
-            self.fail ("Failed to stop at breakpoint 1.")
+            self.fail("Failed to stop at breakpoint 1.")
 
         thread = threads[0]
 
         dyn_value = g_obj_ptr.GetDynamicValue(lldb.eDynamicCanRunTarget)
-        self.assertTrue(dyn_value.GetError().Success(), "Dynamic value is valid")
+        self.assertTrue(
+            dyn_value.GetError().Success(),
+            "Dynamic value is valid")
         self.assertTrue(dyn_value.GetObjectDescription() == "Some NSString")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py Tue Sep  6 15:57:50 2016
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-
 import unittest2
 import os
 import subprocess
@@ -14,6 +13,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class HiddenIvarsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -25,11 +25,14 @@ class HiddenIvarsTestCase(TestBase):
         self.source = 'main.m'
         self.line = line_number(self.source, '// breakpoint1')
         # The makefile names of the shared libraries as they appear in DYLIB_NAME.
-        # The names should have no loading "lib" or extension as they will be localized
+        # The names should have no loading "lib" or extension as they will be
+        # localized
         self.shlib_names = ["InternalDefiner"]
 
     @skipUnlessDarwin
-    @skipIf(debug_info=no_match("dsym"), bugnumber="This test requires a stripped binary and a dSYM")
+    @skipIf(
+        debug_info=no_match("dsym"),
+        bugnumber="This test requires a stripped binary and a dSYM")
     def test_expr_stripped(self):
         if self.getArchitecture() == 'i386':
             self.skipTest("requires modern objc runtime")
@@ -46,7 +49,9 @@ class HiddenIvarsTestCase(TestBase):
             self.expr(False)
 
     @skipUnlessDarwin
-    @skipIf(debug_info=no_match("dsym"), bugnumber="This test requires a stripped binary and a dSYM")
+    @skipIf(
+        debug_info=no_match("dsym"),
+        bugnumber="This test requires a stripped binary and a dSYM")
     def test_frame_variable_stripped(self):
         if self.getArchitecture() == 'i386':
             self.skipTest("requires modern objc runtime")
@@ -70,14 +75,22 @@ class HiddenIvarsTestCase(TestBase):
         else:
             self.build()
             self.common_setup(False)
-            self.expect("frame variable k->bar", VARIABLES_DISPLAYED_CORRECTLY, substrs = ["= 3"])
-        
+            self.expect(
+                "frame variable k->bar",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=["= 3"])
+
     def common_setup(self, strip):
-        
+
         if strip:
-            self.assertTrue(subprocess.call(['/usr/bin/strip', '-Sx', 'libInternalDefiner.dylib']) == 0, 'stripping dylib succeeded')
-            self.assertTrue(subprocess.call(['/bin/rm', '-rf', 'libInternalDefiner.dylib.dSYM']) == 0, 'remove dylib dSYM file succeeded')
-            self.assertTrue(subprocess.call(['/usr/bin/strip', '-Sx', 'a.out']) == 0, 'stripping a.out succeeded')
+            self.assertTrue(subprocess.call(
+                ['/usr/bin/strip', '-Sx', 'libInternalDefiner.dylib']) == 0, 'stripping dylib succeeded')
+            self.assertTrue(subprocess.call(['/bin/rm',
+                                             '-rf',
+                                             'libInternalDefiner.dylib.dSYM']) == 0,
+                            'remove dylib dSYM file succeeded')
+            self.assertTrue(subprocess.call(
+                ['/usr/bin/strip', '-Sx', 'a.out']) == 0, 'stripping a.out succeeded')
         # Create a target by the debugger.
         target = self.dbg.CreateTarget("a.out")
         self.assertTrue(target, VALID_TARGET)
@@ -85,91 +98,140 @@ class HiddenIvarsTestCase(TestBase):
         # Create the breakpoint inside function 'main'.
         breakpoint = target.BreakpointCreateByLocation(self.source, self.line)
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
-        
-        # Register our shared libraries for remote targets so they get automatically uploaded
-        environment = self.registerSharedLibrariesWithTarget(target, self.shlib_names)
+
+        # Register our shared libraries for remote targets so they get
+        # automatically uploaded
+        environment = self.registerSharedLibrariesWithTarget(
+            target, self.shlib_names)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, environment, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, environment, self.get_process_working_directory())
         self.assertTrue(process, PROCESS_IS_VALID)
-        
+
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
     def expr(self, strip):
         self.common_setup(strip)
 
         # This should display correctly.
-        self.expect("expression (j->_definer->foo)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 4"])
-
-        self.expect("expression (j->_definer->bar)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 5"])
+        self.expect(
+            "expression (j->_definer->foo)",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=["= 4"])
+
+        self.expect(
+            "expression (j->_definer->bar)",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=["= 5"])
 
         if strip:
-            self.expect("expression *(j->_definer)", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 4"])
-        else:
-            self.expect("expression *(j->_definer)", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 4", "bar = 5"])
+            self.expect(
+                "expression *(j->_definer)",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=["foo = 4"])
+        else:
+            self.expect(
+                "expression *(j->_definer)",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=[
+                    "foo = 4",
+                    "bar = 5"])
 
         self.expect("expression (k->foo)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 2"])
+                    substrs=["= 2"])
 
         self.expect("expression (k->bar)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 3"])
+                    substrs=["= 3"])
 
-        self.expect("expression k.filteredDataSource", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = [' = 0x', '"2 elements"'])
+        self.expect(
+            "expression k.filteredDataSource",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                ' = 0x',
+                '"2 elements"'])
 
         if strip:
             self.expect("expression *(k)", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 2", ' = 0x', '"2 elements"'])
-        else:            
-            self.expect("expression *(k)", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 2", "bar = 3", '_filteredDataSource = 0x', '"2 elements"'])
+                        substrs=["foo = 2", ' = 0x', '"2 elements"'])
+        else:
+            self.expect(
+                "expression *(k)",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=[
+                    "foo = 2",
+                    "bar = 3",
+                    '_filteredDataSource = 0x',
+                    '"2 elements"'])
 
     def frame_var(self, strip):
         self.common_setup(strip)
 
         # This should display correctly.
-        self.expect("frame variable j->_definer->foo", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 4"])
+        self.expect(
+            "frame variable j->_definer->foo",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=["= 4"])
 
         if not strip:
-            self.expect("frame variable j->_definer->bar", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["= 5"])
-            
+            self.expect(
+                "frame variable j->_definer->bar",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=["= 5"])
+
         if strip:
-            self.expect("frame variable *j->_definer", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 4"])
-        else:
-            self.expect("frame variable *j->_definer", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 4", "bar = 5"])
+            self.expect(
+                "frame variable *j->_definer",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=["foo = 4"])
+        else:
+            self.expect(
+                "frame variable *j->_definer",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=[
+                    "foo = 4",
+                    "bar = 5"])
 
         self.expect("frame variable k->foo", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["= 2"])
+                    substrs=["= 2"])
 
-        self.expect("frame variable k->_filteredDataSource", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = [' = 0x', '"2 elements"'])
+        self.expect(
+            "frame variable k->_filteredDataSource",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                ' = 0x',
+                '"2 elements"'])
 
         if strip:
-            self.expect("frame variable *k", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 2", '_filteredDataSource = 0x', '"2 elements"'])
-        else:
-            self.expect("frame variable *k", VARIABLES_DISPLAYED_CORRECTLY,
-                substrs = ["foo = 2", "bar = 3", '_filteredDataSource = 0x', '"2 elements"'])
+            self.expect(
+                "frame variable *k",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=[
+                    "foo = 2",
+                    '_filteredDataSource = 0x',
+                    '"2 elements"'])
+        else:
+            self.expect(
+                "frame variable *k",
+                VARIABLES_DISPLAYED_CORRECTLY,
+                substrs=[
+                    "foo = 2",
+                    "bar = 3",
+                    '_filteredDataSource = 0x',
+                    '"2 elements"'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py Tue Sep  6 15:57:50 2016
@@ -5,8 +5,8 @@ Test that dynamically discovered ivars o
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 
 import lldb
@@ -15,7 +15,8 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
-def execute_command (command):
+
+def execute_command(command):
     # print('%% %s' % (command))
     (exit_status, output) = seven.get_command_status_output(command)
     # if output:
@@ -23,6 +24,7 @@ def execute_command (command):
     # print('status = %u' % (exit_status))
     return exit_status
 
+
 class ObjCiVarIMPTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -34,8 +36,9 @@ class ObjCiVarIMPTestCase(TestBase):
         if self.getArchitecture() == 'i386':
             # rdar://problem/9946499
             self.skipTest("Dynamic types for ObjC V1 runtime not implemented")
-        
+
         execute_command("make repro")
+
         def cleanup():
             execute_command("make cleanup")
         self.addTearDownHook(cleanup)
@@ -43,23 +46,25 @@ class ObjCiVarIMPTestCase(TestBase):
         exe = os.path.join(os.getcwd(), "a.out")
 
         # Create a target from the debugger.
-        target = self.dbg.CreateTarget (exe)
+        target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
         # Set up our breakpoint
 
-        bkpt = lldbutil.run_break_set_by_source_regexp (self, "break here")
+        bkpt = lldbutil.run_break_set_by_source_regexp(self, "break here")
 
         # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process.GetState() == lldb.eStateStopped,
                         PROCESS_STOPPED)
 
-        self.expect('frame variable --ptr-depth=1 --show-types -d run -- object', substrs=[
-            '(MyClass *) object = 0x',
-            '(void *) myImp = 0x'
-        ])
-        self.expect('disassemble --start-address `((MyClass*)object)->myImp`', substrs=[
-            '-[MyClass init]'
-        ])
+        self.expect(
+            'frame variable --ptr-depth=1 --show-types -d run -- object',
+            substrs=[
+                '(MyClass *) object = 0x',
+                '(void *) myImp = 0x'])
+        self.expect(
+            'disassemble --start-address `((MyClass*)object)->myImp`',
+            substrs=['-[MyClass init]'])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py Tue Sep  6 15:57:50 2016
@@ -3,10 +3,10 @@
 from __future__ import print_function
 
 
-
 from distutils.version import StrictVersion
 import unittest2
-import os, time
+import os
+import time
 import lldb
 import platform
 
@@ -14,6 +14,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ObjCModulesAutoImportTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,28 +27,30 @@ class ObjCModulesAutoImportTestCase(Test
 
     @skipUnlessDarwin
     @unittest2.expectedFailure("rdar://problem/19991953")
-    @expectedFailureDarwin # clang: error: unknown argument: '-gmodules'
-    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+    @expectedFailureDarwin  # clang: error: unknown argument: '-gmodules'
+    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion(
+        '12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
     def test_expr(self):
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         self.runCmd("settings set target.auto-import-clang-modules true")
 
         self.expect("p getpid()", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["pid_t"])
+                    substrs=["pid_t"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py Tue Sep  6 15:57:50 2016
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-
 import unittest2
 import platform
 from distutils.version import StrictVersion
@@ -12,6 +11,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class IncompleteModulesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -24,7 +24,8 @@ class IncompleteModulesTestCase(TestBase
 
     @skipUnlessDarwin
     @unittest2.expectedFailure("rdar://20416388")
-    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion(
+        '12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
     @skipIfDarwin  # llvm.org/pr26267
     def test_expr(self):
         self.build()
@@ -32,29 +33,37 @@ class IncompleteModulesTestCase(TestBase
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
-        self.runCmd("settings set target.clang-module-search-paths \"" + os.getcwd() + "\"")
+        self.runCmd(
+            "settings set target.clang-module-search-paths \"" +
+            os.getcwd() +
+            "\"")
 
         self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["int", "3"])
+                    substrs=["int", "3"])
 
-        self.expect("expr [myObject privateMethod]", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["int", "5"])
+        self.expect(
+            "expr [myObject privateMethod]",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "int",
+                "5"])
 
         self.expect("expr MIN(2,3)", "#defined macro was found",
-            substrs = ["int", "2"])
+                    substrs=["int", "2"])
 
         self.expect("expr MAX(2,3)", "#undefd macro was correcltly not found",
-            error=True)
+                    error=True)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py Tue Sep  6 15:57:50 2016
@@ -3,11 +3,11 @@
 from __future__ import print_function
 
 
-
 from distutils.version import StrictVersion
 
 import unittest2
-import os, time
+import os
+import time
 import platform
 
 import lldb
@@ -15,6 +15,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ModulesInlineFunctionsTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,7 +27,8 @@ class ModulesInlineFunctionsTestCase(Tes
         self.line = line_number('main.m', '// Set breakpoint here.')
 
     @skipUnlessDarwin
-    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion(
+        '12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
     @expectedFailureDarwin("llvm.org/pr25743")
     def test_expr(self):
         self.build()
@@ -34,23 +36,27 @@ class ModulesInlineFunctionsTestCase(Tes
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
-        self.runCmd("settings set target.clang-module-search-paths \"" + os.getcwd() + "\"")
+        self.runCmd(
+            "settings set target.clang-module-search-paths \"" +
+            os.getcwd() +
+            "\"")
 
         self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["int", "3"])
+                    substrs=["int", "3"])
 
         self.expect("expr isInline(2)", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["4"])
+                    substrs=["4"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py Tue Sep  6 15:57:50 2016
@@ -3,9 +3,9 @@
 from __future__ import print_function
 
 
-
 import unittest2
-import os, time
+import os
+import time
 import platform
 from distutils.version import StrictVersion
 
@@ -14,6 +14,7 @@ from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ObjCModulesTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,7 +27,8 @@ class ObjCModulesTestCase(TestBase):
 
     @skipUnlessDarwin
     @unittest2.expectedFailure("rdar://20416388")
-    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion('12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
+    @unittest2.skipIf(platform.system() != "Darwin" or StrictVersion(
+        '12.0.0') > platform.release(), "Only supported on Darwin 12.0.0+")
     def test_expr(self):
         if not self.applies():
             return
@@ -36,36 +38,48 @@ class ObjCModulesTestCase(TestBase):
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
         # Break inside the foo function which takes a bar_ptr argument.
-        lldbutil.run_break_set_by_file_and_line (self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-            substrs = ['stopped',
-                       'stop reason = breakpoint'])
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
 
         # The breakpoint should have a hit count of 1.
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-            substrs = [' resolved, hit count = 1'])
+                    substrs=[' resolved, hit count = 1'])
 
         self.expect("expr @import Darwin; 3", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["int", "3"])
+                    substrs=["int", "3"])
 
         self.expect("expr getpid()", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["pid_t"])
+                    substrs=["pid_t"])
 
-        self.expect("expr @import Foundation; 4", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["int", "4"])
+        self.expect(
+            "expr @import Foundation; 4",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "int",
+                "4"])
 
         self.expect("expr string.length", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["NSUInteger", "5"])
+                    substrs=["NSUInteger", "5"])
 
         self.expect("expr array.count", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["NSUInteger", "3"])
-
-        self.expect("p *[NSURL URLWithString:@\"http://lldb.llvm.org\"]", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["NSURL", "isa", "_urlString"])
+                    substrs=["NSUInteger", "3"])
 
-        self.expect("p [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme", VARIABLES_DISPLAYED_CORRECTLY,
-            substrs = ["http"])
+        self.expect(
+            "p *[NSURL URLWithString:@\"http://lldb.llvm.org\"]",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "NSURL",
+                "isa",
+                "_urlString"])
+
+        self.expect(
+            "p [NSURL URLWithString:@\"http://lldb.llvm.org\"].scheme",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=["http"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc%2B%2B/TestObjCXX.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Make sure that ivars of Objective-C++ cl
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ObjCXXTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -26,9 +27,10 @@ class ObjCXXTestCase(TestBase):
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_source_regexp (self, 'breakpoint 1', num_expected_locations=1) 
+        lldbutil.run_break_set_by_source_regexp(
+            self, 'breakpoint 1', num_expected_locations=1)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
         self.expect("expr f->f", "Found ivar in class",
-            substrs = ["= 3"])
+                    substrs=["= 3"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py Tue Sep  6 15:57:50 2016
@@ -5,20 +5,21 @@ Use lldb Python API to test base class r
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ObjCDynamicValueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     def setUp(self):
-        # Call super's setUp().                                                                                                           
+        # Call super's setUp().
         TestBase.setUp(self)
 
         self.line = line_number('main.m', '// Set breakpoint here.')
@@ -36,13 +37,14 @@ class ObjCDynamicValueTestCase(TestBase)
 
         # Create a target from the debugger.
 
-        target = self.dbg.CreateTarget (exe)
+        target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
         # Set up our breakpoints:
 
         target.BreakpointCreateByLocation('main.m', self.line)
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process.GetState() == lldb.eStateStopped,
                         PROCESS_STOPPED)
@@ -50,10 +52,17 @@ class ObjCDynamicValueTestCase(TestBase)
         var = self.frame().FindVariable("foo")
         var_ptr_type = var.GetType()
         var_pte_type = var_ptr_type.GetPointeeType()
-        self.assertTrue(var_ptr_type.GetNumberOfDirectBaseClasses() == 1, "Foo * has one base class")
-        self.assertTrue(var_pte_type.GetNumberOfDirectBaseClasses() == 1, "Foo has one base class")
-
-        self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(0).IsValid(), "Foo * has a valid base class")
-        self.assertTrue(var_pte_type.GetDirectBaseClassAtIndex(0).IsValid(), "Foo * has a valid base class")
+        self.assertTrue(
+            var_ptr_type.GetNumberOfDirectBaseClasses() == 1,
+            "Foo * has one base class")
+        self.assertTrue(
+            var_pte_type.GetNumberOfDirectBaseClasses() == 1,
+            "Foo has one base class")
+
+        self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(
+            0).IsValid(), "Foo * has a valid base class")
+        self.assertTrue(var_pte_type.GetDirectBaseClassAtIndex(
+            0).IsValid(), "Foo * has a valid base class")
 
-        self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(0).GetName() == var_pte_type.GetDirectBaseClassAtIndex(0).GetName(), "Foo and its pointer type don't agree on their base class")
+        self.assertTrue(var_ptr_type.GetDirectBaseClassAtIndex(0).GetName() == var_pte_type.GetDirectBaseClassAtIndex(
+            0).GetName(), "Foo and its pointer type don't agree on their base class")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestObjCBuiltinTypes(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,7 +20,8 @@ class TestObjCBuiltinTypes(TestBase):
         TestBase.setUp(self)
         # Find the line numbers to break inside main().
         self.main_source = "main.cpp"
-        self.break_line = line_number(self.main_source, '// Set breakpoint here.')
+        self.break_line = line_number(
+            self.main_source, '// Set breakpoint here.')
 
     @skipUnlessDarwin
     @add_test_categories(['pyapi'])
@@ -32,25 +34,31 @@ class TestObjCBuiltinTypes(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        bpt = target.BreakpointCreateByLocation(self.main_source, self.break_line)
+        bpt = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line)
         self.assertTrue(bpt, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, bpt)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
 
         # Make sure we stopped at the first breakpoint.
-        self.assertTrue (len(thread_list) != 0, "No thread stopped at our breakpoint.")
-        self.assertTrue (len(thread_list) == 1, "More than one thread stopped at our breakpoint.")
-            
-        # Now make sure we can call a function in the class method we've stopped in.
+        self.assertTrue(
+            len(thread_list) != 0,
+            "No thread stopped at our breakpoint.")
+        self.assertTrue(len(thread_list) == 1,
+                        "More than one thread stopped at our breakpoint.")
+
+        # Now make sure we can call a function in the class method we've
+        # stopped in.
         frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue (frame, "Got a valid frame 0 frame.")
+        self.assertTrue(frame, "Got a valid frame 0 frame.")
 
-        self.expect("expr (foo)", patterns = ["\(ns::id\) \$.* = 0"])
+        self.expect("expr (foo)", patterns=["\(ns::id\) \$.* = 0"])
 
-        self.expect("expr id my_id = 0; my_id", patterns = ["\(id\) \$.* = nil"])
+        self.expect("expr id my_id = 0; my_id", patterns=["\(id\) \$.* = nil"])

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py Tue Sep  6 15:57:50 2016
@@ -5,23 +5,24 @@ Use lldb Python API to make sure the dyn
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ObjCCheckerTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     def setUp(self):
-        # Call super's setUp().                                                                                                           
+        # Call super's setUp().
         TestBase.setUp(self)
 
-        # Find the line number to break for main.c.                                                                                       
+        # Find the line number to break for main.c.
         self.source_name = 'main.m'
 
     @skipUnlessDarwin
@@ -36,41 +37,43 @@ class ObjCCheckerTestCase(TestBase):
 
         # Create a target from the debugger.
 
-        target = self.dbg.CreateTarget (exe)
+        target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
         # Set up our breakpoints:
 
-        
-        main_bkpt = target.BreakpointCreateBySourceRegex ("Set a breakpoint here.", lldb.SBFileSpec (self.source_name))
+        main_bkpt = target.BreakpointCreateBySourceRegex(
+            "Set a breakpoint here.", lldb.SBFileSpec(self.source_name))
         self.assertTrue(main_bkpt and
                         main_bkpt.GetNumLocations() == 1,
                         VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process.GetState() == lldb.eStateStopped,
                         PROCESS_STOPPED)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, main_bkpt)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, main_bkpt)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         #
-        #  The class Simple doesn't have a count method.  Make sure that we don't 
+        #  The class Simple doesn't have a count method.  Make sure that we don't
         #  actually try to send count but catch it as an unrecognized selector.
 
         frame = thread.GetFrameAtIndex(0)
         expr_value = frame.EvaluateExpression("(int) [my_simple count]", False)
         expr_error = expr_value.GetError()
 
-        self.assertTrue (expr_error.Fail())
-        
+        self.assertTrue(expr_error.Fail())
+
         # Make sure the call produced no NSLog stdout.
         stdout = process.GetSTDOUT(100)
-        self.assertTrue (stdout is None or (len(stdout) == 0))
-        
+        self.assertTrue(stdout is None or (len(stdout) == 0))
+
         # Make sure the error is helpful:
         err_string = expr_error.GetCString()
-        self.assertTrue ("selector" in err_string)
+        self.assertTrue("selector" in err_string)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestObjCClassMethod(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,12 +20,13 @@ class TestObjCClassMethod(TestBase):
         TestBase.setUp(self)
         # Find the line numbers to break inside main().
         self.main_source = "class.m"
-        self.break_line = line_number(self.main_source, '// Set breakpoint here.')
+        self.break_line = line_number(
+            self.main_source, '// Set breakpoint here.')
 
     @skipUnlessDarwin
     @expectedFailureAll(archs=["i[3-6]86"])
     @add_test_categories(['pyapi'])
-    #rdar://problem/9745789 "expression" can't call functions in class methods
+    # rdar://problem/9745789 "expression" can't call functions in class methods
     def test_with_python_api(self):
         """Test calling functions in class methods."""
         self.build()
@@ -33,25 +35,32 @@ class TestObjCClassMethod(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        bpt = target.BreakpointCreateByLocation(self.main_source, self.break_line)
+        bpt = target.BreakpointCreateByLocation(
+            self.main_source, self.break_line)
         self.assertTrue(bpt, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process, PROCESS_IS_VALID)
 
         # The stop reason of the thread should be breakpoint.
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, bpt)
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(process, bpt)
 
         # Make sure we stopped at the first breakpoint.
-        self.assertTrue (len(thread_list) != 0, "No thread stopped at our breakpoint.")
-        self.assertTrue (len(thread_list) == 1, "More than one thread stopped at our breakpoint.")
-            
-        # Now make sure we can call a function in the class method we've stopped in.
+        self.assertTrue(
+            len(thread_list) != 0,
+            "No thread stopped at our breakpoint.")
+        self.assertTrue(len(thread_list) == 1,
+                        "More than one thread stopped at our breakpoint.")
+
+        # Now make sure we can call a function in the class method we've
+        # stopped in.
         frame = thread_list[0].GetFrameAtIndex(0)
-        self.assertTrue (frame, "Got a valid frame 0 frame.")
+        self.assertTrue(frame, "Got a valid frame 0 frame.")
 
-        cmd_value = frame.EvaluateExpression ("(int)[Foo doSomethingWithString:@\"Hello\"]")
-        self.assertTrue (cmd_value.IsValid())
-        self.assertTrue (cmd_value.GetValueAsUnsigned() == 5)
+        cmd_value = frame.EvaluateExpression(
+            "(int)[Foo doSomethingWithString:@\"Hello\"]")
+        self.assertTrue(cmd_value.IsValid())
+        self.assertTrue(cmd_value.GetValueAsUnsigned() == 5)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py Tue Sep  6 15:57:50 2016
@@ -5,13 +5,14 @@ Test that we are able to properly report
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 @skipUnlessDarwin
 class ObjCDynamicSBTypeTestCase(TestBase):
 
@@ -36,28 +37,57 @@ class ObjCDynamicSBTypeTestCase(TestBase
         exe = os.path.join(os.getcwd(), self.exe_name)
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_file_and_line (self, self.main_source, self.line, num_expected_locations=1, loc_exact=True)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            self.main_source,
+            self.line,
+            num_expected_locations=1,
+            loc_exact=True)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
-        v_object = self.frame().FindVariable("object").GetDynamicValue(lldb.eDynamicCanRunTarget)
-        v_base = self.frame().FindVariable("base").GetDynamicValue(lldb.eDynamicCanRunTarget)
-        self.assertTrue(v_object.GetTypeName() == "MyDerivedClass *", "The NSObject is properly type-named")
-        self.assertTrue(v_base.GetTypeName() == "MyDerivedClass *", "The Base is properly type-named")
+        v_object = self.frame().FindVariable(
+            "object").GetDynamicValue(lldb.eDynamicCanRunTarget)
+        v_base = self.frame().FindVariable(
+            "base").GetDynamicValue(lldb.eDynamicCanRunTarget)
+        self.assertTrue(
+            v_object.GetTypeName() == "MyDerivedClass *",
+            "The NSObject is properly type-named")
+        self.assertTrue(
+            v_base.GetTypeName() == "MyDerivedClass *",
+            "The Base is properly type-named")
         object_type = v_object.GetType()
         base_type = v_base.GetType()
-        self.assertTrue(object_type.GetName() == "MyDerivedClass *", "The dynamic SBType for NSObject is for the correct type")
-        self.assertTrue(base_type.GetName() == "MyDerivedClass *", "The dynamic SBType for Base is for the correct type")
+        self.assertTrue(
+            object_type.GetName() == "MyDerivedClass *",
+            "The dynamic SBType for NSObject is for the correct type")
+        self.assertTrue(
+            base_type.GetName() == "MyDerivedClass *",
+            "The dynamic SBType for Base is for the correct type")
         object_pointee_type = object_type.GetPointeeType()
         base_pointee_type = base_type.GetPointeeType()
-        self.assertTrue(object_pointee_type.GetName() == "MyDerivedClass", "The dynamic type for NSObject figures out its pointee type just fine")
-        self.assertTrue(base_pointee_type.GetName() == "MyDerivedClass", "The dynamic type for Base figures out its pointee type just fine")
-
-        self.assertTrue(object_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass", "The dynamic type for NSObject can go back to its base class")
-        self.assertTrue(base_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass", "The dynamic type for Base can go back to its base class")
-
-        self.assertTrue(object_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(0).GetName() == "NSObject", "The dynamic type for NSObject can go up the hierarchy")
-        self.assertTrue(base_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(0).GetName() == "NSObject", "The dynamic type for Base can go up the hierarchy")
-
-        self.assertTrue(object_pointee_type.GetNumberOfFields() == 2, "The dynamic type for NSObject has 2 fields")
-        self.assertTrue(base_pointee_type.GetNumberOfFields() == 2, "The dynamic type for Base has 2 fields")
+        self.assertTrue(
+            object_pointee_type.GetName() == "MyDerivedClass",
+            "The dynamic type for NSObject figures out its pointee type just fine")
+        self.assertTrue(
+            base_pointee_type.GetName() == "MyDerivedClass",
+            "The dynamic type for Base figures out its pointee type just fine")
+
+        self.assertTrue(
+            object_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass",
+            "The dynamic type for NSObject can go back to its base class")
+        self.assertTrue(
+            base_pointee_type.GetDirectBaseClassAtIndex(0).GetName() == "MyBaseClass",
+            "The dynamic type for Base can go back to its base class")
+
+        self.assertTrue(object_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(
+            0).GetName() == "NSObject", "The dynamic type for NSObject can go up the hierarchy")
+        self.assertTrue(base_pointee_type.GetDirectBaseClassAtIndex(0).GetType().GetDirectBaseClassAtIndex(
+            0).GetName() == "NSObject", "The dynamic type for Base can go up the hierarchy")
+
+        self.assertTrue(
+            object_pointee_type.GetNumberOfFields() == 2,
+            "The dynamic type for NSObject has 2 fields")
+        self.assertTrue(
+            base_pointee_type.GetNumberOfFields() == 2,
+            "The dynamic type for Base has 2 fields")

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py Tue Sep  6 15:57:50 2016
@@ -5,30 +5,33 @@ Use lldb Python API to test dynamic valu
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class ObjCDynamicValueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
     def setUp(self):
-        # Call super's setUp().                                                                                                           
+        # Call super's setUp().
         TestBase.setUp(self)
 
-        # Find the line number to break for main.c.                                                                                       
+        # Find the line number to break for main.c.
 
         self.source_name = 'dynamic-value.m'
-        self.set_property_line = line_number(self.source_name, '// This is the line in setProperty, make sure we step to here.')
-        self.handle_SourceBase = line_number(self.source_name,
-                                                 '// Break here to check dynamic values.')
-        self.main_before_setProperty_line = line_number(self.source_name,
-                                                       '// Break here to see if we can step into real method.')
+        self.set_property_line = line_number(
+            self.source_name,
+            '// This is the line in setProperty, make sure we step to here.')
+        self.handle_SourceBase = line_number(
+            self.source_name, '// Break here to check dynamic values.')
+        self.main_before_setProperty_line = line_number(
+            self.source_name, '// Break here to see if we can step into real method.')
 
     @skipUnlessDarwin
     @add_test_categories(['pyapi'])
@@ -44,29 +47,33 @@ class ObjCDynamicValueTestCase(TestBase)
 
         # Create a target from the debugger.
 
-        target = self.dbg.CreateTarget (exe)
+        target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
         # Set up our breakpoints:
 
-        handle_SourceBase_bkpt = target.BreakpointCreateByLocation(self.source_name, self.handle_SourceBase)
+        handle_SourceBase_bkpt = target.BreakpointCreateByLocation(
+            self.source_name, self.handle_SourceBase)
         self.assertTrue(handle_SourceBase_bkpt and
                         handle_SourceBase_bkpt.GetNumLocations() == 1,
                         VALID_BREAKPOINT)
 
-        main_before_setProperty_bkpt = target.BreakpointCreateByLocation(self.source_name, self.main_before_setProperty_line)
+        main_before_setProperty_bkpt = target.BreakpointCreateByLocation(
+            self.source_name, self.main_before_setProperty_line)
         self.assertTrue(main_before_setProperty_bkpt and
                         main_before_setProperty_bkpt.GetNumLocations() == 1,
                         VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at the entry point.
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
 
         self.assertTrue(process.GetState() == lldb.eStateStopped,
                         PROCESS_STOPPED)
 
-        threads = lldbutil.get_threads_stopped_at_breakpoint (process, main_before_setProperty_bkpt)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, main_before_setProperty_bkpt)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         #
@@ -74,53 +81,73 @@ class ObjCDynamicValueTestCase(TestBase)
         #  make sure we can get that properly:
 
         frame = thread.GetFrameAtIndex(0)
-        myObserver = frame.FindVariable('myObserver', lldb.eDynamicCanRunTarget)
-        self.assertTrue (myObserver)
-        myObserver_source = myObserver.GetChildMemberWithName ('_source', lldb.eDynamicCanRunTarget)
-        self.examine_SourceDerived_ptr (myObserver_source)
+        myObserver = frame.FindVariable(
+            'myObserver', lldb.eDynamicCanRunTarget)
+        self.assertTrue(myObserver)
+        myObserver_source = myObserver.GetChildMemberWithName(
+            '_source', lldb.eDynamicCanRunTarget)
+        self.examine_SourceDerived_ptr(myObserver_source)
 
         #
-        #  Make sure a static value can be correctly turned into a dynamic value.
+        # Make sure a static value can be correctly turned into a dynamic
+        # value.
 
         frame = thread.GetFrameAtIndex(0)
-        myObserver_static = frame.FindVariable('myObserver', lldb.eNoDynamicValues)
-        self.assertTrue (myObserver_static)
-        myObserver = myObserver_static.GetDynamicValue (lldb.eDynamicCanRunTarget)
-        myObserver_source = myObserver.GetChildMemberWithName ('_source', lldb.eDynamicCanRunTarget)
-        self.examine_SourceDerived_ptr (myObserver_source)
+        myObserver_static = frame.FindVariable(
+            'myObserver', lldb.eNoDynamicValues)
+        self.assertTrue(myObserver_static)
+        myObserver = myObserver_static.GetDynamicValue(
+            lldb.eDynamicCanRunTarget)
+        myObserver_source = myObserver.GetChildMemberWithName(
+            '_source', lldb.eDynamicCanRunTarget)
+        self.examine_SourceDerived_ptr(myObserver_source)
 
         # The "frame var" code uses another path to get into children, so let's
         # make sure that works as well:
 
         result = lldb.SBCommandReturnObject()
 
-        self.expect('frame var -d run-target myObserver->_source', 'frame var finds its way into a child member',
-            patterns = ['\(SourceDerived \*\)'])
-        
-        # check that our ObjC GetISA() does a good job at hiding KVO swizzled classes
-        
-        self.expect('frame var -d run-target myObserver->_source -T', 'the KVO-ed class is hidden',
-                    substrs = ['SourceDerived'])
-
-        self.expect('frame var -d run-target myObserver->_source -T', 'the KVO-ed class is hidden', matching = False,
-                    substrs = ['NSKVONotify'])
+        self.expect(
+            'frame var -d run-target myObserver->_source',
+            'frame var finds its way into a child member',
+            patterns=['\(SourceDerived \*\)'])
+
+        # check that our ObjC GetISA() does a good job at hiding KVO swizzled
+        # classes
+
+        self.expect(
+            'frame var -d run-target myObserver->_source -T',
+            'the KVO-ed class is hidden',
+            substrs=['SourceDerived'])
+
+        self.expect(
+            'frame var -d run-target myObserver->_source -T',
+            'the KVO-ed class is hidden',
+            matching=False,
+            substrs=['NSKVONotify'])
 
         # This test is not entirely related to the main thrust of this test case, but since we're here,
-        # try stepping into setProperty, and make sure we get into the version in Source:
+        # try stepping into setProperty, and make sure we get into the version
+        # in Source:
 
         thread.StepInto()
 
-        threads = lldbutil.get_stopped_threads (process, lldb.eStopReasonPlanComplete)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.get_stopped_threads(
+            process, lldb.eStopReasonPlanComplete)
+        self.assertTrue(len(threads) == 1)
         line_entry = threads[0].GetFrameAtIndex(0).GetLineEntry()
 
-        self.assertEqual (line_entry.GetLine(), self.set_property_line)
-        self.assertEqual (line_entry.GetFileSpec().GetFilename(), self.source_name) 
-
-        # Okay, back to the main business.  Continue to the handle_SourceBase and make sure we get the correct dynamic value.
-
-        threads = lldbutil.continue_to_breakpoint (process, handle_SourceBase_bkpt)
-        self.assertTrue (len(threads) == 1)
+        self.assertEqual(line_entry.GetLine(), self.set_property_line)
+        self.assertEqual(
+            line_entry.GetFileSpec().GetFilename(),
+            self.source_name)
+
+        # Okay, back to the main business.  Continue to the handle_SourceBase
+        # and make sure we get the correct dynamic value.
+
+        threads = lldbutil.continue_to_breakpoint(
+            process, handle_SourceBase_bkpt)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         frame = thread.GetFrameAtIndex(0)
@@ -130,49 +157,55 @@ class ObjCDynamicValueTestCase(TestBase)
         noDynamic = lldb.eNoDynamicValues
         useDynamic = lldb.eDynamicCanRunTarget
 
-        object_static = frame.FindVariable ('object', noDynamic)
-        object_dynamic = frame.FindVariable ('object', useDynamic)
+        object_static = frame.FindVariable('object', noDynamic)
+        object_dynamic = frame.FindVariable('object', useDynamic)
 
-        # Delete this object to make sure that this doesn't cause havoc with the dynamic object that depends on it.
+        # Delete this object to make sure that this doesn't cause havoc with
+        # the dynamic object that depends on it.
         del (object_static)
 
-        self.examine_SourceDerived_ptr (object_dynamic)
-        
+        self.examine_SourceDerived_ptr(object_dynamic)
+
         # Get "this" using FindValue, make sure that works too:
-        object_static = frame.FindValue ('object', lldb.eValueTypeVariableArgument, noDynamic)
-        object_dynamic = frame.FindValue ('object', lldb.eValueTypeVariableArgument, useDynamic)
+        object_static = frame.FindValue(
+            'object', lldb.eValueTypeVariableArgument, noDynamic)
+        object_dynamic = frame.FindValue(
+            'object', lldb.eValueTypeVariableArgument, useDynamic)
         del (object_static)
-        self.examine_SourceDerived_ptr (object_dynamic)
+        self.examine_SourceDerived_ptr(object_dynamic)
 
         # Get "this" using the EvaluateExpression:
-        object_static = frame.EvaluateExpression ('object', noDynamic)
-        object_dynamic = frame.EvaluateExpression ('object', useDynamic)
+        object_static = frame.EvaluateExpression('object', noDynamic)
+        object_dynamic = frame.EvaluateExpression('object', useDynamic)
         del (object_static)
-        self.examine_SourceDerived_ptr (object_dynamic)
-        
+        self.examine_SourceDerived_ptr(object_dynamic)
+
         # Continue again to the handle_SourceBase and make sure we get the correct dynamic value.
         # This one looks exactly the same, but in fact this is an "un-KVO'ed" version of SourceBase, so
-        # its isa pointer points to SourceBase not NSKVOSourceBase or whatever...
+        # its isa pointer points to SourceBase not NSKVOSourceBase or
+        # whatever...
 
-        threads = lldbutil.continue_to_breakpoint (process, handle_SourceBase_bkpt)
-        self.assertTrue (len(threads) == 1)
+        threads = lldbutil.continue_to_breakpoint(
+            process, handle_SourceBase_bkpt)
+        self.assertTrue(len(threads) == 1)
         thread = threads[0]
 
         frame = thread.GetFrameAtIndex(0)
 
         # Get "object" using FindVariable:
 
-        object_static = frame.FindVariable ('object', noDynamic)
-        object_dynamic = frame.FindVariable ('object', useDynamic)
+        object_static = frame.FindVariable('object', noDynamic)
+        object_dynamic = frame.FindVariable('object', useDynamic)
 
-        # Delete this object to make sure that this doesn't cause havoc with the dynamic object that depends on it.
+        # Delete this object to make sure that this doesn't cause havoc with
+        # the dynamic object that depends on it.
         del (object_static)
 
-        self.examine_SourceDerived_ptr (object_dynamic)
+        self.examine_SourceDerived_ptr(object_dynamic)
 
-    def examine_SourceDerived_ptr (self, object):
-        self.assertTrue (object)
-        self.assertTrue (object.GetTypeName().find ('SourceDerived') != -1)
-        derivedValue = object.GetChildMemberWithName ('_derivedValue')
-        self.assertTrue (derivedValue)
-        self.assertTrue (int (derivedValue.GetValue(), 0) == 30)
+    def examine_SourceDerived_ptr(self, object):
+        self.assertTrue(object)
+        self.assertTrue(object.GetTypeName().find('SourceDerived') != -1)
+        derivedValue = object.GetChildMemberWithName('_derivedValue')
+        self.assertTrue(derivedValue)
+        self.assertTrue(int(derivedValue.GetValue(), 0) == 30)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py Tue Sep  6 15:57:50 2016
@@ -3,13 +3,14 @@
 from __future__ import print_function
 
 
-
-import os, time
+import os
+import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 
+
 class TestObjCIvarOffsets(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
@@ -19,7 +20,8 @@ class TestObjCIvarOffsets(TestBase):
         TestBase.setUp(self)
         # Find the line numbers to break inside main().
         self.main_source = "main.m"
-        self.stop_line = line_number(self.main_source, '// Set breakpoint here.')
+        self.stop_line = line_number(
+            self.main_source, '// Set breakpoint here.')
 
     @skipUnlessDarwin
     @add_test_categories(['pyapi'])
@@ -31,45 +33,54 @@ class TestObjCIvarOffsets(TestBase):
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        breakpoint = target.BreakpointCreateByLocation(self.main_source, self.stop_line)
+        breakpoint = target.BreakpointCreateByLocation(
+            self.main_source, self.stop_line)
         self.assertTrue(breakpoint, VALID_BREAKPOINT)
 
-        process = target.LaunchSimple (None, None, self.get_process_working_directory())
-        self.assertTrue (process, "Created a process.")
-        self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped it too.")
-
-        thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
-        self.assertTrue (len(thread_list) == 1)
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, "Created a process.")
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            "Stopped it too.")
+
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertTrue(len(thread_list) == 1)
         thread = thread_list[0]
-        
+
         frame = thread.GetFrameAtIndex(0)
-        self.assertTrue (frame, "frame 0 is valid")
-        
+        self.assertTrue(frame, "frame 0 is valid")
+
         mine = thread.GetFrameAtIndex(0).FindVariable("mine")
         self.assertTrue(mine, "Found local variable mine.")
-        
+
         # Test the value object value for BaseClass->_backed_int
 
         error = lldb.SBError()
 
-        mine_backed_int = mine.GetChildMemberWithName ("_backed_int")
-        self.assertTrue(mine_backed_int, "Found mine->backed_int local variable.")
-        backed_value = mine_backed_int.GetValueAsSigned (error)
-        self.assertTrue (error.Success())
-        self.assertTrue (backed_value == 1111)
-        
+        mine_backed_int = mine.GetChildMemberWithName("_backed_int")
+        self.assertTrue(
+            mine_backed_int,
+            "Found mine->backed_int local variable.")
+        backed_value = mine_backed_int.GetValueAsSigned(error)
+        self.assertTrue(error.Success())
+        self.assertTrue(backed_value == 1111)
+
         # Test the value object value for DerivedClass->_derived_backed_int
 
-        mine_derived_backed_int = mine.GetChildMemberWithName ("_derived_backed_int")
-        self.assertTrue(mine_derived_backed_int, "Found mine->derived_backed_int local variable.")
-        derived_backed_value = mine_derived_backed_int.GetValueAsSigned (error)
-        self.assertTrue (error.Success())
-        self.assertTrue (derived_backed_value == 3333)
+        mine_derived_backed_int = mine.GetChildMemberWithName(
+            "_derived_backed_int")
+        self.assertTrue(mine_derived_backed_int,
+                        "Found mine->derived_backed_int local variable.")
+        derived_backed_value = mine_derived_backed_int.GetValueAsSigned(error)
+        self.assertTrue(error.Success())
+        self.assertTrue(derived_backed_value == 3333)
 
         # Make sure we also get bit-field offsets correct:
 
-        mine_flag2 = mine.GetChildMemberWithName ("flag2")
+        mine_flag2 = mine.GetChildMemberWithName("flag2")
         self.assertTrue(mine_flag2, "Found mine->flag2 local variable.")
-        flag2_value = mine_flag2.GetValueAsUnsigned (error)
-        self.assertTrue (error.Success())
-        self.assertTrue (flag2_value == 7)
+        flag2_value = mine_flag2.GetValueAsUnsigned(error)
+        self.assertTrue(error.Success())
+        self.assertTrue(flag2_value == 7)

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py?rev=280751&r1=280750&r2=280751&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py Tue Sep  6 15:57:50 2016
@@ -1,4 +1,6 @@
 from lldbsuite.test import lldbinline
 from lldbsuite.test import decorators
 
-lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIfFreeBSD,decorators.skipIfLinux,decorators.skipIfWindows])
+lldbinline.MakeInlineTest(
+    __file__, globals(), [
+        decorators.skipIfFreeBSD, decorators.skipIfLinux, decorators.skipIfWindows])




More information about the lldb-commits mailing list