Skip to content

Commit 1b70580

Browse files
Skip various tests under ASAN on green dragon (#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.
1 parent e24a7bb commit 1b70580

File tree

7 files changed

+22
-4
lines changed

7 files changed

+22
-4
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def _decorateTest(
206206
remote=None,
207207
dwarf_version=None,
208208
setting=None,
209+
asan=None,
209210
):
210211
def fn(actual_debug_info=None):
211212
skip_for_os = _match_decorator_property(
@@ -256,6 +257,7 @@ def fn(actual_debug_info=None):
256257
)
257258
)
258259
skip_for_setting = (setting is None) or (setting in configuration.settings)
260+
skip_for_asan = (asan is None) or is_running_under_asan()
259261

260262
# For the test to be skipped, all specified (e.g. not None) parameters must be True.
261263
# 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):
273275
(remote, skip_for_remote, "platform locality (remote/local)"),
274276
(dwarf_version, skip_for_dwarf_version, "dwarf version"),
275277
(setting, skip_for_setting, "setting"),
278+
(asan, skip_for_asan, "running under asan"),
276279
]
277280
reasons = []
278281
final_skip_result = True
@@ -331,6 +334,7 @@ def expectedFailureAll(
331334
remote=None,
332335
dwarf_version=None,
333336
setting=None,
337+
asan=None,
334338
):
335339
return _decorateTest(
336340
DecorateMode.Xfail,
@@ -348,6 +352,7 @@ def expectedFailureAll(
348352
remote=remote,
349353
dwarf_version=dwarf_version,
350354
setting=setting,
355+
asan=asan,
351356
)
352357

353358

@@ -356,7 +361,7 @@ def expectedFailureAll(
356361
# for example,
357362
# @skipIf, skip for all platform/compiler/arch,
358363
# @skipIf(compiler='gcc'), skip for gcc on all platform/architecture
359-
# @skipIf(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), skip for gcc>=4.9 on linux with i386
364+
# @skipIf(bugnumber, ["linux"], "gcc", ['>=', '4.9'], ['i386']), skip for gcc>=4.9 on linux with i386 (all conditions must be true)
360365
def skipIf(
361366
bugnumber=None,
362367
oslist=None,
@@ -372,6 +377,7 @@ def skipIf(
372377
remote=None,
373378
dwarf_version=None,
374379
setting=None,
380+
asan=None,
375381
):
376382
return _decorateTest(
377383
DecorateMode.Skip,
@@ -389,6 +395,7 @@ def skipIf(
389395
remote=remote,
390396
dwarf_version=dwarf_version,
391397
setting=setting,
398+
asan=asan,
392399
)
393400

394401

lldb/test/API/driver/batch_mode/TestBatchMode.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
class DriverBatchModeTest(PExpectTest):
1414
source = "main.c"
1515

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

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

8789
child.expect(pexpect.EOF)
8890

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

131+
@skipIf(macos_version=["<", "14.0"], asan=True)
128132
@skipIf(oslist=["linux"], archs=["arm", "aarch64"]) # Randomly fails on buildbot
129133
@expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
130134
@expectedFailureNetBSD

lldb/test/API/driver/job_control/TestJobControl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99

1010
class JobControlTest(PExpectTest):
11+
@skipIf(macos_version=["<", "14.0"], asan=True)
1112
@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
1213
def test_job_control(self):
1314
def post_spawn():

lldb/test/API/driver/quit_speed/TestQuitWithProcess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ def test_run_quit(self):
3131
print("Got launch message")
3232
child.sendline("quit")
3333
print("sent quit")
34-
child.expect(pexpect.EOF, timeout=15)
34+
child.expect(pexpect.EOF, timeout=60)

lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212

1313
class TestCase(PExpectTest):
14+
@skipIf(macos_version=["<", "14.0"], asan=True)
1415
@skipIf(compiler="clang", compiler_version=["<", "11.0"])
1516
@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
1617
def test(self):

lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
class DarwinNSLogOutputTestCase(TestBase):
2121
NO_DEBUG_INFO_TESTCASE = True
2222

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

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

135+
@skipIf(oslist=["linux"], archs=["arm", "aarch64"])
136+
@skipUnlessDarwin
137+
@skipIfRemote # this test is currently written using lldb commands & assumes running on local system
134138
def test_nslog_output_is_suppressed_with_env_var(self):
135139
"""Test that NSLog() output does not show up with the ignore env var."""
136140
# This test will only work properly on macOS 10.12+. Skip it on earlier versions.

lldb/test/API/terminal/TestSTTYBeforeAndAfter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def classCleanup(cls):
1919
cls.RemoveTempFile("child_send2.txt")
2020
cls.RemoveTempFile("child_read2.txt")
2121

22+
@skipIf(macos_version=["<", "14.0"], asan=True)
2223
@add_test_categories(["pexpect"])
2324
@no_debug_info_test
2425
def test_stty_dash_a_before_and_afetr_invoking_lldb_command(self):

0 commit comments

Comments
 (0)