[Lldb-commits] [lldb] r349417 - A few small updates to the testsuite for running against an iOS device.

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 17 15:33:41 PST 2018


Author: jmolenda
Date: Mon Dec 17 15:33:40 2018
New Revision: 349417

URL: http://llvm.org/viewvc/llvm-project?rev=349417&view=rev
Log:
A few small updates to the testsuite for running against an iOS device.
Remove the expected-fails for 34538611; using an alternate platform
implementation handles these correctly.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
    lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
    lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
    lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
    lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteGPacket.py
    lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py?rev=349417&r1=349416&r2=349417&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py Mon Dec 17 15:33:40 2018
@@ -158,6 +158,7 @@ class LoadUnloadTestCase(TestBase):
     @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
     @expectedFailureAndroid  # wrong source file shows up for hidden library
     @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
+    @skipIfDarwinEmbedded
     def test_dyld_library_path(self):
         """Test (DY)LD_LIBRARY_PATH after moving libd.dylib, which defines d_function, somewhere else."""
         self.copy_shlibs_to_remote(hidden_dir=True)

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=349417&r1=349416&r2=349417&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 Mon Dec 17 15:33:40 2018
@@ -23,7 +23,6 @@ class ProcessAttachTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
 
     @skipIfiOSSimulator
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_attach_to_process_by_id(self):
         """Test attach by process id"""
         self.build()
@@ -40,7 +39,6 @@ class ProcessAttachTestCase(TestBase):
         process = target.GetProcess()
         self.assertTrue(process, PROCESS_IS_VALID)
 
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_attach_to_process_from_different_dir_by_id(self):
         """Test attach by process id"""
         newdir = self.getBuildArtifact("newdir")
@@ -67,7 +65,6 @@ class ProcessAttachTestCase(TestBase):
         process = target.GetProcess()
         self.assertTrue(process, PROCESS_IS_VALID)
 
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_attach_to_process_by_name(self):
         """Test attach by process name"""
         self.build()

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=349417&r1=349416&r2=349417&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 Mon Dec 17 15:33:40 2018
@@ -24,7 +24,6 @@ class ChangeProcessGroupTestCase(TestBas
     @skipIfFreeBSD  # Times out on FreeBSD llvm.org/pr23731
     @skipIfWindows  # setpgid call does not exist on Windows
     @expectedFailureAndroid("http://llvm.org/pr23762", api_levels=[16])
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_setpgid(self):
         self.build()
         exe = self.getBuildArtifact("a.out")

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=349417&r1=349416&r2=349417&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 Mon Dec 17 15:33:40 2018
@@ -23,7 +23,6 @@ class CreateAfterAttachTestCase(TestBase
     # Occasionally hangs on Windows, may be same as other issues.
     @skipIfWindows
     @skipIfiOSSimulator
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_create_after_attach_with_popen(self):
         """Test thread creation after process attach."""
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))
@@ -34,7 +33,6 @@ class CreateAfterAttachTestCase(TestBase
     @skipIfRemote
     @skipIfWindows  # Windows doesn't have fork.
     @skipIfiOSSimulator
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_create_after_attach_with_fork(self):
         """Test thread creation after process attach."""
         self.build(dictionary=self.getBuildFlags(use_cpp11=False))

Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py?rev=349417&r1=349416&r2=349417&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py Mon Dec 17 15:33:40 2018
@@ -22,6 +22,7 @@ class MultipleHitsTestCase(TestBase):
         oslist=["windows"],
         bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     @skipIf(bugnumber="llvm.org/pr30758", oslist=["linux"], archs=["arm", "aarch64", "powerpc64le"])
+    @skipIfwatchOS
     def test(self):
         self.build()
         exe = self.getBuildArtifact("a.out")

Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py?rev=349417&r1=349416&r2=349417&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py Mon Dec 17 15:33:40 2018
@@ -267,10 +267,14 @@ class TestQueues(TestBase):
         self.assertTrue(break1, VALID_BREAKPOINT)
 
         # Now launch the process, and do not stop at entry point.
+        libbtr_path = "/Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib"
+        if self.getArchitecture() in ['arm', 'arm64', 'arm64e', 'arm64_32', 'armv7', 'armv7k']:
+            libbtr_path = "/Developer/usr/lib/libBacktraceRecording.dylib"
+
         process = target.LaunchSimple(
             None,
             [
-                'DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib',
+                'DYLD_INSERT_LIBRARIES=%s' % (libbtr_path),
                 'DYLD_LIBRARY_PATH=/usr/lib/system/introspection'],
             self.get_process_working_directory())
 

Modified: lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py?rev=349417&r1=349416&r2=349417&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py Mon Dec 17 15:33:40 2018
@@ -79,7 +79,6 @@ class HelloWorldTestCase(TestBase):
     @add_test_categories(['pyapi'])
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24600")
     @skipIfiOSSimulator
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_with_attach_to_process_with_id_api(self):
         """Create target, spawn a process, and attach to it with process id."""
         exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
@@ -108,7 +107,6 @@ class HelloWorldTestCase(TestBase):
     @add_test_categories(['pyapi'])
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24600")
     @skipIfiOSSimulator
-    @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], bugnumber="<rdar://problem/34538611>") # old lldb-server has race condition, launching an inferior and then launching debugserver in quick succession sometimes fails
     def test_with_attach_to_process_with_name_api(self):
         """Create target, spawn a process, and attach to it with process name."""
         exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())

Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteGPacket.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteGPacket.py?rev=349417&r1=349416&r2=349417&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteGPacket.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteGPacket.py Mon Dec 17 15:33:40 2018
@@ -35,6 +35,7 @@ class TestGdbRemoteGPacket(gdbremote_tes
 
     @skipIfOutOfTreeDebugserver
     @debugserver_test
+    @skipIfDarwinEmbedded
     def test_g_packet_debugserver(self):
         self.init_debugserver_test()
         self.run_test_g_packet()

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=349417&r1=349416&r2=349417&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Mon Dec 17 15:33:40 2018
@@ -3291,6 +3291,11 @@ Status Process::PrivateResume() {
           m_thread_list.DidResume();
           if (log)
             log->Printf("Process thinks the process has resumed.");
+        } else {
+          if (log)
+            log->Printf(
+                "Process::PrivateResume() DoResume failed.");
+          return error;
         }
       }
     } else {




More information about the lldb-commits mailing list