[Lldb-commits] [lldb] 15cacab - [lldb] [test] Skip Expr/nodefaultlib.cpp test if LD_PRELOAD Is used

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 9 12:35:26 PDT 2021


Author: Michał Górny
Date: 2021-08-09T21:35:11+02:00
New Revision: 15cacab73f7e36d9dca4a5516ccb360b67bf2dbc

URL: https://github.com/llvm/llvm-project/commit/15cacab73f7e36d9dca4a5516ccb360b67bf2dbc
DIFF: https://github.com/llvm/llvm-project/commit/15cacab73f7e36d9dca4a5516ccb360b67bf2dbc.diff

LOG: [lldb] [test] Skip Expr/nodefaultlib.cpp test if LD_PRELOAD Is used

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.

Differential Revision: https://reviews.llvm.org/D107701

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/test/Shell/Expr/nodefaultlib.cpp b/lldb/test/Shell/Expr/nodefaultlib.cpp
index 5c4f19d40efc7..fb53da7fcb08b 100644
--- a/lldb/test/Shell/Expr/nodefaultlib.cpp
+++ b/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
 

diff  --git a/lldb/test/Shell/lit.cfg.py b/lldb/test/Shell/lit.cfg.py
index 964efc8c3505f..aecd9d62c2144 100644
--- a/lldb/test/Shell/lit.cfg.py
+++ b/lldb/test/Shell/lit.cfg.py
@@ -140,3 +140,6 @@ def calculate_arch_features(arch_string):
         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')


        


More information about the lldb-commits mailing list