[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
This commit is contained in:
Michał Górny 2021-08-07 22:44:19 +02:00
parent f599e7a789
commit 15cacab73f
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -140,3 +140,6 @@ if platform.system() == 'NetBSD' and os.geteuid() != 0:
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')