diff --git a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py index 675e064fa8ffaa6fbfad75c9653e9f569a44ee16..6226a4d11c1e43d10a9265505b19d2a3a60f6db2 100755 --- a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py +++ b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py @@ -45,8 +45,8 @@ def build_env(): if san_opt: value += ':abort_on_error=0' if key in ['ASAN_ACTIVATION_OPTIONS', 'SCUDO_OPTIONS'] or san_opt or key == 'LD_LIBRARY_PATH': - if key == 'TSAN_OPTIONS': - # Map TSan suppressions file to device + if key in ['TSAN_OPTIONS', 'UBSAN_OPTIONS']: + # Map TSan or UBSan suppressions file to device value = map_list(value, ':', r'(?<=suppressions=)(.+)', lambda m: (m.group(1), True)) elif key == 'LD_LIBRARY_PATH': # Map LD_LIBRARY_PATH to device diff --git a/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py b/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py index 57271b8078a49730b9ae06f901ec3faf907dcef5..ce7ce5ddde93dd9896fe163d5c871ef899cb3316 100644 --- a/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py +++ b/compiler-rt/test/ubsan/TestCases/Misc/Linux/lit.local.cfg.py @@ -5,5 +5,5 @@ def getRoot(config): root = getRoot(config) -if root.host_os not in ['Linux']: +if root.host_os not in ['Linux', 'OHOS']: # OHOS_LOCAL config.unsupported = True diff --git a/compiler-rt/test/ubsan/TestCases/Misc/no-interception.cpp b/compiler-rt/test/ubsan/TestCases/Misc/no-interception.cpp index c82fed3bf3f698f71e9b02b2984481e8d259ac35..7d5b40248c6121000c33c40d48affa2bc8f7f855 100644 --- a/compiler-rt/test/ubsan/TestCases/Misc/no-interception.cpp +++ b/compiler-rt/test/ubsan/TestCases/Misc/no-interception.cpp @@ -9,6 +9,8 @@ // Make sure that libc is first in DT_NEEDED. // RUN: %clangxx %s -lc -o %t %ld_flags_rpath_exe // RUN: %run %t 2>&1 | FileCheck %s +// OHOS_LOCAL +// UNSUPPORTED: ohos_family #include diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/lit.local.cfg.py b/compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/lit.local.cfg.py index 57271b8078a49730b9ae06f901ec3faf907dcef5..ce7ce5ddde93dd9896fe163d5c871ef899cb3316 100644 --- a/compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/lit.local.cfg.py +++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/Linux/lit.local.cfg.py @@ -5,5 +5,5 @@ def getRoot(config): root = getRoot(config) -if root.host_os not in ['Linux']: +if root.host_os not in ['Linux', 'OHOS']: # OHOS_LOCAL config.unsupported = True diff --git a/compiler-rt/test/ubsan/lit.common.cfg.py b/compiler-rt/test/ubsan/lit.common.cfg.py index 7108561a92c4d3295897a21a4b0d02474345ef36..214833e240d66e1a7898f7642ba842ab5a3f9cc5 100644 --- a/compiler-rt/test/ubsan/lit.common.cfg.py +++ b/compiler-rt/test/ubsan/lit.common.cfg.py @@ -68,7 +68,7 @@ config.substitutions.append( ("%gmlt ", " ".join(config.debug_info_flags) + " ") config.suffixes = ['.c', '.cpp', '.m'] # Check that the host supports UndefinedBehaviorSanitizer tests -if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows', 'NetBSD', 'SunOS', 'OpenBSD']: +if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows', 'NetBSD', 'SunOS', 'OpenBSD', 'OHOS']: # OHOS_LOCAL config.unsupported = True config.available_features.add('arch=' + config.target_arch) diff --git a/compiler-rt/test/ubsan_minimal/lit.common.cfg.py b/compiler-rt/test/ubsan_minimal/lit.common.cfg.py index 39800c968dbf2800079947dfcdb0aa40f30598dc..3455908413f41d6a19255fde5a7136616c07e3d3 100644 --- a/compiler-rt/test/ubsan_minimal/lit.common.cfg.py +++ b/compiler-rt/test/ubsan_minimal/lit.common.cfg.py @@ -30,7 +30,7 @@ config.substitutions.append( ("%clangxx ", build_invocation(clang_ubsan_cxxflags config.suffixes = ['.c', '.cpp'] # Check that the host supports UndefinedBehaviorSanitizerMinimal tests -if config.host_os not in ['Linux', 'FreeBSD', 'NetBSD', 'Darwin', 'OpenBSD', 'SunOS']: # TODO: Windows +if config.host_os not in ['Linux', 'FreeBSD', 'NetBSD', 'Darwin', 'OpenBSD', 'SunOS', 'OHOS']: # OHOS_LOCAL # TODO: Windows config.unsupported = True # Don't target x86_64h if the test machine can't execute x86_64h binaries.