summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Linux/coverage-levels.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan/TestCases/Linux/coverage-levels.cc')
-rw-r--r--test/asan/TestCases/Linux/coverage-levels.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/asan/TestCases/Linux/coverage-levels.cc b/test/asan/TestCases/Linux/coverage-levels.cc
index 748ef1f08db5d..cc196c5a9e187 100644
--- a/test/asan/TestCases/Linux/coverage-levels.cc
+++ b/test/asan/TestCases/Linux/coverage-levels.cc
@@ -1,11 +1,15 @@
// Test various levels of coverage
//
// RUN: %clangxx_asan -O1 -fsanitize-coverage=1 %s -o %t
-// RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
+// RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
// RUN: %clangxx_asan -O1 -fsanitize-coverage=2 %s -o %t
-// RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2
+// RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2
// RUN: %clangxx_asan -O1 -fsanitize-coverage=3 %s -o %t
-// RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3
+// RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3
+
+// RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=0:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3_NOBITSET
+// RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3_NOBITSET
+// RUN: ASAN_OPTIONS=coverage=1:coverage_pcs=0:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3_NOPCS
//
// REQUIRES: asan-64-bits
@@ -15,6 +19,11 @@ int main(int argc, char **argv) {
sink = 0;
}
+// CHECK1: CovDump: bitset of 1 bits written, 1 bits are set
// CHECK1: 1 PCs written
+// CHECK2: CovDump: bitset of 3 bits written, 2 bits are set
// CHECK2: 2 PCs written
+// CHECK3: CovDump: bitset of 4 bits written, 3 bits are set
// CHECK3: 3 PCs written
+// CHECK3_NOBITSET-NOT: bitset of
+// CHECK3_NOPCS-NOT: PCs written