summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-08-19 13:59:22 +0000
committerAlexey Samsonov <samsonov@google.com>2013-08-19 13:59:22 +0000
commit0c127d7c71703a8a6494a0d3882ba94e51195d40 (patch)
tree7503704733fc8c42fae23f739e36a5ca98904f26 /clang/test
parentf656e1783ba16a2dadec19a7eb7a55439e6bea48 (diff)
downloadbcm5719-llvm-0c127d7c71703a8a6494a0d3882ba94e51195d40.tar.gz
bcm5719-llvm-0c127d7c71703a8a6494a0d3882ba94e51195d40.zip
Re-apply r188666
llvm-svn: 188675
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/fsanitize-blacklist.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/clang/test/Driver/fsanitize-blacklist.c b/clang/test/Driver/fsanitize-blacklist.c
index 5327bc16a34..690bc877952 100644
--- a/clang/test/Driver/fsanitize-blacklist.c
+++ b/clang/test/Driver/fsanitize-blacklist.c
@@ -1,18 +1,26 @@
// General blacklist usage.
-// RUN: %clang -fsanitize=address -fsanitize-blacklist=%s %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-BLACKLIST
+
+// PR12920
+// REQUIRES: clang-driver, shell
+
+// RUN: echo "fun:foo" > %t.good
+// RUN: echo "badline" > %t.bad
+
+// RUN: %clang -fsanitize=address -fsanitize-blacklist=%t.good %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-BLACKLIST
// CHECK-BLACKLIST: -fsanitize-blacklist
// Ignore -fsanitize-blacklist flag if there is no -fsanitize flag.
-// RUN: %clang -fsanitize-blacklist=%s %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SANITIZE
+// RUN: %clang -fsanitize-blacklist=%t.good %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SANITIZE
// CHECK-NO-SANITIZE-NOT: -fsanitize-blacklist
// Flag -fno-sanitize-blacklist wins if it is specified later.
-// RUN: %clang -fsanitize=address -fsanitize-blacklist=%s -fno-sanitize-blacklist %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-BLACKLIST
+// RUN: %clang -fsanitize=address -fsanitize-blacklist=%t.good -fno-sanitize-blacklist %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-BLACKLIST
// CHECK-NO-BLACKLIST-NOT: -fsanitize-blacklist
// Driver barks on unexisting blacklist files.
// RUN: %clang -fno-sanitize-blacklist -fsanitize-blacklist=unexisting.txt %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SUCH-FILE
// CHECK-NO-SUCH-FILE: error: no such file or directory: 'unexisting.txt'
-// PR12920
-// REQUIRES: clang-driver
+// Driver properly reports malformed blacklist files.
+// RUN: %clang -fsanitize=address -fsanitize-blacklist=%t.bad %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-BAD-BLACKLIST
+// CHECK-BAD-BLACKLIST: error: malformed sanitizer blacklist
OpenPOWER on IntegriCloud