https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/90531
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. >From 46d19cc3211fa6e27f7e49238777e533c0a173bc Mon Sep 17 00:00:00 2001 From: Adrian Prantl <apra...@apple.com> Date: Mon, 29 Apr 2024 15:38:25 -0700 Subject: [PATCH] Skip various tests under ASAN on green dragon 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. --- lldb/packages/Python/lldbsuite/test/decorators.py | 7 ++++++- lldb/test/API/driver/batch_mode/TestBatchMode.py | 4 ++++ lldb/test/API/driver/job_control/TestJobControl.py | 1 + lldb/test/API/driver/quit_speed/TestQuitWithProcess.py | 2 +- .../API/iohandler/sigint/TestProcessIOHandlerInterrupt.py | 1 + lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py | 8 ++++++-- lldb/test/API/terminal/TestSTTYBeforeAndAfter.py | 1 + 7 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index 8e13aa6a13882f..90eb198ad8c9e3 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -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( @@ -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 @@ -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 @@ -356,7 +359,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, @@ -372,6 +375,7 @@ def skipIf( remote=None, dwarf_version=None, setting=None, + asan=None ): return _decorateTest( DecorateMode.Skip, @@ -389,6 +393,7 @@ def skipIf( remote=remote, dwarf_version=dwarf_version, setting=setting, + asan=asan ) diff --git a/lldb/test/API/driver/batch_mode/TestBatchMode.py b/lldb/test/API/driver/batch_mode/TestBatchMode.py index 642dd47c6d4586..bc6f2daebbab81 100644 --- a/lldb/test/API/driver/batch_mode/TestBatchMode.py +++ b/lldb/test/API/driver/batch_mode/TestBatchMode.py @@ -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): @@ -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): @@ -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): @@ -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 diff --git a/lldb/test/API/driver/job_control/TestJobControl.py b/lldb/test/API/driver/job_control/TestJobControl.py index 1a1739f4cb391d..648acb1d4730bc 100644 --- a/lldb/test/API/driver/job_control/TestJobControl.py +++ b/lldb/test/API/driver/job_control/TestJobControl.py @@ -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(): diff --git a/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py b/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py index 42527c88b99213..c75ac977ea2094 100644 --- a/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py +++ b/lldb/test/API/driver/quit_speed/TestQuitWithProcess.py @@ -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) diff --git a/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py b/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py index 8e19d56cd0c2f9..75ac0f6c0289a4 100644 --- a/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py +++ b/lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py @@ -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): diff --git a/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py b/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py index 15d9feb543895a..f6bda16560b962 100644 --- a/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py +++ b/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py @@ -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) @@ -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( @@ -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. diff --git a/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py b/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py index 21aca5fc85d5f1..313a265319dbac 100644 --- a/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py +++ b/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py @@ -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): _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits