]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-140381: Increase slow_fibonacci call frequency in test_profiling (#140673)
authorThierry Martos <81799048+ThierryMT@users.noreply.github.com>
Wed, 19 Nov 2025 00:01:09 +0000 (16:01 -0800)
committerGitHub <noreply@github.com>
Wed, 19 Nov 2025 00:01:09 +0000 (00:01 +0000)
Lib/test/test_profiling/test_sampling_profiler/test_integration.py
Misc/NEWS.d/next/Tests/2025-10-27-15-53-47.gh-issue-140381.N5o3pa.rst [new file with mode: 0644]

index 4fb2c595bbef9a8242a8b28a27118c247cb62319..e1c80fa6d5d1b73dfca80cd5cc001f423e397d78 100644 (file)
@@ -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 (file)
index 0000000..568a2b6
--- /dev/null
@@ -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.