Skip to content

Commit 3b6c094

Browse files
committed
Exit early if strace exited non-zero
1 parent 283a077 commit 3b6c094

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/support/strace_helper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ def _make_error(reason, details):
9494
except OSError as err:
9595
return _make_error("Caught OSError", err)
9696

97+
if check and res.rc:
98+
res.fail(cmd_line)
99+
97100
# Get out program returncode
98101
decoded = res.err.decode().strip()
99102

@@ -108,7 +111,7 @@ def _make_error(reason, details):
108111
output[1][:50])
109112

110113
python_returncode = int(returncode_match["returncode"])
111-
if check and (res.rc or python_returncode):
114+
if check and python_returncode:
112115
res.fail(cmd_line)
113116

114117
return StraceResult(strace_returncode=res.rc,

0 commit comments

Comments
 (0)