[PATCH] D10988: [asan] Add missing $ASAN_OPTIONS to some test cases
Kuba Brecka
kuba.brecka at gmail.com
Tue Jul 7 02:20:35 PDT 2015
kubabrecka added reviewers: samsonov, glider.
kubabrecka added subscribers: llvm-commits, samsonov, glider, filcab.
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.
http://reviews.llvm.org/D10988
Files:
test/asan/TestCases/sleep_before_dying.c
test/asan/TestCases/strcspn-1.c
test/asan/TestCases/strcspn-2.c
test/asan/TestCases/strpbrk-1.c
test/asan/TestCases/strpbrk-2.c
test/asan/TestCases/strspn-1.c
test/asan/TestCases/strspn-2.c
test/asan/TestCases/strstr-1.c
test/asan/TestCases/strstr-2.c
Index: test/asan/TestCases/strstr-2.c
===================================================================
--- test/asan/TestCases/strstr-2.c
+++ test/asan/TestCases/strstr-2.c
@@ -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
Index: test/asan/TestCases/strstr-1.c
===================================================================
--- test/asan/TestCases/strstr-1.c
+++ test/asan/TestCases/strstr-1.c
@@ -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
Index: test/asan/TestCases/strspn-2.c
===================================================================
--- test/asan/TestCases/strspn-2.c
+++ test/asan/TestCases/strspn-2.c
@@ -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
Index: test/asan/TestCases/strspn-1.c
===================================================================
--- test/asan/TestCases/strspn-1.c
+++ test/asan/TestCases/strspn-1.c
@@ -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
Index: test/asan/TestCases/strpbrk-2.c
===================================================================
--- test/asan/TestCases/strpbrk-2.c
+++ test/asan/TestCases/strpbrk-2.c
@@ -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
Index: test/asan/TestCases/strpbrk-1.c
===================================================================
--- test/asan/TestCases/strpbrk-1.c
+++ test/asan/TestCases/strpbrk-1.c
@@ -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
Index: test/asan/TestCases/strcspn-2.c
===================================================================
--- test/asan/TestCases/strcspn-2.c
+++ test/asan/TestCases/strcspn-2.c
@@ -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
Index: test/asan/TestCases/strcspn-1.c
===================================================================
--- test/asan/TestCases/strcspn-1.c
+++ test/asan/TestCases/strcspn-1.c
@@ -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
Index: test/asan/TestCases/sleep_before_dying.c
===================================================================
--- test/asan/TestCases/sleep_before_dying.c
+++ test/asan/TestCases/sleep_before_dying.c
@@ -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() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10988.29159.patch
Type: text/x-patch
Size: 5124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150707/9476da29/attachment.bin>
More information about the llvm-commits
mailing list