From d23c759c0fa10b7fb244b4d2911b49b95138a7e1 Mon Sep 17 00:00:00 2001 From: Yuchen Wu Date: Wed, 20 Nov 2013 04:15:05 +0000 Subject: llvm-cov: Added file checksum to gcno and gcda files. Instead of permanently outputting "MVLL" as the file checksum, clang will create gcno and gcda checksums by hashing the destination block numbers of every arc. This allows for llvm-cov to check if the two gcov files are synchronized. Regenerated the test files so they contain the checksum. Also added negative test to ensure error when the checksums don't match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195191 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/tools/llvm-cov/Inputs/test.gcda | Bin 824 -> 824 bytes test/tools/llvm-cov/Inputs/test.gcno | Bin 3112 -> 3112 bytes .../tools/llvm-cov/Inputs/test_checksum_mismatch.gcda | Bin 0 -> 825 bytes test/tools/llvm-cov/Inputs/test_read_fail.gcno | Bin 111 -> 72 bytes test/tools/llvm-cov/llvm-cov.test | 2 ++ 5 files changed, 2 insertions(+) create mode 100644 test/tools/llvm-cov/Inputs/test_checksum_mismatch.gcda (limited to 'test/tools/llvm-cov') diff --git a/test/tools/llvm-cov/Inputs/test.gcda b/test/tools/llvm-cov/Inputs/test.gcda index 23d03bdd1f..a62c069c9a 100644 Binary files a/test/tools/llvm-cov/Inputs/test.gcda and b/test/tools/llvm-cov/Inputs/test.gcda differ diff --git a/test/tools/llvm-cov/Inputs/test.gcno b/test/tools/llvm-cov/Inputs/test.gcno index 6162604e74..218398548e 100644 Binary files a/test/tools/llvm-cov/Inputs/test.gcno and b/test/tools/llvm-cov/Inputs/test.gcno differ diff --git a/test/tools/llvm-cov/Inputs/test_checksum_mismatch.gcda b/test/tools/llvm-cov/Inputs/test_checksum_mismatch.gcda new file mode 100644 index 0000000000..2fcf33dd21 Binary files /dev/null and b/test/tools/llvm-cov/Inputs/test_checksum_mismatch.gcda differ diff --git a/test/tools/llvm-cov/Inputs/test_read_fail.gcno b/test/tools/llvm-cov/Inputs/test_read_fail.gcno index 63b5d71e69..bcc20a65ee 100644 Binary files a/test/tools/llvm-cov/Inputs/test_read_fail.gcno and b/test/tools/llvm-cov/Inputs/test_read_fail.gcno differ diff --git a/test/tools/llvm-cov/llvm-cov.test b/test/tools/llvm-cov/llvm-cov.test index 28738a78d1..d95af9b40f 100644 --- a/test/tools/llvm-cov/llvm-cov.test +++ b/test/tools/llvm-cov/llvm-cov.test @@ -7,4 +7,6 @@ RUN: | diff -aub test.cpp.gcov - RUN: not llvm-cov -gcno=test_read_fail.gcno -gcda=test.gcda +RUN: not llvm-cov -gcno=test.gcno -gcda=test_checksum_mismatch.gcda + XFAIL: powerpc64, s390x -- cgit v1.2.3