[compiler-rt] r221720 - [asan] fix coverage tests to use the new flag syntax (-fsanitize-coverage=N)

Kostya Serebryany kcc at google.com
Tue Nov 11 14:15:44 PST 2014


Author: kcc
Date: Tue Nov 11 16:15:44 2014
New Revision: 221720

URL: http://llvm.org/viewvc/llvm-project?rev=221720&view=rev
Log:
[asan] fix coverage tests to use the new flag syntax (-fsanitize-coverage=N)

Modified:
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-caller-callee.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct-large.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-disabled.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork-direct.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-maybe-open-file.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-module-unloaded.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage-sandboxing.cc
    compiler-rt/trunk/test/asan/TestCases/Linux/coverage.cc

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-and-lsan.cc Tue Nov 11 16:15:44 2014
@@ -1,6 +1,6 @@
 // Make sure coverage is dumped even if there are reported leaks.
 //
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
 //
 // RUN: rm -rf %T/coverage-and-lsan
 //

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-caller-callee.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-caller-callee.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-caller-callee.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-caller-callee.cc Tue Nov 11 16:15:44 2014
@@ -1,7 +1,7 @@
 // Test caller-callee coverage with large number of threads
 // and various numbers of callers and callees.
 
-// RUN: %clangxx_asan -mllvm -asan-coverage=4 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=4 %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 10 1 2>&1 | FileCheck %s --check-prefix=CHECK-10-1
 // RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 9  2 2>&1 | FileCheck %s --check-prefix=CHECK-9-2
 // RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 7  3 2>&1 | FileCheck %s --check-prefix=CHECK-7-3

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct-large.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct-large.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct-large.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct-large.cc Tue Nov 11 16:15:44 2014
@@ -1,7 +1,7 @@
 // Test for direct coverage writing with lots of data.
 // Current implementation maps output file in chunks of 64K. This test overflows
 // 1 chunk.
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -O0 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 -O0 %s -o %t
 
 // RUN: rm -rf %T/coverage-direct-large
 

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-direct.cc Tue Nov 11 16:15:44 2014
@@ -1,6 +1,6 @@
 // Test for direct coverage writing with dlopen.
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %T/libcoverage_direct_test_1.so -fPIC
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSO_DIR=\"%T\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %T/libcoverage_direct_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=1 -DSO_DIR=\"%T\" %s -o %t
 
 // RUN: rm -rf %T/coverage-direct
 

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-disabled.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-disabled.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-disabled.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-disabled.cc Tue Nov 11 16:15:44 2014
@@ -1,6 +1,6 @@
 // Test that no data is collected without a runtime flag.
 //
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
 //
 // RUN: rm -rf %T/coverage-disabled
 //

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork-direct.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork-direct.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork-direct.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork-direct.cc Tue Nov 11 16:15:44 2014
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
 // RUN: rm -rf %T/coverage-fork-direct
 // RUN: mkdir -p %T/coverage-fork-direct && cd %T/coverage-fork-direct
 // RUN: (ASAN_OPTIONS=coverage=1:coverage_direct=1:verbosity=1 %run %t; \

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-fork.cc Tue Nov 11 16:15:44 2014
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
 // RUN: export ASAN_OPTIONS=coverage=1:coverage_direct=0:verbosity=1
 // RUN: rm -rf %T/coverage-fork
 // RUN: mkdir -p %T/coverage-fork && cd %T/coverage-fork

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-maybe-open-file.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-maybe-open-file.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-maybe-open-file.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-maybe-open-file.cc Tue Nov 11 16:15:44 2014
@@ -1,7 +1,7 @@
 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
 // XFAIL: android
 //
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
 // RUN: rm -rf %T/coverage-maybe-open-file
 // RUN: mkdir -p %T/coverage-maybe-open-file && cd %T/coverage-maybe-open-file
 // RUN: ASAN_OPTIONS=coverage=1 %run %t | FileCheck %s --check-prefix=CHECK-success

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-module-unloaded.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-module-unloaded.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-module-unloaded.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-module-unloaded.cc Tue Nov 11 16:15:44 2014
@@ -1,8 +1,8 @@
 // Check that unloading a module doesn't break coverage dumping for remaining
 // modules.
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %T/libcoverage_module_unloaded_test_1.so -fPIC
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %T/libcoverage_module_unloaded_test_2.so -fPIC
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSO_DIR=\"%T\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %T/libcoverage_module_unloaded_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %T/libcoverage_module_unloaded_test_2.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=1 -DSO_DIR=\"%T\" %s -o %t
 // RUN: export ASAN_OPTIONS=coverage=1:verbosity=1
 // RUN: mkdir -p %T/coverage-module-unloaded && cd %T/coverage-module-unloaded
 // RUN: %run %t 2>&1         | FileCheck %s

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage-sandboxing.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage-sandboxing.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage-sandboxing.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage-sandboxing.cc Tue Nov 11 16:15:44 2014
@@ -1,5 +1,5 @@
-// RUN: %clangxx_asan -mllvm -asan-coverage=2 -DSHARED %s -shared -o %T/libcoverage_sandboxing_test.so -fPIC
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s   -o %t -Wl,-R,\$ORIGIN -L%T -lcoverage_sandboxing_test
+// RUN: %clangxx_asan -fsanitize-coverage=2 -DSHARED %s -shared -o %T/libcoverage_sandboxing_test.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=1 %s   -o %t -Wl,-R,\$ORIGIN -L%T -lcoverage_sandboxing_test
 // RUN: export ASAN_OPTIONS=coverage=1:verbosity=1
 // RUN: rm -rf %T/coverage_sandboxing_test
 // RUN: mkdir %T/coverage_sandboxing_test && cd %T/coverage_sandboxing_test

Modified: compiler-rt/trunk/test/asan/TestCases/Linux/coverage.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/coverage.cc?rev=221720&r1=221719&r2=221720&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/coverage.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/coverage.cc Tue Nov 11 16:15:44 2014
@@ -1,5 +1,5 @@
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %T/libcoverage_test.so -fPIC
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s   -o %t -Wl,-R,\$ORIGIN -L%T -lcoverage_test
+// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %T/libcoverage_test.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=1 %s   -o %t -Wl,-R,\$ORIGIN -L%T -lcoverage_test
 // RUN: export ASAN_OPTIONS=coverage=1:verbosity=1
 // RUN: mkdir -p %T/coverage && cd %T/coverage
 // RUN: %run %t 2>&1         | FileCheck %s --check-prefix=CHECK-main





More information about the llvm-commits mailing list