[llvm-branch-commits] [lldb] bf742f2 - [lldb] [test] Skip Expr/nodefaultlib.cpp test if LD_PRELOAD Is used
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 10 15:35:36 PDT 2021
Author: Michał Górny
Date: 2021-08-10T15:35:25-07:00
New Revision: bf742f285094e0468ea2cd7aa079f13b1ce8d0fd
URL: https://github.com/llvm/llvm-project/commit/bf742f285094e0468ea2cd7aa079f13b1ce8d0fd
DIFF: https://github.com/llvm/llvm-project/commit/bf742f285094e0468ea2cd7aa079f13b1ce8d0fd.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
(cherry picked from commit 15cacab73f7e36d9dca4a5516ccb360b67bf2dbc)
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 llvm-branch-commits
mailing list