[Lldb-commits] [PATCH] D107701: [lldb] [test] Skip Expr/nodefaultlib.cpp test if LD_PRELOAD Is used

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Aug 7 13:47:15 PDT 2021


mgorny created this revision.
mgorny added reviewers: labath, krytarowski, JDevlieghere, jasonmolenda.
mgorny requested review of this revision.

Some LD_PRELOAD-ed libraries tend to interact badly with --nodefaultlib,
particularly Gentoo sandbox.  Do not run this test if LD_PRELOAD is
present in the running environment.


https://reviews.llvm.org/D107701

Files:
  lldb/test/Shell/Expr/nodefaultlib.cpp
  lldb/test/Shell/lit.cfg.py


Index: lldb/test/Shell/lit.cfg.py
===================================================================
--- lldb/test/Shell/lit.cfg.py
+++ lldb/test/Shell/lit.cfg.py
@@ -140,3 +140,6 @@
         can_set_dbregs = False
 if can_set_dbregs:
     config.available_features.add('dbregs-set')
+
+if 'LD_PRELOAD' in os.environ:
+    config.available_features.add('ld_preload-present')
Index: lldb/test/Shell/Expr/nodefaultlib.cpp
===================================================================
--- lldb/test/Shell/Expr/nodefaultlib.cpp
+++ lldb/test/Shell/Expr/nodefaultlib.cpp
@@ -2,6 +2,7 @@
 // standard library (and mmap-like functions in particular).
 
 // REQUIRES: native
+// UNSUPPORTED: ld_preload-present
 // XFAIL: system-linux && !(target-x86 || target-x86_64)
 // XFAIL: system-netbsd || system-freebsd || system-darwin
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107701.364983.patch
Type: text/x-patch
Size: 830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210807/d1c7e094/attachment.bin>


More information about the lldb-commits mailing list