summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-02 15:00:11 (GMT)
committerGitHub <noreply@github.com>2023-10-02 15:00:11 (GMT)
commitc3038bed1df2dc0399379cec81544a3d725674ef (patch)
tree9e6db2a43e563460c524ef09fa467980b57e77bc
parentddc0adcdb3ac0fbd14367876304ae61f68cb1813 (diff)
downloadcpython-c3038bed1df2dc0399379cec81544a3d725674ef.zip
cpython-c3038bed1df2dc0399379cec81544a3d725674ef.tar.gz
cpython-c3038bed1df2dc0399379cec81544a3d725674ef.tar.bz2
[3.12] gh-109580: Skip test_perf_profiler on ASAN build (GH-109584) (#109585)
gh-109580: Skip test_perf_profiler on ASAN build (GH-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. (cherry picked from commit 754519a9f8c2bb06d85ff9b3e9fe6f967ac46d5c) Co-authored-by: Victor Stinner <vstinner@python.org>
-rw-r--r--Lib/test/test_perf_profiler.py6
-rw-r--r--Misc/NEWS.d/next/Tests/2023-09-19-19-08-22.gh-issue-109580.G02Zam.rst3
2 files changed, 8 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()
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
index 0000000..b917cbf
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2023-09-19-19-08-22.gh-issue-109580.G02Zam.rst
@@ -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.