[Lldb-commits] [lldb] 13062d0 - [lldb/Test] Skip more tests that are not expected to work with passive replay

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu May 7 15:17:01 PDT 2020


Author: Jonas Devlieghere
Date: 2020-05-07T15:16:52-07:00
New Revision: 13062d0fb76913802f94314090b1a2b36bd480d9

URL: https://github.com/llvm/llvm-project/commit/13062d0fb76913802f94314090b1a2b36bd480d9
DIFF: https://github.com/llvm/llvm-project/commit/13062d0fb76913802f94314090b1a2b36bd480d9.diff

LOG: [lldb/Test] Skip more tests that are not expected to work with passive replay

This skips some tests that pass with active replay (which doesn't check
the output) but fail with passive replay. Valid reasons for this
include:

 - Checking the output of the process (which doesn't run during replay),
 - Checking files that cannot be captured in the VFS (non-existing or
   unreadable files or files that are removed during test),

Unfortunately there's no good way to mark a test as supported for active
replay but unsupported for passive replay because the number and order
of API calls needs to be identical during capture and replay. I don't
think this is a huge loss however.

Added: 
    

Modified: 
    lldb/test/API/commands/process/launch/TestProcessLaunch.py
    lldb/test/API/commands/target/basic/TestTargetCommand.py
    lldb/test/API/python_api/process/io/TestProcessIO.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/commands/process/launch/TestProcessLaunch.py b/lldb/test/API/commands/process/launch/TestProcessLaunch.py
index a2b27c2e5900..9e43c2c3fe28 100644
--- a/lldb/test/API/commands/process/launch/TestProcessLaunch.py
+++ b/lldb/test/API/commands/process/launch/TestProcessLaunch.py
@@ -29,6 +29,7 @@ def tearDown(self):
         TestBase.tearDown(self)
 
     @not_remote_testsuite_ready
+    @skipIfReproducer
     def test_io(self):
         """Test that process launch I/O redirection flags work properly."""
         self.build()
@@ -84,6 +85,7 @@ def test_io(self):
     @not_remote_testsuite_ready
     @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20265")
     @expectedFailureNetBSD
+    @skipIfReproducer
     def test_set_working_dir_nonexisting(self):
         """Test that '-w dir' fails to set the working dir when running the inferior with a dir which doesn't exist."""
         d = {'CXX_SOURCES': 'print_cwd.cpp'}
@@ -111,6 +113,7 @@ def test_set_working_dir_nonexisting(self):
                 invalid_dir_path])
 
     @not_remote_testsuite_ready
+    @skipIfReproducer
     def test_set_working_dir_existing(self):
         """Test that '-w dir' sets the working dir when running the inferior."""
         d = {'CXX_SOURCES': 'print_cwd.cpp'}
@@ -170,6 +173,7 @@ def test_set_working_dir_existing(self):
         if not success:
             self.fail(err_msg)
 
+    @skipIfReproducer
     def test_environment_with_special_char(self):
         """Test that environment variables containing '*' and '}' are handled correctly by the inferior."""
         source = 'print_env.cpp'

diff  --git a/lldb/test/API/commands/target/basic/TestTargetCommand.py b/lldb/test/API/commands/target/basic/TestTargetCommand.py
index 2704e0ed25ad..9bc9396e19ed 100644
--- a/lldb/test/API/commands/target/basic/TestTargetCommand.py
+++ b/lldb/test/API/commands/target/basic/TestTargetCommand.py
@@ -330,6 +330,7 @@ def test_target_create_nonexistent_core_file(self):
 
     # Write only files don't seem to be supported on Windows.
     @skipIfWindows
+    @skipIfReproducer # Cannot be captured in the VFS.
     @no_debug_info_test
     def test_target_create_unreadable_core_file(self):
         tf = tempfile.NamedTemporaryFile()
@@ -353,6 +354,7 @@ def test_target_create_invalid_core_file(self):
     # Write only files don't seem to be supported on Windows.
     @skipIfWindows
     @no_debug_info_test
+    @skipIfReproducer # Cannot be captured in the VFS.
     def test_target_create_unreadable_sym_file(self):
         tf = tempfile.NamedTemporaryFile()
         os.chmod(tf.name, stat.S_IWRITE)

diff  --git a/lldb/test/API/python_api/process/io/TestProcessIO.py b/lldb/test/API/python_api/process/io/TestProcessIO.py
index 365d486650f5..3c1c62d2d001 100644
--- a/lldb/test/API/python_api/process/io/TestProcessIO.py
+++ b/lldb/test/API/python_api/process/io/TestProcessIO.py
@@ -15,6 +15,7 @@ class ProcessIOTestCase(TestBase):
     mydir = TestBase.compute_mydir(__file__)
     NO_DEBUG_INFO_TESTCASE = True
 
+    @skipIfReproducer
     def setup_test(self):
         # Get the full path to our executable to be debugged.
         self.exe = self.getBuildArtifact("process_io")


        


More information about the lldb-commits mailing list