Skip to content

Commit

Permalink
[lldb/Test] Add skipIfReproducer for tests that diverge during replay
Browse files Browse the repository at this point in the history
Add the skipIfReproducer decorator to the remaining tests that fail to
replay because the GDB remote packets diverge during replay. This is
*not* expected and should be fixed, but figuring out exactly what caused
the divergence has proven pretty difficult to track down.

I've marked these tests as skipped for now so we can get clean results
and detect new regressions. I have no evidence to believe that these
failures have the same root cause, so I've not assigned them a PR.
  • Loading branch information
JDevlieghere committed Apr 21, 2020
1 parent 400b6f2 commit 1e566f6
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions lldb/test/API/commands/command/script/TestCommandScript.py
Expand Up @@ -14,6 +14,7 @@ class CmdPythonTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True

@skipIfReproducer # Unexpected packet during replay
def test(self):
self.build()
self.pycmd_tests()
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/commands/expression/issue_11588/Test11588.py
Expand Up @@ -17,6 +17,7 @@ class Issue11581TestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)

@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
@skipIfReproducer # Unexpected packet during replay
def test_11581_commands(self):
# This is the function to remove the custom commands in order to have a
# clean slate for the next test case.
Expand Down
Expand Up @@ -21,6 +21,7 @@ class AttachResumeTestCase(TestBase):
@expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr19310')
@expectedFailureNetBSD
@skipIfWindows # llvm.org/pr24778, llvm.org/pr21753
@skipIfReproducer # Unexpected packet during replay
def test_attach_continue_interrupt_detach(self):
"""Test attach/continue/interrupt/detach"""
self.build()
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/commands/process/attach/TestProcessAttach.py
Expand Up @@ -39,6 +39,7 @@ def test_attach_to_process_by_id(self):
self.assertTrue(process, PROCESS_IS_VALID)

@expectedFailureNetBSD
@skipIfReproducer # Unexpected packet during replay
def test_attach_to_process_from_different_dir_by_id(self):
"""Test attach by process id"""
newdir = self.getBuildArtifact("newdir")
Expand Down
Expand Up @@ -45,6 +45,7 @@ def test_copy_from_dummy_target(self):
self.build()
self.do_test_copy_from_dummy_target()

@skipIfReproducer # Unexpected packet during replay
def make_target_and_import(self):
target = self.make_target()
self.import_resolver_script()
Expand Down
Expand Up @@ -26,6 +26,7 @@ def test_with_python(self):
self.build()
self.do_conditional_break()

@skipIfReproducer # Unexpected packet during replay
def test_with_command(self):
"""Simulate a user using lldb commands to break on c() if called from a()."""
self.build()
Expand Down
Expand Up @@ -17,6 +17,7 @@ def test_connect(self):
process = self.connect(target)
self.assertPacketLogContains(["qProcessInfo", "qfThreadInfo"])

@skipIfReproducer # Unexpected packet during replay
def test_attach_fail(self):
error_msg = "mock-error-msg"

Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/functionalities/signal/TestSendSignal.py
Expand Up @@ -23,6 +23,7 @@ def setUp(self):
bugnumber="llvm.org/pr23318: does not report running state")
@expectedFailureNetBSD(bugnumber='llvm.org/pr43959')
@skipIfWindows # Windows does not support signals
@skipIfReproducer # Unexpected packet during replay
def test_with_run_command(self):
"""Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process."""
self.build()
Expand Down
Expand Up @@ -4,6 +4,7 @@

import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *

class StepScriptedTestCase(TestBase):
Expand All @@ -17,12 +18,14 @@ def setUp(self):
self.main_source_file = lldb.SBFileSpec("main.c")
self.runCmd("command script import Steps.py")

@skipIfReproducer # Unexpected packet during replay
def test_standard_step_out(self):
"""Tests stepping with the scripted thread plan laying over a standard
thread plan for stepping out."""
self.build()
self.step_out_with_scripted_plan("Steps.StepOut")

@skipIfReproducer # Unexpected packet during replay
def test_scripted_step_out(self):
"""Tests stepping with the scripted thread plan laying over an another
scripted thread plan for stepping out."""
Expand Down Expand Up @@ -62,10 +65,12 @@ def test_misspelled_plan_name(self):
# Make sure we didn't let the process run:
self.assertEqual(stop_id, process.GetStopID(), "Process didn't run")

@skipIfReproducer # Unexpected packet during replay
def test_checking_variable(self):
"""Test that we can call SBValue API's from a scripted thread plan - using SBAPI's to step"""
self.do_test_checking_variable(False)

@skipIfReproducer # Unexpected packet during replay
def test_checking_variable_cli(self):
"""Test that we can call SBValue API's from a scripted thread plan - using cli to step"""
self.do_test_checking_variable(True)
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/lang/objc/foundation/TestRuntimeTypes.py
Expand Up @@ -19,6 +19,7 @@ class RuntimeTypesTestCase(TestBase):
oslist=["macosx"],
debug_info="gmodules",
bugnumber="llvm.org/pr27862")
@skipIfReproducer # Unexpected packet during replay
def test_break(self):
"""Test setting objc breakpoints using '_regexp-break' and 'breakpoint set'."""
if self.getArchitecture() != 'x86_64':
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/lang/objc/modules/TestObjCModules.py
Expand Up @@ -22,6 +22,7 @@ def setUp(self):

@skipUnlessDarwin
@skipIf(macos_version=["<", "10.12"])
@skipIfReproducer # Unexpected packet during replay
def test_expr(self):
self.build()
exe = self.getBuildArtifact("a.out")
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/lang/objc/print-obj/TestPrintObj.py
Expand Up @@ -24,6 +24,7 @@ def setUp(self):
# Find the line numbers to break at.
self.line = line_number(self.source, '// Set a breakpoint here.')

@skipIfReproducer # Unexpected packet during replay
def test_print_obj(self):
"""
Test "print object" where another thread blocks the print object from making progress.
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/python_api/hello_world/TestHelloWorld.py
Expand Up @@ -109,6 +109,7 @@ def test_with_attach_to_process_with_id_api(self):
@skipIfiOSSimulator
@skipIfAsan # FIXME: Hangs indefinitely.
@expectedFailureNetBSD
@skipIfReproducer # Unexpected packet during replay
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.testMethodName, os.getpid())
Expand Down

0 comments on commit 1e566f6

Please sign in to comment.