diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
3 files changed, 10 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index e2223ed7044..c0813f191c8 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -806,3 +806,10 @@ def skipUnlessFeature(feature): except subprocess.CalledProcessError: return "%s is not supported on this system." % feature return skipTestIfFn(is_feature_enabled) + +def skipIfSanitized(func): + """Skip this test if the environment is set up to run LLDB itself under ASAN.""" + def is_sanitized(): + return (('DYLD_INSERT_LIBRARIES' in os.env) and + 'libclang_rt.asan' in os.env['DYLD_INSERT_LIBRARIES']) + return skipTestIfFn(is_sanitized)(func) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py b/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py index 642530a4ad2..2cec254acc0 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py @@ -31,12 +31,14 @@ class ExecTestCase(TestBase): @skipUnlessDarwin @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532") @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems + @skipIfSanitized # rdar://problem/43756823 def test_hitting_exec (self): self.do_test(False) @skipUnlessDarwin @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532") @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems + @skipIfSanitized # rdar://problem/43756823 def test_skipping_exec (self): self.do_test(True) diff --git a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py index 6d1fb232d99..33f4a790aac 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py +++ b/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py @@ -107,6 +107,7 @@ class HelloWorldTestCase(TestBase): @add_test_categories(['pyapi']) @skipIfiOSSimulator + @skipIfSanitized # FIXME: Hangs indefinitely. def test_with_attach_to_process_with_name_api(self): """Create target, spawn a process, and attach to it with process name.""" exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid()) |