summaryrefslogtreecommitdiff
path: root/lib/asan/lit_tests/TestCases/Linux/coverage.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/lit_tests/TestCases/Linux/coverage.cc')
-rw-r--r--lib/asan/lit_tests/TestCases/Linux/coverage.cc45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/asan/lit_tests/TestCases/Linux/coverage.cc b/lib/asan/lit_tests/TestCases/Linux/coverage.cc
deleted file mode 100644
index 4373e9b13c683..0000000000000
--- a/lib/asan/lit_tests/TestCases/Linux/coverage.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 -DSHARED %s -shared -o %t.so -fPIC
-// RUN: %clangxx_asan -mllvm -asan-coverage=1 %s -o %t -Wl,-R. %t.so
-// RUN: export ASAN_OPTIONS=coverage=1:verbosity=1
-// RUN: %t 2>&1 | FileCheck %s --check-prefix=CHECK-main
-// RUN: %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-foo
-// RUN: %t bar 2>&1 | FileCheck %s --check-prefix=CHECK-bar
-// RUN: %t foo bar 2>&1 | FileCheck %s --check-prefix=CHECK-foo-bar
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifdef SHARED
-void bar() { printf("bar\n"); }
-#else
-__attribute__((noinline))
-void foo() { printf("foo\n"); }
-extern void bar();
-
-int main(int argc, char **argv) {
- fprintf(stderr, "PID: %d\n", getpid());
- for (int i = 1; i < argc; i++) {
- if (!strcmp(argv[i], "foo"))
- foo();
- if (!strcmp(argv[i], "bar"))
- bar();
- }
-}
-#endif
-
-// CHECK-main: PID: [[PID:[0-9]+]]
-// CHECK-main: [[PID]].sancov: 1 PCs written
-// CHECK-main-NOT: .so.[[PID]]
-//
-// CHECK-foo: PID: [[PID:[0-9]+]]
-// CHECK-foo: [[PID]].sancov: 2 PCs written
-// CHECK-foo-NOT: .so.[[PID]]
-//
-// CHECK-bar: PID: [[PID:[0-9]+]]
-// CHECK-bar: [[PID]].sancov: 1 PCs written
-// CHECK-bar: .so.[[PID]].sancov: 1 PCs written
-//
-// CHECK-foo-bar: PID: [[PID:[0-9]+]]
-// CHECK-foo-bar: [[PID]].sancov: 2 PCs written
-// CHECK-foo-bar: so.[[PID]].sancov: 1 PCs written