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