forked from OSchip/llvm-project
[asan] fix coverage tests to use the new flag syntax (-fsanitize-coverage=N)
llvm-svn: 221720
This commit is contained in:
parent
75b4f9e1e6
commit
8278644dc8
|
@ -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
|
||||
//
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
|
@ -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; \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue