From 2adcddcd8427f208ba0b87e62084a43f2947c9a3 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 30 Jul 2014 23:02:01 +0000 Subject: [PATCH] llvm-profdata: Use consistent file suffixes in tests In some places we've been using different suffixes for the different file formats involved in instrprof, but in others we've just ambiguously used .profdata. Update the test files to indicate the types of file more obviously. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214357 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../{bad-hash.profdata => bad-hash.proftext} | 0 .../{bar3-1.profdata => bar3-1.proftext} | 0 .../{c-general.profdata => c-general.profraw} | Bin .../Inputs/{empty.profdata => empty.proftext} | 0 ...xtra-word.profdata => extra-word.proftext} | 0 .../{foo3-1.profdata => foo3-1.proftext} | 0 .../{foo3-2.profdata => foo3-2.proftext} | 0 ...oo3bar3-1.profdata => foo3bar3-1.proftext} | 0 ...oo3bar3-2.profdata => foo3bar3-2.proftext} | 0 .../{foo4-1.profdata => foo4-1.proftext} | 0 .../{foo4-2.profdata => foo4-2.proftext} | 0 ....profdata => invalid-count-later.proftext} | 0 ...{no-counts.profdata => no-counts.proftext} | 0 test/tools/llvm-profdata/c-general.test | 6 +++--- ...smatch.profdata => hash-mismatch.proftext} | 2 +- test/tools/llvm-profdata/lit.local.cfg | 2 +- test/tools/llvm-profdata/multiple-inputs.test | 18 +++++++++--------- .../{overflow.profdata => overflow.proftext} | 2 +- .../llvm-profdata/text-format-errors.test | 16 ++++++++-------- 19 files changed, 23 insertions(+), 23 deletions(-) rename test/tools/llvm-profdata/Inputs/{bad-hash.profdata => bad-hash.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{bar3-1.profdata => bar3-1.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{c-general.profdata => c-general.profraw} (100%) rename test/tools/llvm-profdata/Inputs/{empty.profdata => empty.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{extra-word.profdata => extra-word.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{foo3-1.profdata => foo3-1.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{foo3-2.profdata => foo3-2.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{foo3bar3-1.profdata => foo3bar3-1.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{foo3bar3-2.profdata => foo3bar3-2.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{foo4-1.profdata => foo4-1.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{foo4-2.profdata => foo4-2.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{invalid-count-later.profdata => invalid-count-later.proftext} (100%) rename test/tools/llvm-profdata/Inputs/{no-counts.profdata => no-counts.proftext} (100%) rename test/tools/llvm-profdata/{hash-mismatch.profdata => hash-mismatch.proftext} (61%) rename test/tools/llvm-profdata/{overflow.profdata => overflow.proftext} (69%) diff --git a/test/tools/llvm-profdata/Inputs/bad-hash.profdata b/test/tools/llvm-profdata/Inputs/bad-hash.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/bad-hash.profdata rename to test/tools/llvm-profdata/Inputs/bad-hash.proftext diff --git a/test/tools/llvm-profdata/Inputs/bar3-1.profdata b/test/tools/llvm-profdata/Inputs/bar3-1.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/bar3-1.profdata rename to test/tools/llvm-profdata/Inputs/bar3-1.proftext diff --git a/test/tools/llvm-profdata/Inputs/c-general.profdata b/test/tools/llvm-profdata/Inputs/c-general.profraw similarity index 100% rename from test/tools/llvm-profdata/Inputs/c-general.profdata rename to test/tools/llvm-profdata/Inputs/c-general.profraw diff --git a/test/tools/llvm-profdata/Inputs/empty.profdata b/test/tools/llvm-profdata/Inputs/empty.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/empty.profdata rename to test/tools/llvm-profdata/Inputs/empty.proftext diff --git a/test/tools/llvm-profdata/Inputs/extra-word.profdata b/test/tools/llvm-profdata/Inputs/extra-word.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/extra-word.profdata rename to test/tools/llvm-profdata/Inputs/extra-word.proftext diff --git a/test/tools/llvm-profdata/Inputs/foo3-1.profdata b/test/tools/llvm-profdata/Inputs/foo3-1.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/foo3-1.profdata rename to test/tools/llvm-profdata/Inputs/foo3-1.proftext diff --git a/test/tools/llvm-profdata/Inputs/foo3-2.profdata b/test/tools/llvm-profdata/Inputs/foo3-2.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/foo3-2.profdata rename to test/tools/llvm-profdata/Inputs/foo3-2.proftext diff --git a/test/tools/llvm-profdata/Inputs/foo3bar3-1.profdata b/test/tools/llvm-profdata/Inputs/foo3bar3-1.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/foo3bar3-1.profdata rename to test/tools/llvm-profdata/Inputs/foo3bar3-1.proftext diff --git a/test/tools/llvm-profdata/Inputs/foo3bar3-2.profdata b/test/tools/llvm-profdata/Inputs/foo3bar3-2.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/foo3bar3-2.profdata rename to test/tools/llvm-profdata/Inputs/foo3bar3-2.proftext diff --git a/test/tools/llvm-profdata/Inputs/foo4-1.profdata b/test/tools/llvm-profdata/Inputs/foo4-1.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/foo4-1.profdata rename to test/tools/llvm-profdata/Inputs/foo4-1.proftext diff --git a/test/tools/llvm-profdata/Inputs/foo4-2.profdata b/test/tools/llvm-profdata/Inputs/foo4-2.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/foo4-2.profdata rename to test/tools/llvm-profdata/Inputs/foo4-2.proftext diff --git a/test/tools/llvm-profdata/Inputs/invalid-count-later.profdata b/test/tools/llvm-profdata/Inputs/invalid-count-later.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/invalid-count-later.profdata rename to test/tools/llvm-profdata/Inputs/invalid-count-later.proftext diff --git a/test/tools/llvm-profdata/Inputs/no-counts.profdata b/test/tools/llvm-profdata/Inputs/no-counts.proftext similarity index 100% rename from test/tools/llvm-profdata/Inputs/no-counts.profdata rename to test/tools/llvm-profdata/Inputs/no-counts.proftext diff --git a/test/tools/llvm-profdata/c-general.test b/test/tools/llvm-profdata/c-general.test index 9b6cd7f4828..01435303d44 100644 --- a/test/tools/llvm-profdata/c-general.test +++ b/test/tools/llvm-profdata/c-general.test @@ -7,10 +7,10 @@ REGENERATE: $ CFE=$SRC/tools/clang REGENERATE: $ TESTDIR=$SRC/test/tools/llvm-profdata REGENERATE: $ CFE_TESTDIR=$CFE/test/Profile REGENERATE: $ clang -o a.out -fprofile-instr-generate $CFE_TESTDIR/test/Profile/c-general.c -REGENERATE: $ LLVM_PROFILE_FILE=$TESTDIR/Inputs/c-general.profdata ./a.out +REGENERATE: $ LLVM_PROFILE_FILE=$TESTDIR/Inputs/c-general.profraw ./a.out -RUN: llvm-profdata show %p/Inputs/c-general.profdata -o - | FileCheck %s -check-prefix=CHECK -RUN: llvm-profdata show %p/Inputs/c-general.profdata -o - --function=switches | FileCheck %s -check-prefix=SWITCHES -check-prefix=CHECK +RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - | FileCheck %s -check-prefix=CHECK +RUN: llvm-profdata show %p/Inputs/c-general.profraw -o - --function=switches | FileCheck %s -check-prefix=SWITCHES -check-prefix=CHECK SWITCHES-LABEL: Counters: SWITCHES-NEXT: switches: diff --git a/test/tools/llvm-profdata/hash-mismatch.profdata b/test/tools/llvm-profdata/hash-mismatch.proftext similarity index 61% rename from test/tools/llvm-profdata/hash-mismatch.profdata rename to test/tools/llvm-profdata/hash-mismatch.proftext index 12632588b64..e4f1a4ca431 100644 --- a/test/tools/llvm-profdata/hash-mismatch.profdata +++ b/test/tools/llvm-profdata/hash-mismatch.proftext @@ -1,5 +1,5 @@ # RUN: llvm-profdata merge %s -o %t.out 2>&1 | FileCheck %s -# CHECK: hash-mismatch.profdata: foo: Function hash mismatch +# CHECK: hash-mismatch.proftext: foo: Function hash mismatch foo 3 diff --git a/test/tools/llvm-profdata/lit.local.cfg b/test/tools/llvm-profdata/lit.local.cfg index 33bc0a9ac58..d44913a8239 100644 --- a/test/tools/llvm-profdata/lit.local.cfg +++ b/test/tools/llvm-profdata/lit.local.cfg @@ -1 +1 @@ -config.suffixes.add('.profdata') +config.suffixes.add('.proftext') diff --git a/test/tools/llvm-profdata/multiple-inputs.test b/test/tools/llvm-profdata/multiple-inputs.test index 82d417e2b7b..35f530a1f0f 100644 --- a/test/tools/llvm-profdata/multiple-inputs.test +++ b/test/tools/llvm-profdata/multiple-inputs.test @@ -1,8 +1,8 @@ Some very basic tests for the multiple input cases. -RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3-2.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-2.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 -RUN: llvm-profdata merge %p/Inputs/foo3-2.profdata %p/Inputs/foo3-1.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo3-2.proftext %p/Inputs/foo3-1.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 FOO3: foo: FOO3: Counters: 3 @@ -12,9 +12,9 @@ FOO3: Total functions: 1 FOO3: Maximum function count: 8 FOO3: Maximum internal block count: 7 -RUN: llvm-profdata merge %p/Inputs/foo4-1.profdata %p/Inputs/foo4-2.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo4-1.proftext %p/Inputs/foo4-2.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 -RUN: llvm-profdata merge %p/Inputs/foo4-2.profdata %p/Inputs/foo4-1.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo4-2.proftext %p/Inputs/foo4-1.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 FOO4: foo: FOO4: Counters: 4 @@ -24,9 +24,9 @@ FOO4: Total functions: 1 FOO4: Maximum function count: 18 FOO4: Maximum internal block count: 48 -RUN: llvm-profdata merge %p/Inputs/foo3bar3-1.profdata %p/Inputs/foo3bar3-2.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo3bar3-1.proftext %p/Inputs/foo3bar3-2.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3 -RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.profdata %p/Inputs/foo3bar3-1.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.proftext %p/Inputs/foo3bar3-1.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3 FOO3BAR3: foo: FOO3BAR3: Counters: 3 @@ -40,7 +40,7 @@ FOO3BAR3: Total functions: 2 FOO3BAR3: Maximum function count: 36 FOO3BAR3: Maximum internal block count: 50 -RUN: llvm-profdata merge %p/Inputs/empty.profdata %p/Inputs/foo3-1.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY FOO3EMPTY: foo: FOO3EMPTY: Counters: 3 @@ -50,7 +50,7 @@ FOO3EMPTY: Total functions: 1 FOO3EMPTY: Maximum function count: 1 FOO3EMPTY: Maximum internal block count: 3 -RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3bar3-1.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3bar3-1.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3 FOO3FOO3BAR3: foo: FOO3FOO3BAR3: Counters: 3 @@ -64,7 +64,7 @@ FOO3FOO3BAR3: Total functions: 2 FOO3FOO3BAR3: Maximum function count: 7 FOO3FOO3BAR3: Maximum internal block count: 13 -RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/bar3-1.profdata -o %t +RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/bar3-1.proftext -o %t RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT DISJOINT: foo: DISJOINT: Counters: 3 diff --git a/test/tools/llvm-profdata/overflow.profdata b/test/tools/llvm-profdata/overflow.proftext similarity index 69% rename from test/tools/llvm-profdata/overflow.profdata rename to test/tools/llvm-profdata/overflow.proftext index 62ced0552ce..cbf3bf16182 100644 --- a/test/tools/llvm-profdata/overflow.profdata +++ b/test/tools/llvm-profdata/overflow.proftext @@ -1,5 +1,5 @@ # RUN: llvm-profdata merge %s -o %t.out 2>&1 | FileCheck %s -# CHECK: overflow.profdata: overflow: Counter overflow +# CHECK: overflow.proftext: overflow: Counter overflow overflow 1 diff --git a/test/tools/llvm-profdata/text-format-errors.test b/test/tools/llvm-profdata/text-format-errors.test index 870001f4816..01513e4fcb9 100644 --- a/test/tools/llvm-profdata/text-format-errors.test +++ b/test/tools/llvm-profdata/text-format-errors.test @@ -1,10 +1,10 @@ -RUN: not llvm-profdata show %p/Inputs/invalid-count-later.profdata 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER -RUN: not llvm-profdata merge %p/Inputs/invalid-count-later.profdata %p/Inputs/invalid-count-later.profdata -o %t.out 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER -INVALID-COUNT-LATER: error: {{.*}}invalid-count-later.profdata: Malformed profile data +RUN: not llvm-profdata show %p/Inputs/invalid-count-later.proftext 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER +RUN: not llvm-profdata merge %p/Inputs/invalid-count-later.proftext %p/Inputs/invalid-count-later.profdata -o %t.out 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER +INVALID-COUNT-LATER: error: {{.*}}invalid-count-later.proftext: Malformed profile data -RUN: not llvm-profdata show %p/Inputs/bad-hash.profdata 2>&1 | FileCheck %s --check-prefix=BAD-HASH -RUN: not llvm-profdata merge %p/Inputs/bad-hash.profdata %p/Inputs/bad-hash.profdata -o %t.out 2>&1 | FileCheck %s --check-prefix=BAD-HASH -BAD-HASH: error: {{.*}}bad-hash.profdata: Malformed profile data +RUN: not llvm-profdata show %p/Inputs/bad-hash.proftext 2>&1 | FileCheck %s --check-prefix=BAD-HASH +RUN: not llvm-profdata merge %p/Inputs/bad-hash.proftext %p/Inputs/bad-hash.proftext -o %t.out 2>&1 | FileCheck %s --check-prefix=BAD-HASH +BAD-HASH: error: {{.*}}bad-hash.proftext: Malformed profile data -RUN: not llvm-profdata show %p/Inputs/no-counts.profdata 2>&1 | FileCheck %s --check-prefix=NO-COUNTS -NO-COUNTS: error: {{.*}}no-counts.profdata: Malformed profile data +RUN: not llvm-profdata show %p/Inputs/no-counts.proftext 2>&1 | FileCheck %s --check-prefix=NO-COUNTS +NO-COUNTS: error: {{.*}}no-counts.proftext: Malformed profile data -- 2.34.1