return skipTestIfFn(is_compiler_clang_with_ubsan)(func)
+def is_running_under_asan():
+ if ('ASAN_OPTIONS' in os.environ):
+ return "ASAN unsupported"
+ return None
+
def skipUnlessAddressSanitizer(func):
"""Decorate the item to skip test unless Clang -fsanitize=thread is supported."""
def is_compiler_with_address_sanitizer(self):
+ # Also don't run tests that use address sanitizer inside an
+ # address-sanitized LLDB. The tests don't support that
+ # configuration.
+ if is_running_under_asan():
+ return "Address sanitizer tests are disabled when runing under ASAN"
+
compiler_path = self.getCompiler()
compiler = os.path.basename(compiler_path)
f = tempfile.NamedTemporaryFile()
return None
return skipTestIfFn(is_compiler_with_address_sanitizer)(func)
+def skipIfAsan(func):
+ """Skip this test if the environment is set up to run LLDB *itself* under ASAN."""
+ return skipTestIfFn(is_running_under_asan)(func)
+
def _get_bool_config_skip_if_decorator(key):
config = lldb.SBDebugger.GetBuildConfiguration()
value_node = config.GetValueForKey(key)
return "%s is not supported on this system." % feature
return skipTestIfFn(is_feature_enabled)
-def skipIfAsan(func):
- """Skip this test if the environment is set up to run LLDB itself under ASAN."""
- def is_asan():
- if ('ASAN_OPTIONS' in os.environ):
- return "ASAN unsupported"
- return None
- return skipTestIfFn(is_asan)(func)
-
def skipIfReproducer(func):
"""Skip this test if the environment is set up to run LLDB with reproducers."""
def is_reproducer():