From: Thierry Martos <81799048+ThierryMT@users.noreply.github.com> Date: Wed, 19 Nov 2025 00:01:09 +0000 (-0800) Subject: gh-140381: Increase slow_fibonacci call frequency in test_profiling (#140673) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=652c764a59913327b28b32016405696a620d969e;p=thirdparty%2FPython%2Fcpython.git gh-140381: Increase slow_fibonacci call frequency in test_profiling (#140673) --- diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_integration.py b/Lib/test/test_profiling/test_sampling_profiler/test_integration.py index 4fb2c595bbef..e1c80fa6d5d1 100644 --- a/Lib/test/test_profiling/test_sampling_profiler/test_integration.py +++ b/Lib/test/test_profiling/test_sampling_profiler/test_integration.py @@ -414,8 +414,8 @@ def main_loop(): if iteration % 3 == 0: # Very CPU intensive result = cpu_intensive_work() - elif iteration % 5 == 0: - # Expensive recursive operation + elif iteration % 2 == 0: + # Expensive recursive operation (increased frequency for slower machines) result = slow_fibonacci(12) else: # Medium operation diff --git a/Misc/NEWS.d/next/Tests/2025-10-27-15-53-47.gh-issue-140381.N5o3pa.rst b/Misc/NEWS.d/next/Tests/2025-10-27-15-53-47.gh-issue-140381.N5o3pa.rst new file mode 100644 index 000000000000..568a2b65d7d2 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2025-10-27-15-53-47.gh-issue-140381.N5o3pa.rst @@ -0,0 +1 @@ +Fix flaky test_profiling tests on i686 and s390x architectures by increasing slow_fibonacci call frequency from every 5th iteration to every 2nd iteration.