summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_perf_profiler.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-19 17:42:51 (GMT)
committerGitHub <noreply@github.com>2023-09-19 17:42:51 (GMT)
commit754519a9f8c2bb06d85ff9b3e9fe6f967ac46d5c (patch)
treec71faa4fa666b3ec320467eae6447724921ce368 /Lib/test/test_perf_profiler.py
parent9df6712c122b621dc5a1053ff1eccf0debfb2148 (diff)
downloadcpython-754519a9f8c2bb06d85ff9b3e9fe6f967ac46d5c.zip
cpython-754519a9f8c2bb06d85ff9b3e9fe6f967ac46d5c.tar.gz
cpython-754519a9f8c2bb06d85ff9b3e9fe6f967ac46d5c.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_perf_profiler.py')
-rw-r--r--Lib/test/test_perf_profiler.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_perf_profiler.py b/Lib/test/test_perf_profiler.py
index 5418f9f..fe8707a 100644
--- a/Lib/test/test_perf_profiler.py
+++ b/Lib/test/test_perf_profiler.py
@@ -17,6 +17,11 @@ from test.support.os_helper import temp_dir
if not support.has_subprocess_support:
raise unittest.SkipTest("test module requires subprocess")
+if support.check_sanitizer(address=True, memory=True, ub=True):
+ # gh-109580: Skip the test because it does crash randomly if Python is
+ # built with ASAN.
+ raise unittest.SkipTest("test crash randomly on ASAN/MSAN/UBSAN build")
+
def supports_trampoline_profiling():
perf_trampoline = sysconfig.get_config_var("PY_HAVE_PERF_TRAMPOLINE")
@@ -287,7 +292,6 @@ def run_perf(cwd, *args, **env_vars):
@unittest.skipUnless(perf_command_works(), "perf command doesn't work")
@unittest.skipUnless(is_unwinding_reliable(), "Unwinding is unreliable")
-@support.skip_if_sanitizer(address=True, memory=True, ub=True)
class TestPerfProfiler(unittest.TestCase):
def setUp(self):
super().setUp()