From f3b6db40b671d86c0fb948ac882bce1817a6abbd Mon Sep 17 00:00:00 2001 From: Kuba Mracek Date: Tue, 2 May 2017 19:35:29 +0000 Subject: [PATCH] [asan] Disable some Darwin tests that don't work on iOS simulator Differential Revision: https://reviews.llvm.org/D32633 llvm-svn: 301965 --- compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm | 3 +++ compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc | 3 +++ compiler-rt/test/asan/TestCases/Darwin/dladdr-demangling.cc | 3 +++ compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc | 2 ++ compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc | 2 ++ compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cc | 1 + compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.c | 2 ++ compiler-rt/test/asan/TestCases/Darwin/sandbox-symbolizer.cc | 3 +++ compiler-rt/test/asan/TestCases/Darwin/suppressions-sandbox.cc | 3 +++ compiler-rt/test/asan/TestCases/Darwin/uuid.cc | 3 +++ 10 files changed, 25 insertions(+) diff --git a/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm b/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm index ba9175a..5f0fd89 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm +++ b/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm @@ -3,6 +3,9 @@ // RUN: %clangxx_asan %s -Wno-deprecated-declarations -flat_namespace -bundle -undefined suppress -o %t.bundle // RUN: %clangxx_asan %s -Wno-deprecated-declarations -o %t -framework Foundation && not %run %t 2>&1 | FileCheck %s +// NSCreateObjectFileImageFromFile/NSLinkModule isn't available on iOS +// UNSUPPORTED: ios + #import #import diff --git a/compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc b/compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc index b4a868e..7b091c4 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc @@ -3,6 +3,9 @@ // RUN: %clangxx_asan -O0 %s -o %t // RUN: %env_asan_opts=verbosity=2 ASAN_SYMBOLIZER_PATH=$(which atos) not %run %t 2>&1 | FileCheck %s +// Path returned by `which atos` is invalid on iOS. +// UNSUPPORTED: ios + #include #include int main(int argc, char **argv) { diff --git a/compiler-rt/test/asan/TestCases/Darwin/dladdr-demangling.cc b/compiler-rt/test/asan/TestCases/Darwin/dladdr-demangling.cc index 6f52b93..fb6f6d7 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/dladdr-demangling.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/dladdr-demangling.cc @@ -5,6 +5,9 @@ // RUN: not %run %t 2>&1 | FileCheck %s // RUN: %env_asan_opts=verbosity=2 not %run sandbox-exec -p '(version 1)(allow default)(deny process-fork)' %t 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-DLADDR +// sandbox-exec isn't available on iOS +// UNSUPPORTED: ios + #include class MyClass { diff --git a/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc b/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc index b22036a..5c975b8 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cc @@ -1,6 +1,8 @@ // When DYLD-inserting the ASan dylib from a different location than the // original, make sure we don't try to reexec. +// UNSUPPORTED: ios + // RUN: mkdir -p %T/dyld_insert_libraries_reexec // RUN: cp `%clang_asan %s -fsanitize=address -### 2>&1 \ // RUN: | grep "libclang_rt.asan_osx_dynamic.dylib" \ diff --git a/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc b/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc index a3af8c1..69d8497 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_remove.cc @@ -2,6 +2,8 @@ // the ASan dylib from the environment variable (both when using an absolute // or relative path) and also that the other dylibs are left untouched. +// UNSUPPORTED: ios + // RUN: mkdir -p %T/dyld_insert_libraries_remove // RUN: cp `%clang_asan %s -fsanitize=address -### 2>&1 \ // RUN: | grep "libclang_rt.asan_osx_dynamic.dylib" \ diff --git a/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cc b/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cc index 59c938c..7856c4d 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cc @@ -48,6 +48,7 @@ // REQUIRES: x86-target-arch // REQUIRES: x86_64h +// UNSUPPORTED: ios #include #include diff --git a/compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.c b/compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.c index 9450575..09af1ec 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.c +++ b/compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.c @@ -31,4 +31,6 @@ // RUN: echo "=== NOTE === If you see a mismatch below, please update sanitizer_interface.inc files." // RUN: diff %t.imports-sorted %t.exports-sorted +// UNSUPPORTED: ios + int main() { return 0; } diff --git a/compiler-rt/test/asan/TestCases/Darwin/sandbox-symbolizer.cc b/compiler-rt/test/asan/TestCases/Darwin/sandbox-symbolizer.cc index 4310f9c..b36c4fa 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/sandbox-symbolizer.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/sandbox-symbolizer.cc @@ -12,6 +12,9 @@ // RUN: not %run sandbox-exec -p '(version 1)(allow default)(deny mach-priv-task-port)' %t 2>&1 | FileCheck %s // RUN: env ASAN_SYMBOLIZER_PATH="" not %run sandbox-exec -p '(version 1)(allow default)(deny mach-priv-task-port)' %t 2>&1 | FileCheck %s +// sandbox-exec isn't available on iOS +// UNSUPPORTED: ios + #include int main() { char *x = (char*)malloc(10 * sizeof(char)); diff --git a/compiler-rt/test/asan/TestCases/Darwin/suppressions-sandbox.cc b/compiler-rt/test/asan/TestCases/Darwin/suppressions-sandbox.cc index c0b84ad..966f213 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/suppressions-sandbox.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/suppressions-sandbox.cc @@ -8,6 +8,9 @@ // RUN: sandbox-exec -p '(version 1)(allow default)(deny process-fork)' \ // RUN: %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s +// sandbox-exec isn't available on iOS +// UNSUPPORTED: ios + #include int main() { diff --git a/compiler-rt/test/asan/TestCases/Darwin/uuid.cc b/compiler-rt/test/asan/TestCases/Darwin/uuid.cc index 3f50272..3363858 100644 --- a/compiler-rt/test/asan/TestCases/Darwin/uuid.cc +++ b/compiler-rt/test/asan/TestCases/Darwin/uuid.cc @@ -4,6 +4,9 @@ // RUN: %clangxx_asan %s -o %t -fsanitize-recover=address // RUN: %env_asan_opts=print_module_map=2:halt_on_error=0 %run %t 2>&1 | FileCheck %s +// We can't run system("otool") in the simulator. +// UNSUPPORTED: ios + #include #include #include -- 2.7.4