summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-09-21 01:11:30 +0000
committerVedant Kumar <vsk@apple.com>2017-09-21 01:11:30 +0000
commit18dd9e88ed10c380e8d9cc999854c6365f3908c1 (patch)
treee53f82fc4e33dc611ad39d99ea21f623cadb949a /llvm/test/tools/llvm-cov
parentfdcdd88d5718c4785b7d3e3bc9b9e866b56590d5 (diff)
downloadbcm5719-llvm-18dd9e88ed10c380e8d9cc999854c6365f3908c1.tar.gz
bcm5719-llvm-18dd9e88ed10c380e8d9cc999854c6365f3908c1.zip
[llvm-cov] Improve error messaging for function mismatches
Passing "-dump" to llvm-cov will now print more detailed information about function hash and counter mismatches. This should make it easier to debug *.profdata files which contain incorrect records, and to debug other scenarios where coverage goes missing due to mismatch issues. llvm-svn: 313853
Diffstat (limited to 'llvm/test/tools/llvm-cov')
-rw-r--r--llvm/test/tools/llvm-cov/cov-comdat.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/test/tools/llvm-cov/cov-comdat.test b/llvm/test/tools/llvm-cov/cov-comdat.test
index 1545f9921e9..9d227163699 100644
--- a/llvm/test/tools/llvm-cov/cov-comdat.test
+++ b/llvm/test/tools/llvm-cov/cov-comdat.test
@@ -7,6 +7,9 @@ REQUIRES: shell
# of the same template function are properly merged in show
# output.
-// RUN: llvm-cov show %S/Inputs/binary-formats.v1.linux64l -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
+// RUN: llvm-cov show %S/Inputs/binary-formats.v1.linux64l -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/instrprof-comdat.h -dump 2> %t.err | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
+// RUN: FileCheck --check-prefix=ERROR -input-file %t.err %s
+// ERROR: hash-mismatch: No profile record found for 'main' with hash = 0xA
+
// RUN: llvm-cov show %S/Inputs/binary-formats.v2.linux64l -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/root/llvm/test/tools,%S/.. %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
// RUN: llvm-cov show %S/Inputs/binary-formats.v2.linux32l -instr-profile %S/Inputs/elf_binary_comdat.profdata -path-equivalence=/root/llvm/R/../test/tools,%S/.. %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
OpenPOWER on IntegriCloud