diff --git a/Lib/test/test_profiling/test_sampling_profiler.py b/Lib/test/test_profiling/test_sampling_profiler.py index 59bc18b9bcf14d..ff4556a3d9400c 100644 --- a/Lib/test/test_profiling/test_sampling_profiler.py +++ b/Lib/test/test_profiling/test_sampling_profiler.py @@ -1740,8 +1740,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-14-24-18.gh-issue-140381.aA6MJa.rst b/Misc/NEWS.d/next/Tests/2025-10-27-14-24-18.gh-issue-140381.aA6MJa.rst new file mode 100644 index 00000000000000..a6e0f2b4ccc016 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2025-10-27-14-24-18.gh-issue-140381.aA6MJa.rst @@ -0,0 +1 @@ +Misc/NEWS entry: Fix flaky test_profiling tests on i686 and s390x architectures by increasing slow_fibonacci call frequency from every 5th iteration to every 2nd iteration. diff --git a/Misc/NEWS.d/next/Tests/2025-10-27-14-32-22.gh-issue-140381.N5o3pa.rst b/Misc/NEWS.d/next/Tests/2025-10-27-14-32-22.gh-issue-140381.N5o3pa.rst new file mode 100644 index 00000000000000..568a2b65d7d204 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2025-10-27-14-32-22.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. 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 00000000000000..568a2b65d7d204 --- /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.