https://github.com/python/cpython/commit/652c764a59913327b28b32016405696a620d969e
commit: 652c764a59913327b28b32016405696a620d969e
branch: main
author: Thierry Martos <[email protected]>
committer: pablogsal <[email protected]>
date: 2025-11-19T00:01:09Z
summary:
gh-140381: Increase slow_fibonacci call frequency in test_profiling (#140673)
files:
A Misc/NEWS.d/next/Tests/2025-10-27-15-53-47.gh-issue-140381.N5o3pa.rst
M Lib/test/test_profiling/test_sampling_profiler/test_integration.py
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 4fb2c595bbef9a..e1c80fa6d5d1b7 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 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.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]