[Lldb-commits] [lldb] Skip various tests under ASAN on green dragon (PR #90531)

2024-04-29 Thread Adrian Prantl via lldb-commits

https://github.com/adrian-prantl closed 
https://github.com/llvm/llvm-project/pull/90531
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Skip various tests under ASAN on green dragon (PR #90531)

2024-04-29 Thread Adrian Prantl via lldb-commits

https://github.com/adrian-prantl updated 
https://github.com/llvm/llvm-project/pull/90531

>From 34aaec09e03d0da6b2d511708fb3fe3e71b29c55 Mon Sep 17 00:00:00 2001
From: Adrian Prantl 
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| 9 -
 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 +-
 .../iohandler/sigint/TestProcessIOHandlerInterrupt.py| 1 +
 lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py  | 8 ++--
 lldb/test/API/terminal/TestSTTYBeforeAndAfter.py | 1 +
 7 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py 
b/lldb/packages/Python/lldbsuite/test/decorators.py
index 8e13aa6a13882f..7fb88cef165356 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
@@ -331,6 +334,7 @@ def expectedFailureAll(
 remote=None,
 dwarf_version=None,
 setting=None,
+asan=None,
 ):
 return _decorateTest(
 DecorateMode.Xfail,
@@ -348,6 +352,7 @@ def expectedFailureAll(
 remote=remote,
 dwarf_version=dwarf_version,
 setting=setting,
+asan=asan,
 )
 
 
@@ -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,
@@ -372,6 +377,7 @@ def skipIf(
 remote=None,
 dwarf_version=None,
 setting=None,
+asan=None,
 ):
 return _decorateTest(
 DecorateMode.Skip,
@@ -389,6 +395,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)
 

[Lldb-commits] [lldb] Skip various tests under ASAN on green dragon (PR #90531)

2024-04-29 Thread via lldb-commits

github-actions[bot] wrote:




:warning: Python code formatter, darker found issues in your code. :warning:



You can test this locally with the following command:


``bash
darker --check --diff -r 
975eca0e6a3459e59e96b0df33ea0cfbd157c597...46d19cc3211fa6e27f7e49238777e533c0a173bc
 lldb/packages/Python/lldbsuite/test/decorators.py 
lldb/test/API/driver/batch_mode/TestBatchMode.py 
lldb/test/API/driver/job_control/TestJobControl.py 
lldb/test/API/driver/quit_speed/TestQuitWithProcess.py 
lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py 
lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py 
lldb/test/API/terminal/TestSTTYBeforeAndAfter.py
``





View the diff from darker here.


``diff
--- packages/Python/lldbsuite/test/decorators.py2024-04-29 
22:38:25.00 +
+++ packages/Python/lldbsuite/test/decorators.py2024-04-29 
22:46:41.105318 +
@@ -373,11 +373,11 @@
 py_version=None,
 macos_version=None,
 remote=None,
 dwarf_version=None,
 setting=None,
-asan=None
+asan=None,
 ):
 return _decorateTest(
 DecorateMode.Skip,
 bugnumber=bugnumber,
 oslist=oslist,
@@ -391,11 +391,11 @@
 py_version=py_version,
 macos_version=macos_version,
 remote=remote,
 dwarf_version=dwarf_version,
 setting=setting,
-asan=asan
+asan=asan,
 )
 
 
 def _skip_fn_for_android(reason, api_levels, archs):
 def impl():

``




https://github.com/llvm/llvm-project/pull/90531
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Skip various tests under ASAN on green dragon (PR #90531)

2024-04-29 Thread Jonas Devlieghere via lldb-commits

https://github.com/JDevlieghere approved this pull request.


https://github.com/llvm/llvm-project/pull/90531
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] Skip various tests under ASAN on green dragon (PR #90531)

2024-04-29 Thread Adrian Prantl via lldb-commits

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 
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

[Lldb-commits] [lldb] Skip various tests under ASAN on green dragon (PR #90531)

2024-04-29 Thread via lldb-commits

llvmbot wrote:




@llvm/pr-subscribers-lldb

Author: Adrian Prantl (adrian-prantl)


Changes

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/90531.diff


7 Files Affected:

- (modified) lldb/packages/Python/lldbsuite/test/decorators.py (+6-1) 
- (modified) lldb/test/API/driver/batch_mode/TestBatchMode.py (+4) 
- (modified) lldb/test/API/driver/job_control/TestJobControl.py (+1) 
- (modified) lldb/test/API/driver/quit_speed/TestQuitWithProcess.py (+1-1) 
- (modified) lldb/test/API/iohandler/sigint/TestProcessIOHandlerInterrupt.py 
(+1) 
- (modified) lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py (+6-2) 
- (modified) lldb/test/API/terminal/TestSTTYBeforeAndAfter.py (+1) 


``diff
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
+++