summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test
diff options
context:
space:
mode:
authorMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-16 09:13:46 +0000
committerMarco Castelluccio <mcastelluccio@mozilla.com>2018-07-16 09:13:46 +0000
commit0a75de4bfe51ea27465123965f02caa6bd00c197 (patch)
tree63d29f26d402da6a6af88e8bf6761c233ed96942 /compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test
parentf854ce84c4cc676ff16adbe819db3bcfd325dabf (diff)
downloadbcm5719-llvm-0a75de4bfe51ea27465123965f02caa6bd00c197.tar.gz
bcm5719-llvm-0a75de4bfe51ea27465123965f02caa6bd00c197.zip
Add a test with __gcov_flush called before terminating the program.
Test for https://bugs.llvm.org/show_bug.cgi?id=38067. llvm-svn: 337150
Diffstat (limited to 'compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test')
-rw-r--r--compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test b/compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test
new file mode 100644
index 00000000000..aa51461a3bd
--- /dev/null
+++ b/compiler-rt/test/profile/instrprof-gcov-__gcov_flush-terminate.test
@@ -0,0 +1,12 @@
+XFAIL: *
+
+RUN: mkdir -p %t.d
+RUN: cd %t.d
+
+RUN: %clang --coverage -o %t %S/Inputs/instrprof-gcov-__gcov_flush-terminate.c
+RUN: test -f instrprof-gcov-__gcov_flush-terminate.gcno
+
+RUN: rm -f instrprof-gcov-__gcov_flush-terminate.gcda
+RUN: %expect_crash %run %t
+RUN: llvm-cov gcov instrprof-gcov-__gcov_flush-terminate.gcda
+RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-__gcov_flush-terminate.c.gcov %S/Inputs/instrprof-gcov-__gcov_flush-terminate.c.gcov
OpenPOWER on IntegriCloud