Skip to content

Commit

Permalink
[lldb/Test] Skip more tests that are not expected to work with passiv…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
JDevlieghere committed May 7, 2020
1 parent edf0391 commit 13062d0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lldb/test/API/commands/process/launch/TestProcessLaunch.py
Expand Up @@ -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()
Expand Down Expand Up @@ -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'}
Expand Down Expand Up @@ -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'}
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions lldb/test/API/commands/target/basic/TestTargetCommand.py
Expand Up @@ -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()
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/python_api/process/io/TestProcessIO.py
Expand Up @@ -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")
Expand Down

0 comments on commit 13062d0

Please sign in to comment.