[compiler-rt] 1e90bd7 - [ASan][Darwin] Adapt test for macOS 11+ version scheme
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 10:15:20 PDT 2020
Author: Julian Lettner
Date: 2020-08-05T10:14:57-07:00
New Revision: 1e90bd7f84d3948807c8f40926e72def664f07fa
URL: https://github.com/llvm/llvm-project/commit/1e90bd7f84d3948807c8f40926e72def664f07fa
DIFF: https://github.com/llvm/llvm-project/commit/1e90bd7f84d3948807c8f40926e72def664f07fa.diff
LOG: [ASan][Darwin] Adapt test for macOS 11+ version scheme
This test depends on the versioning scheme of OSX.
Added:
Modified:
compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cpp b/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cpp
index d195258d71f6..0fec18b89411 100644
--- a/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cpp
+++ b/compiler-rt/test/asan/TestCases/Darwin/dyld_insert_libraries_reexec.cpp
@@ -13,17 +13,20 @@
// RUN: %run %t/a.out 2>&1 \
// RUN: | FileCheck %s
-// RUN: IS_OSX_10_11_OR_HIGHER=$([ `sw_vers -productVersion | cut -d'.' -f2` -lt 11 ]; echo $?)
+// RUN: MACOS_MAJOR=$(sw_vers -productVersion | cut -d'.' -f1)
+// RUN: MACOS_MINOR=$(sw_vers -productVersion | cut -d'.' -f2)
+
+// RUN: IS_MACOS_10_11_OR_HIGHER=$([ $MACOS_MAJOR -eq 10 ] && [ $MACOS_MINOR -lt 11 ]; echo $?)
// On OS X 10.10 and lower, if the dylib is not DYLD-inserted, ASan will re-exec.
-// RUN: if [ $IS_OSX_10_11_OR_HIGHER == 0 ]; then \
+// RUN: if [ $IS_MACOS_10_11_OR_HIGHER == 0 ]; then \
// RUN: %env_asan_opts=verbosity=1 %run %t/a.out 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOINSERT %s; \
// RUN: fi
// On OS X 10.11 and higher, we don't need to DYLD-insert anymore, and the interceptors
// still installed correctly. Let's just check that things work and we don't try to re-exec.
-// RUN: if [ $IS_OSX_10_11_OR_HIGHER == 1 ]; then \
+// RUN: if [ $IS_MACOS_10_11_OR_HIGHER == 1 ]; then \
// RUN: %env_asan_opts=verbosity=1 %run %t/a.out 2>&1 \
// RUN: | FileCheck %s; \
// RUN: fi
More information about the llvm-commits
mailing list