Skip to content

Commit 754519a

Browse files
authored
gh-109580: Skip test_perf_profiler on ASAN build (#109584)
Skip test_perf_profiler if Python is built with ASAN, MSAN or UBSAN sanitizer. Python does crash randomly in this test on such build.
1 parent 9df6712 commit 754519a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Lib/test/test_perf_profiler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
if not support.has_subprocess_support:
1818
raise unittest.SkipTest("test module requires subprocess")
1919

20+
if support.check_sanitizer(address=True, memory=True, ub=True):
21+
# gh-109580: Skip the test because it does crash randomly if Python is
22+
# built with ASAN.
23+
raise unittest.SkipTest("test crash randomly on ASAN/MSAN/UBSAN build")
24+
2025

2126
def supports_trampoline_profiling():
2227
perf_trampoline = sysconfig.get_config_var("PY_HAVE_PERF_TRAMPOLINE")
@@ -287,7 +292,6 @@ def run_perf(cwd, *args, **env_vars):
287292

288293
@unittest.skipUnless(perf_command_works(), "perf command doesn't work")
289294
@unittest.skipUnless(is_unwinding_reliable(), "Unwinding is unreliable")
290-
@support.skip_if_sanitizer(address=True, memory=True, ub=True)
291295
class TestPerfProfiler(unittest.TestCase):
292296
def setUp(self):
293297
super().setUp()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Skip ``test_perf_profiler`` if Python is built with ASAN, MSAN or UBSAN
2+
sanitizer. Python does crash randomly in this test on such build. Patch by
3+
Victor Stinner.

0 commit comments

Comments
 (0)