Skip to content

Commit

Permalink
Skip various tests under ASAN on green dragon (#90531)
Browse files Browse the repository at this point in the history
using the macOS version as a proxy. I can't reproduce any of these
failures locally, but the tests all use pexpect and probably have bad
timeout behavior under high load.
  • Loading branch information
adrian-prantl authored Apr 29, 2024
1 parent e24a7bb commit 1b70580
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 4 deletions.
9 changes: 8 additions & 1 deletion lldb/packages/Python/lldbsuite/test/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def _decorateTest(
remote=None,
dwarf_version=None,
setting=None,
asan=None,
):
def fn(actual_debug_info=None):
skip_for_os = _match_decorator_property(
Expand Down Expand Up @@ -256,6 +257,7 @@ def fn(actual_debug_info=None):
)
)
skip_for_setting = (setting is None) or (setting in configuration.settings)
skip_for_asan = (asan is None) or is_running_under_asan()

# For the test to be skipped, all specified (e.g. not None) parameters must be True.
# An unspecified parameter means "any", so those are marked skip by default. And we skip
Expand All @@ -273,6 +275,7 @@ def fn(actual_debug_info=None):
(remote, skip_for_remote, "platform locality (remote/local)"),
(dwarf_version, skip_for_dwarf_version, "dwarf version"),
(setting, skip_for_setting, "setting"),
(asan, skip_for_asan, "running under asan"),
]
reasons = []
final_skip_result = True
Expand Down Expand Up @@ -331,6 +334,7 @@ def expectedFailureAll(
remote=None,
dwarf_version=None,
setting=None,
asan=None,
):
return _decorateTest(
DecorateMode.Xfail,
Expand All @@ -348,6 +352,7 @@ def expectedFailureAll(
remote=remote,
dwarf_version=dwarf_version,
setting=setting,
asan=asan,
)


Expand All @@ -356,7 +361,7 @@ def expectedFailureAll(
# for example,
# @skipIf, skip for all platform/compiler/arch,
# @skipIf(compiler='gcc'), skip for gcc on all platform/architecture
# @skipIf(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), skip for gcc>=4.9 on linux with i386
# @skipIf(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), skip for gcc>=4.9 on linux with i386 (all conditions must be true)
def skipIf(
bugnumber=None,
oslist=None,
Expand All @@ -372,6 +377,7 @@ def skipIf(
remote=None,
dwarf_version=None,
setting=None,
asan=None,
):
return _decorateTest(
DecorateMode.Skip,
Expand All @@ -389,6 +395,7 @@ def skipIf(
remote=remote,
dwarf_version=dwarf_version,
setting=setting,
asan=asan,
)


Expand Down
4 changes: 4 additions & 0 deletions lldb/test/API/driver/batch_mode/TestBatchMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
class DriverBatchModeTest(PExpectTest):
source = "main.c"

@skipIf(macos_version=["<", "14.0"], asan=True)
@skipIf(oslist=["linux"], archs=["arm", "aarch64"]) # Randomly fails on buildbot
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
def test_batch_mode_run_crash(self):
Expand Down Expand Up @@ -50,6 +51,7 @@ def test_batch_mode_run_crash(self):
self.expect_prompt()
self.expect("frame variable touch_me_not", substrs=["(char *) touch_me_not"])

@skipIf(macos_version=["<", "14.0"], asan=True)
@skipIf(oslist=["linux"], archs=["arm", "aarch64"]) # Randomly fails on buildbot
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
def test_batch_mode_run_exit(self):
Expand Down Expand Up @@ -86,6 +88,7 @@ def test_batch_mode_run_exit(self):

child.expect(pexpect.EOF)

@skipIf(macos_version=["<", "14.0"], asan=True)
@skipIf(oslist=["linux"], archs=["arm", "aarch64"]) # Randomly fails on buildbot
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
def test_batch_mode_launch_stop_at_entry(self):
Expand Down Expand Up @@ -125,6 +128,7 @@ def closeVictim(self):
self.victim.close()
self.victim = None

@skipIf(macos_version=["<", "14.0"], asan=True)
@skipIf(oslist=["linux"], archs=["arm", "aarch64"]) # Randomly fails on buildbot
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
@expectedFailureNetBSD
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/driver/job_control/TestJobControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


class JobControlTest(PExpectTest):
@skipIf(macos_version=["<", "14.0"], asan=True)
@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
def test_job_control(self):
def post_spawn():
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/driver/quit_speed/TestQuitWithProcess.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def test_run_quit(self):
print("Got launch message")
child.sendline("quit")
print("sent quit")
child.expect(pexpect.EOF, timeout=15)
child.expect(pexpect.EOF, timeout=60)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@


class TestCase(PExpectTest):
@skipIf(macos_version=["<", "14.0"], asan=True)
@skipIf(compiler="clang", compiler_version=["<", "11.0"])
@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
def test(self):
Expand Down
8 changes: 6 additions & 2 deletions lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
class DarwinNSLogOutputTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True

@skipUnlessDarwin
@skipIfRemote # this test is currently written using lldb commands & assumes running on local system
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
Expand Down Expand Up @@ -119,6 +117,9 @@ def do_test(self, expect_regexes=None, settings_commands=None):
self.runCmd("process continue")
self.expect(expect_regexes)

@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
@skipUnlessDarwin
@skipIfRemote # this test is currently written using lldb commands & assumes running on local system
def test_nslog_output_is_displayed(self):
"""Test that NSLog() output shows up in the command-line debugger."""
self.do_test(
Expand All @@ -131,6 +132,9 @@ def test_nslog_output_is_displayed(self):
self.assertGreater(len(self.child.match.groups()), 0)
self.assertEqual("This is a message from NSLog", self.child.match.group(1))

@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
@skipUnlessDarwin
@skipIfRemote # this test is currently written using lldb commands & assumes running on local system
def test_nslog_output_is_suppressed_with_env_var(self):
"""Test that NSLog() output does not show up with the ignore env var."""
# This test will only work properly on macOS 10.12+. Skip it on earlier versions.
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/terminal/TestSTTYBeforeAndAfter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def classCleanup(cls):
cls.RemoveTempFile("child_send2.txt")
cls.RemoveTempFile("child_read2.txt")

@skipIf(macos_version=["<", "14.0"], asan=True)
@add_test_categories(["pexpect"])
@no_debug_info_test
def test_stty_dash_a_before_and_afetr_invoking_lldb_command(self):
Expand Down

0 comments on commit 1b70580

Please sign in to comment.