]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-109580: Skip test_perf_profiler on ASAN build (#109584)
authorVictor Stinner <vstinner@python.org>
Tue, 19 Sep 2023 17:42:51 +0000 (19:42 +0200)
committerGitHub <noreply@github.com>
Tue, 19 Sep 2023 17:42:51 +0000 (19:42 +0200)
Skip test_perf_profiler if Python is built with ASAN, MSAN or UBSAN
sanitizer. Python does crash randomly in this test on such build.

Lib/test/test_perf_profiler.py
Misc/NEWS.d/next/Tests/2023-09-19-19-08-22.gh-issue-109580.G02Zam.rst [new file with mode: 0644]

index 5418f9f35485f8f275fccb31f64cd07b7483a8fb..fe8707a156e9dc1df6bc59be4f1ea4b822ddbe66 100644 (file)
@@ -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()
diff --git a/Misc/NEWS.d/next/Tests/2023-09-19-19-08-22.gh-issue-109580.G02Zam.rst b/Misc/NEWS.d/next/Tests/2023-09-19-19-08-22.gh-issue-109580.G02Zam.rst
new file mode 100644 (file)
index 0000000..b917cbf
--- /dev/null
@@ -0,0 +1,3 @@
+Skip ``test_perf_profiler`` if Python is built with ASAN, MSAN or UBSAN
+sanitizer. Python does crash randomly in this test on such build. Patch by
+Victor Stinner.