[compiler-rt] r342718 - [profile] Fix the tests for patch in https://reviews.llvm.org/D49916.

Calixte Denizet via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 21 02:17:14 PDT 2018


Author: calixte
Date: Fri Sep 21 02:17:14 2018
New Revision: 342718

URL: http://llvm.org/viewvc/llvm-project?rev=342718&view=rev
Log:
[profile] Fix the tests for patch in https://reviews.llvm.org/D49916.

Summary:
The goal of D49916 is to remove some hit counters from lines like '}'.
So as a consequence, the tests must be fixed.
FYI, after holidays, I'll add more tests.

Reviewers: marco-c, davidxl

Reviewed By: marco-c

Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D49917

Modified:
    compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func2.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func3.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov
    compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov
    compiler-rt/trunk/test/profile/instrprof-gcov-exceptions.test

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main.c.gcov Fri Sep 21 02:17:14 2018
@@ -87,5 +87,5 @@
 // CHECK-NEXT:    #####:   82:    g2++;
 // CHECK-NEXT:        -:   83:
 // CHECK-NEXT:        1:   84:  return EXIT_SUCCESS;
-// CHECK-NEXT:        1:   85:}
+// CHECK-NEXT:        -:   85:}
 // CHECK-NEXT:        -:   86:

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-dlclose-main_three-libs.c.gcov Fri Sep 21 02:17:14 2018
@@ -87,5 +87,5 @@
 // CHECK-NEXT:    #####:   82:    g2++;
 // CHECK-NEXT:        -:   83:
 // CHECK-NEXT:        1:   84:  return EXIT_SUCCESS;
-// CHECK-NEXT:        1:   85:}
+// CHECK-NEXT:        -:   85:}
 // CHECK-NEXT:        -:   86:

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func.c.gcov Fri Sep 21 02:17:14 2018
@@ -3,4 +3,4 @@
 // CHECK-NEXT:        -:    0:Data:instrprof-dlopen-func.gcda
 // CHECK-NEXT:        -:    0:Runs:1
 // CHECK-NEXT:        -:    0:Programs:1
-// CHECK-NEXT:        1:    1:void func(int K) {}
+// CHECK-NEXT:        -:    1:void func(int K) {}

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func2.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func2.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func2.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func2.c.gcov Fri Sep 21 02:17:14 2018
@@ -3,4 +3,4 @@
 // CHECK-NEXT:        -:    0:Data:instrprof-dlopen-func2.gcda
 // CHECK-NEXT:        -:    0:Runs:1
 // CHECK-NEXT:        -:    0:Programs:1
-// CHECK-NEXT:        1:    1:void func2(int K) {}
+// CHECK-NEXT:        -:    1:void func2(int K) {}

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func3.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func3.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func3.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-dlopen-func3.c.gcov Fri Sep 21 02:17:14 2018
@@ -3,4 +3,4 @@
 // CHECK-NEXT:        -:    0:Data:instrprof-dlopen-func2.gcda
 // CHECK-NEXT:        -:    0:Runs:1
 // CHECK-NEXT:        -:    0:Programs:1
-// CHECK-NEXT:        1:    1:void func2(int K) {}
+// CHECK-NEXT:        -:    1:void func2(int K) {}

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-exceptions.cpp.gcov Fri Sep 21 02:17:14 2018
@@ -6,7 +6,7 @@
 // CHECK-NEXT:        -:    1:#include <string>
 // CHECK-NEXT:        -:    2:
 // CHECK-NEXT:        -:    3:void asd(std::string i) {
-// CHECK-NEXT:        1:    4:}
+// CHECK-NEXT:        -:    4:}
 // CHECK-NEXT:        -:    5:
 // CHECK-NEXT:        -:    6:int main(void)
 // CHECK-NEXT:        -:    7:{

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-gcov-multiple-bbs-single-line.c.gcov Fri Sep 21 02:17:14 2018
@@ -13,7 +13,7 @@
 // CHECK-NEXT:branch  0 taken 1
 // CHECK-NEXT:branch  1 taken 0
 // CHECK-NEXT:        1:    7:    var++;
-// CHECK-NEXT:        1:    8:  }
+// CHECK-NEXT:        -:    8:  }
 // CHECK-NEXT:        -:    9:
 // CHECK-NEXT:        1:   10:  if (a) {}
 // CHECK-NEXT:branch  0 taken 1
@@ -24,7 +24,7 @@
 // CHECK-NEXT:branch  0 taken 0
 // CHECK-NEXT:branch  1 taken 1
 // CHECK-NEXT:    #####:   14:    var++;
-// CHECK-NEXT:    #####:   15:  }
+// CHECK-NEXT:        -:   15:  }
 // CHECK-NEXT:        -:   16:
 // CHECK-NEXT:        1:   17:  if (b) {}
 // CHECK-NEXT:branch  0 taken 0

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib.c.gcov Fri Sep 21 02:17:14 2018
@@ -11,4 +11,4 @@
 // CHECK-NEXT:    #####:    6:    g1++;
 // CHECK-NEXT:        -:    7:  else
 // CHECK-NEXT:        1:    8:    g2++;
-// CHECK-NEXT:        1:    9:}
+// CHECK-NEXT:        -:    9:}

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_called-twice.c.gcov Fri Sep 21 02:17:14 2018
@@ -11,4 +11,4 @@
 // CHECK-NEXT:    #####:    6:    g1++;
 // CHECK-NEXT:        -:    7:  else
 // CHECK-NEXT:        2:    8:    g2++;
-// CHECK-NEXT:        2:    9:}
+// CHECK-NEXT:        -:    9:}

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-lib_in-loop.c.gcov Fri Sep 21 02:17:14 2018
@@ -11,4 +11,4 @@
 // CHECK-NEXT:   360000:    6:    g1++;
 // CHECK-NEXT:        -:    7:  else
 // CHECK-NEXT:   640000:    8:    g2++;
-// CHECK-NEXT:  1000000:    9:}
+// CHECK-NEXT:        -:    9:}

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_no-writeout.c.gcov Fri Sep 21 02:17:14 2018
@@ -14,7 +14,7 @@
 // CHECK-NEXT:        1:    9:    bar1++;
 // CHECK-NEXT:        -:   10:  else
 // CHECK-NEXT:    #####:   11:    bar2++;
-// CHECK-NEXT:        1:   12:}
+// CHECK-NEXT:        -:   12:}
 // CHECK-NEXT:        -:   13:
 // CHECK-NEXT:        -:   14:int main(int argc, char *argv[]) {
 // CHECK-NEXT:        -:   15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH
@@ -38,4 +38,4 @@
 // CHECK-NEXT:        -:   33:  bar(5);
 // CHECK-NEXT:        -:   34:
 // CHECK-NEXT:        -:   35:  return 0;
-// CHECK-NEXT:    #####:   36:}
+// CHECK-NEXT:        -:   36:}

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-after.c.gcov Fri Sep 21 02:17:14 2018
@@ -14,7 +14,7 @@
 // CHECK-NEXT:        3:    9:    bar1++;
 // CHECK-NEXT:        -:   10:  else
 // CHECK-NEXT:    #####:   11:    bar2++;
-// CHECK-NEXT:        3:   12:}
+// CHECK-NEXT:        -:   12:}
 // CHECK-NEXT:        -:   13:
 // CHECK-NEXT:        -:   14:int main(int argc, char *argv[]) {
 // CHECK-NEXT:        -:   15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before-after.c.gcov Fri Sep 21 02:17:14 2018
@@ -14,7 +14,7 @@
 // CHECK-NEXT:        3:    9:    bar1++;
 // CHECK-NEXT:        -:   10:  else
 // CHECK-NEXT:    #####:   11:    bar2++;
-// CHECK-NEXT:        3:   12:}
+// CHECK-NEXT:        -:   12:}
 // CHECK-NEXT:        -:   13:
 // CHECK-NEXT:        -:   14:int main(int argc, char *argv[]) {
 // CHECK-NEXT:        -:   15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main-gcov-flush_shared-call-before.c.gcov Fri Sep 21 02:17:14 2018
@@ -14,7 +14,7 @@
 // CHECK-NEXT:        3:    9:    bar1++;
 // CHECK-NEXT:        -:   10:  else
 // CHECK-NEXT:    #####:   11:    bar2++;
-// CHECK-NEXT:        3:   12:}
+// CHECK-NEXT:        -:   12:}
 // CHECK-NEXT:        -:   13:
 // CHECK-NEXT:        -:   14:int main(int argc, char *argv[]) {
 // CHECK-NEXT:        -:   15:#ifdef SHARED_CALL_BEFORE_GCOV_FLUSH

Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov (original)
+++ compiler-rt/trunk/test/profile/Inputs/instrprof-shared-main.c.gcov Fri Sep 21 02:17:14 2018
@@ -10,9 +10,9 @@
 // CHECK-NEXT:        -:    5:  int i, j;
 // CHECK-NEXT:     1001:    6:  for (i = 0; i < 1000; i++)
 // CHECK-NEXT:  1001000:    7:    for (j = 0; j < 1000; j++)
-// CHECK-NEXT:  1001000:    8:      foo(i * j);
+// CHECK-NEXT:  1000000:    8:      foo(i * j);
 // CHECK-NEXT:        -:    9:
 // CHECK-NEXT:        1:   10:  if (g2 - g1 == 280001)
 // CHECK-NEXT:        1:   11:    return 0;
 // CHECK-NEXT:    #####:   12:  return 1;
-// CHECK-NEXT:        1:   13:}
+// CHECK-NEXT:        -:   13:}

Modified: compiler-rt/trunk/test/profile/instrprof-gcov-exceptions.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-gcov-exceptions.test?rev=342718&r1=342717&r2=342718&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/instrprof-gcov-exceptions.test (original)
+++ compiler-rt/trunk/test/profile/instrprof-gcov-exceptions.test Fri Sep 21 02:17:14 2018
@@ -17,5 +17,4 @@ RUN: test -f instrprof-gcov-exceptions.g
 RUN: rm -f instrprof-gcov-exceptions.gcda
 RUN: %run %t
 RUN: llvm-cov gcov instrprof-gcov-exceptions.gcda
-# The result should be the same, not using XFAIL as only this part of the test is failing.
-RUN: not FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-exceptions.cpp.gcov %S/Inputs/instrprof-gcov-exceptions.cpp.gcov
+RUN: FileCheck --match-full-lines --strict-whitespace --input-file instrprof-gcov-exceptions.cpp.gcov %S/Inputs/instrprof-gcov-exceptions.cpp.gcov




More information about the llvm-commits mailing list