Skip to content

Commit

Permalink
fix the strace availability check.
Browse files Browse the repository at this point in the history
  • Loading branch information
gpshead committed Dec 5, 2023
1 parent 947be7f commit 48e01eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -3375,14 +3375,16 @@ def test_vfork_used_when_expected(self):
true_binary = "/bin/true"
strace_command = [strace_binary, strace_filter]

if os.path.isfile(strace_binary):
self.skipTest(f"{strace_binary} not found.")
does_strace_work_process = subprocess.run(
strace_command + [true_binary],
stderr=subprocess.PIPE,
stdout=subprocess.DEVNULL,
)
if (does_strace_work_process.returncode != 0 or
b"+++ exited with 0 +++" not in does_strace_work_process.stderr):
self.skipTest("strace not found or is not working as expected.")
self.skipTest("strace is not working as expected.")

with self.subTest(name="default_is_vfork"):
vfork_result = assert_python_ok(
Expand Down

0 comments on commit 48e01eb

Please sign in to comment.