Skip to content

Commit

Permalink
Skip strace tests when LD_PRELOAD is used
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Nov 20, 2024
1 parent 6d343d4 commit 59c6bd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/test/support/strace_helper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import re
import sys
import textwrap
Expand Down Expand Up @@ -160,6 +161,9 @@ def requires_strace():
if sys.platform != "linux":
return unittest.skip("Linux only, requires strace.")

if "LD_PRELOAD" in os.environ:
return unittest.skip("LD_PRELOAD can cause extra syscalls")

if support.check_sanitizer(address=True, memory=True):
return unittest.skip("LeakSanitizer does not work under ptrace (strace, gdb, etc)")

Expand Down

0 comments on commit 59c6bd8

Please sign in to comment.