[compiler-rt] r241571 - [asan] Add missing $ASAN_OPTIONS to some test cases

Kuba Brecka kuba.brecka at gmail.com
Tue Jul 7 02:55:01 PDT 2015


Author: kuba.brecka
Date: Tue Jul  7 04:55:00 2015
New Revision: 241571

URL: http://llvm.org/viewvc/llvm-project?rev=241571&view=rev
Log:
[asan] Add missing $ASAN_OPTIONS to some test cases

Since http://reviews.llvm.org/D10294, ASan test cases now respect default env. options via `ASAN_OPTION=$ASAN_OPTIONS:additional_options=xxx`.  This patch adds this to a few test cases where it's still missing.

Differential Revision: http://reviews.llvm.org/D10988


Modified:
    compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c
    compiler-rt/trunk/test/asan/TestCases/strcspn-1.c
    compiler-rt/trunk/test/asan/TestCases/strcspn-2.c
    compiler-rt/trunk/test/asan/TestCases/strpbrk-1.c
    compiler-rt/trunk/test/asan/TestCases/strpbrk-2.c
    compiler-rt/trunk/test/asan/TestCases/strspn-1.c
    compiler-rt/trunk/test/asan/TestCases/strspn-2.c
    compiler-rt/trunk/test/asan/TestCases/strstr-1.c
    compiler-rt/trunk/test/asan/TestCases/strstr-2.c

Modified: compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/sleep_before_dying.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // RUN: %clang_asan -O2 %s -o %t
-// RUN: env ASAN_OPTIONS="sleep_before_dying=1" not %run %t 2>&1 | FileCheck %s
+// RUN: env ASAN_OPTIONS="$ASAN_OPTIONS:sleep_before_dying=1" not %run %t 2>&1 | FileCheck %s
 
 #include <stdlib.h>
 int main() {

Modified: compiler-rt/trunk/test/asan/TestCases/strcspn-1.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcspn-1.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcspn-1.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcspn-1.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test string s1 overflow in strcspn function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strspn asan option
 // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:intercept_strspn=false %run %t 2>&1

Modified: compiler-rt/trunk/test/asan/TestCases/strcspn-2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strcspn-2.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strcspn-2.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strcspn-2.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test stopset overflow in strcspn function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strcspn asan option
 // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:intercept_strspn=false %run %t 2>&1

Modified: compiler-rt/trunk/test/asan/TestCases/strpbrk-1.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strpbrk-1.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strpbrk-1.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strpbrk-1.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test string s1 overflow in strpbrk function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strpbrk asan option
 // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:intercept_strpbrk=false %run %t 2>&1

Modified: compiler-rt/trunk/test/asan/TestCases/strpbrk-2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strpbrk-2.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strpbrk-2.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strpbrk-2.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test stopset overflow in strpbrk function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strpbrk asan option
 // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:intercept_strpbrk=false %run %t 2>&1

Modified: compiler-rt/trunk/test/asan/TestCases/strspn-1.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strspn-1.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strspn-1.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strspn-1.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test string s1 overflow in strspn function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strspn asan option
 // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:intercept_strspn=false %run %t 2>&1

Modified: compiler-rt/trunk/test/asan/TestCases/strspn-2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strspn-2.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strspn-2.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strspn-2.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test stopset overflow in strspn function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strspn asan option
 // RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:intercept_strspn=false %run %t 2>&1

Modified: compiler-rt/trunk/test/asan/TestCases/strstr-1.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strstr-1.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strstr-1.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strstr-1.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test haystack overflow in strstr function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strstr asan option
 // Disable other interceptors because strlen may be called inside strstr

Modified: compiler-rt/trunk/test/asan/TestCases/strstr-2.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strstr-2.c?rev=241571&r1=241570&r2=241571&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strstr-2.c (original)
+++ compiler-rt/trunk/test/asan/TestCases/strstr-2.c Tue Jul  7 04:55:00 2015
@@ -1,5 +1,5 @@
 // Test needle overflow in strstr function
-// RUN: %clang_asan %s -o %t && ASAN_OPTIONS=strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
 
 // Test intercept_strstr asan option
 // Disable other interceptors because strlen may be called inside strstr





More information about the llvm-commits mailing list