[clang] 986202f - [clang][test][NFC] Use more widely supported sanitizer for file dependency tests
Jan Korous via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 14 12:55:21 PST 2020
Author: Jan Korous
Date: 2020-01-14T12:55:11-08:00
New Revision: 986202fad41529af8288aca54f2ff62d4c501d71
URL: https://github.com/llvm/llvm-project/commit/986202fad41529af8288aca54f2ff62d4c501d71
DIFF: https://github.com/llvm/llvm-project/commit/986202fad41529af8288aca54f2ff62d4c501d71.diff
LOG: [clang][test][NFC] Use more widely supported sanitizer for file dependency tests
The tests aren't concerned at all by the actual sanitizer - only by blacklist being reported as a dependency.
We're unfortunately limited by platform support for any particular sanitizer but we can at least use one that is widely supported.
Post-commit review:
https://reviews.llvm.org/D72729
Added:
clang/test/Frontend/Inputs/resource_dir_with_sanitizer_blacklist/share/ubsan_blacklist.txt
Modified:
clang/test/Frontend/dependency-gen.c
Removed:
clang/test/Frontend/Inputs/resource_dir_with_cfi_blacklist/share/cfi_blacklist.txt
################################################################################
diff --git a/clang/test/Frontend/Inputs/resource_dir_with_cfi_blacklist/share/cfi_blacklist.txt b/clang/test/Frontend/Inputs/resource_dir_with_sanitizer_blacklist/share/ubsan_blacklist.txt
similarity index 100%
rename from clang/test/Frontend/Inputs/resource_dir_with_cfi_blacklist/share/cfi_blacklist.txt
rename to clang/test/Frontend/Inputs/resource_dir_with_sanitizer_blacklist/share/ubsan_blacklist.txt
diff --git a/clang/test/Frontend/dependency-gen.c b/clang/test/Frontend/dependency-gen.c
index 1db9b04c1d9f..a42804d9f214 100644
--- a/clang/test/Frontend/dependency-gen.c
+++ b/clang/test/Frontend/dependency-gen.c
@@ -21,7 +21,7 @@
// RUN: %clang -MD -MF - %s -fsyntax-only -I ./ | FileCheck -check-prefix=CHECK-SIX %s
// CHECK-SIX: {{ }}x.h
// RUN: echo "fun:foo" > %t.blacklist
-// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_cfi_blacklist -fsanitize=cfi-vcall -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist -I ./ | FileCheck -check-prefix=CHECK-SEVEN %s
+// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -fsanitize=undefined -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist -I ./ | FileCheck -check-prefix=CHECK-SEVEN %s
// CHECK-SEVEN: .blacklist
// CHECK-SEVEN: {{ }}x.h
#ifndef INCLUDE_FLAG_TEST
@@ -30,17 +30,17 @@
// RUN: echo "fun:foo" > %t.blacklist1
// RUN: echo "fun:foo" > %t.blacklist2
-// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_cfi_blacklist -fsanitize=cfi-vcall -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist1 -fsanitize-blacklist=%t.blacklist2 -I ./ | FileCheck -check-prefix=TWO-BLACK-LISTS %s
+// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -fsanitize=undefined -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist1 -fsanitize-blacklist=%t.blacklist2 -I ./ | FileCheck -check-prefix=TWO-BLACK-LISTS %s
// TWO-BLACK-LISTS: dependency-gen.o:
// TWO-BLACK-LISTS-DAG: blacklist1
// TWO-BLACK-LISTS-DAG: blacklist2
// TWO-BLACK-LISTS-DAG: x.h
// TWO-BLACK-LISTS-DAG: dependency-gen.c
-// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_cfi_blacklist -fsanitize=cfi-vcall -flto -fvisibility=hidden -I ./ | FileCheck -check-prefix=USER-AND-SYS-DEPS %s
+// RUN: %clang -MD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -fsanitize=undefined -flto -fvisibility=hidden -I ./ | FileCheck -check-prefix=USER-AND-SYS-DEPS %s
// USER-AND-SYS-DEPS: dependency-gen.o:
-// USER-AND-SYS-DEPS-DAG: cfi_blacklist.txt
+// USER-AND-SYS-DEPS-DAG: ubsan_blacklist.txt
-// RUN: %clang -MMD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_cfi_blacklist -fsanitize=cfi-vcall -flto -fvisibility=hidden -I ./ | FileCheck -check-prefix=ONLY-USER-DEPS %s
+// RUN: %clang -MMD -MF - %s -fsyntax-only -resource-dir=%S/Inputs/resource_dir_with_sanitizer_blacklist -fsanitize=undefined -flto -fvisibility=hidden -I ./ | FileCheck -check-prefix=ONLY-USER-DEPS %s
// ONLY-USER-DEPS: dependency-gen.o:
-// NOT-ONLY-USER-DEPS: cfi_blacklist.txt
\ No newline at end of file
+// NOT-ONLY-USER-DEPS: ubsan_blacklist.txt
More information about the cfe-commits
mailing list