Skip to content

Commit 59c6bd8

Browse files
committed
Skip strace tests when LD_PRELOAD is used
Signed-off-by: Michał Górny <[email protected]>
1 parent 6d343d4 commit 59c6bd8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/support/strace_helper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import re
23
import sys
34
import textwrap
@@ -160,6 +161,9 @@ def requires_strace():
160161
if sys.platform != "linux":
161162
return unittest.skip("Linux only, requires strace.")
162163

164+
if "LD_PRELOAD" in os.environ:
165+
return unittest.skip("LD_PRELOAD can cause extra syscalls")
166+
163167
if support.check_sanitizer(address=True, memory=True):
164168
return unittest.skip("LeakSanitizer does not work under ptrace (strace, gdb, etc)")
165169

0 commit comments

Comments
 (0)