https://github.com/python/cpython/commit/67086282fcc1fc944be2e723cfc05de16109793a
commit: 67086282fcc1fc944be2e723cfc05de16109793a
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2025-05-09T18:25:47+02:00
summary:
gh-133741: Fix _can_strace(): check --trace option (#133766)
The --trace option needs strace 5.5 or newer.
files:
M Lib/test/support/strace_helper.py
diff --git a/Lib/test/support/strace_helper.py
b/Lib/test/support/strace_helper.py
index 798d6c6886962f..1a9d2b520b7b23 100644
--- a/Lib/test/support/strace_helper.py
+++ b/Lib/test/support/strace_helper.py
@@ -178,7 +178,10 @@ def get_syscalls(code, strace_flags, prelude="",
cleanup="",
# Moderately expensive (spawns a subprocess), so share results when possible.
@cache
def _can_strace():
- res = strace_python("import sys; sys.exit(0)", [], check=False)
+ res = strace_python("import sys; sys.exit(0)",
+ # --trace option needs strace 5.5 (gh-133741)
+ ["--trace=%process"],
+ check=False)
if res.strace_returncode == 0 and res.python_returncode == 0:
assert res.events(), "Should have parsed multiple calls"
return True
_______________________________________________
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]