summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/strstr-2.c
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-08-12 23:50:12 +0000
committerReid Kleckner <rnk@google.com>2015-08-12 23:50:12 +0000
commit7e63eb3496ea36a31e56585f9c2d285abd1f5c91 (patch)
tree375b529b40e4e305251437c2eba3aa46116b2e4f /test/asan/TestCases/strstr-2.c
parent02f8271b87663a1c4a623a25ea2e3acf5c04fbab (diff)
Use %env_asan_opts= substitution instead of 'env ASAN_OPTIONS=$ASAN_OPTIONS'
Summary: The lit internal shell is used by default on Windows, and it does not support bash variable expansion. Because bash variable expansion interacts with tokenization, it is prohibitively difficult to make the existing lit shell do general shell variable expansion. The most common use of shell variables in the asan tests is to add options to the default set of options set by lit.cfg. We can avoid the need for variable expansion with a substitution that expands to 'env ASAN_OPTIONS=<defaults:>'. This has the side benefit of shortening the RUN lines, so it seemed better than implementing limited variable expansion in lit. Reviewers: samsonov, filcab Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11982 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/strstr-2.c')
-rw-r--r--test/asan/TestCases/strstr-2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/asan/TestCases/strstr-2.c b/test/asan/TestCases/strstr-2.c
index cd116212f..77d7cc52a 100644
--- a/test/asan/TestCases/strstr-2.c
+++ b/test/asan/TestCases/strstr-2.c
@@ -1,9 +1,9 @@
// Test needle overflow in strstr function
-// RUN: %clang_asan %s -o %t && env ASAN_OPTIONS=$ASAN_OPTIONS:strict_string_checks=true not %run %t 2>&1 | FileCheck %s
+// RUN: %clang_asan %s -o %t && %env_asan_opts=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
-// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:intercept_strstr=false:replace_str=false %run %t 2>&1
+// RUN: %env_asan_opts=intercept_strstr=false:replace_str=false %run %t 2>&1
#include <assert.h>
#include <string.h>