From: Julian Lettner Date: Wed, 5 Aug 2020 17:11:50 +0000 (-0700) Subject: [ASan][Darwin] Adapt test for macOS 11+ version scheme X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e90bd7f84d3948807c8f40926e72def664f07fa;p=platform%2Fupstream%2Fllvm.git [ASan][Darwin] Adapt test for macOS 11+ version scheme This test depends on the versioning scheme of OSX. --- 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 d195258..0fec18b 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