Details

    Description

      Compiling with:

      cmake . -DCMAKE_BUILD_TYPE=Debug  -DENABLE_GCOV=ON
      make -j10
      

      Then running a test
      ./mtr --gcov main.subselect

      ==============================================================================
       
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
       
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      main.subselect                           [ pass ]   2364
      --------------------------------------------------------------------------
      The servers were restarted 0 times
      Spent 2.364 of 5 seconds executing testcases
       
      Completed: All 1 tests were successful.
       
      Running dgcov
      open(<string.c.gcda.gcov): No such file or directory at ./dgcov.pl line 165.
      
      

      Then hit the above error.

      Also checked dgcov works on 10.1.

      Attachments

        Issue Links

          Activity

            Hi serg,

            1. my patch should work on any version where -i is supported. I only had the first patch with wrong information about gcov and mislead about versions.However I wrote details about versions in Zulip and currently using gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026 for tests, tested with older on Centos -works, if you want I can proceed further with tests.

            2. Example about my_sha512.cc.gcov where the file doesn't exist is unclear for me and is reason why I removed files not ending with gcov.
            I tested with long file names -l options where I only got the different filenames separated with # and have pointed that in Zulip realpath too.
            After gcov -i is invoked gcov file must be created! Documentation:

            i
            --intermediate-format
            The output is a single .gcov file per .gcda file. No source code is required.
            

            Header file <name>.hpp cannot have it's own gcov file. It is included in other file and gcda files are created on the exectuable. From gcda files are created gcov.
            What is not clear for me, how gcda files for headers are created - I guess it has to do something with CMake and usage of add_convinience_library but I'm not sure.
            And here I will again give the example what is happening:
            If I remove skipping non-existing files in my patch:

             
            return unless(-f "$`.gcov");
            #return unless(-f "$`.gcov")
            

            Invoke the test

            ==============================================================================
             
            TEST RESULT TIME (ms) or COMMENT
             
            worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
            funcs_1.is_check_constraints 'innodb' [ pass ] 361
             
            The servers were restarted 0 times
            Spent 0.361 of 5 seconds executing testcases
             
            Completed: All 1 tests were successful.
             
            Running dgcov
            open(<aestables.cpp.gcov): No such file or directory at ./dgcov.pl line 166.
            

            Above gcov -i aestables.cpp.gcda is exectued, where aestables.cpp.gcda exists and gcov is not generated.
            If you look the file it is just a namespace namespace TaoCrypt { ...} and is used with add_convinience_library.
            I have done test of creating the static library with coverage and I'm ending without gcda files again only for exectuable files, but not files in the static library.

            $ find .|grep aestables
            ./extra/yassl/taocrypt/src/aestables.cpp
            ./extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aestables.cpp.gcno
            ./extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aestables.cpp.o
            ./extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aestables.cpp.gcda
            

            When applying your patch I ended with having gcov files with headers - but they are not needed for the coverage since gcda file is not creating it's own gcov - there is no aestables.cpp.gcov file that is parsed!

            aestables.cpp.gcda##modes.hpp.gcov at ./dgcov.pl line 168.
            aestables.cpp.gcda##runtime.hpp.gcov at ./dgcov.pl line 168.
            

            But regardless, even if gcda files for header are created (for unknown reason - my culprit is CMake) gcov recognize them as not valid information file for creating gcov files and that's why they need to be skipped IMHO without lost of any information.
            Regarding the -l, I think it is not related to above problem. I tested locally with header and don't end with gcda files for header even in case of -l option,but it is needed for your patch because of logic in for loop.

             
               -l
               --long-file-names
                   Create long file names for included source files.  For example, if the header file x.h contains code, and was
                   included in the file a.c, then running gcov on the file a.c will produce an output file called a.c##x.h.gcov
                   instead of x.h.gcov.  This can be useful if x.h is included in multiple source files and you want to see the
                   individual contributions.  If you use the -p option, both the including and included file names will be
                   complete path names.
            

            3. Applying only your patch doesn't work:

            unknown line 'lcount:2165,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 672.
            unknown line 'lcount:2175,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 673.
            unknown line 'lcount:2177,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 674.
            unknown line 'lcount:2179,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 675.
            unknown line 'lcount:2180,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 676.
            unknown line 'lcount:2181,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 677.
            unknown line 'lcount:2183,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 678.
            unknown line 'lcount:2188,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 679.
            unknown line 'lcount:2191,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 680.
            unknown line 'lcount:2192,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 681.
            unknown line 'lcount:2194,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 682.
            unknown line 'lcount:2200,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 683.
            unknown line 'lcount:2204,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 684.
            unknown line 'lcount:2206,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 685.
            unknown line 'lcount:2207,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 686.
            unknown line 'lcount:2209,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 687.
            unknown line 'lcount:2210,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 688.
            unknown line 'lcount:2211,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 689.
            unknown line 'lcount:2212,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 690.
            unknown line 'lcount:2213,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 691.
            unknown line 'lcount:2218,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 692.
            unknown line 'lcount:2221,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 693.
            unknown line 'lcount:2222,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 694.
            unknown line 'lcount:2225,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 695.
            unknown line 'lcount:2228,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 696.
            unknown line 'lcount:2229,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 697.
            unknown line 'lcount:2232,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 698.
            unknown line 'lcount:2235,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 699.
            unknown line 'lcount:2236,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 700.
            

            it is missing part from my patch $fname=$root.$';.

            4. I don't get useful information without redirecting the output:

            # running the test:
            ma_alloc.c.gcno:version '605*', prefer 'A75*'
            ma_alloc.c.gcda:version '605*', prefer version 'A75*'
            open(<ma_alloc.c.gcda.gcov): No such file or directory at ./dgcov.pl line 168.
             
            # again the file is not created:
            $ find .|grep "my_alloc\.c"
            ./mysys/my_alloc.c
            ./mysys/CMakeFiles/mysys.dir/my_alloc.c.gcno
            ./mysys/CMakeFiles/mysys.dir/my_alloc.c.o
            ./mysys/CMakeFiles/mysys.dir/my_alloc.c.gcda
            

            Conclusion

            • My conclusion after local testing is that we can safely skip files header files, we can add or remove -l and we will get the valid result.
              With both patches in my specific example result is the same.
              Even if you decide to go with your patch + addition, I'm ok with that, but I don't have strong proof why is needed (header usage explained above).

            5. Oh one more thing. What I think is needed is this part:

               unless ($opt_skip_gcov) {
            -    $cmd= "gcov -i '$_' 2>/dev/null >/dev/null";
            +    $cmd= "gcov -i '$_' 2>/dev/null";
            

            where information about files percentage is shown:

            File 'mysys/my_basename.c'
            Lines executed:0.00% of 10
            Creating 'my_basename.c.gcov'
             
            File 'mysys/my_rnd.c'
            Lines executed:84.62% of 13
            Creating 'my_rnd.c.gcov'
             
            File 'mysys/mf_radix.c'
            Lines executed:10.53% of 19
            Creating 'mf_radix.c.gcov'
             
            File 'sql-common/my_time.c'
            Lines executed:15.03% of 572
            Creating 'my_time.c.gcov'
             
            File 'include/my_time.h'
            Lines executed:45.45% of 11
            Creating 'my_time.h.gcov'
             
            File 'mysql-test/lib/My/SafeProcess/safe_process.cc'
            Lines executed:24.62% of 130
            Creating 'safe_process.cc.gcov'
             
            File 'dbug/dbug.c'
            Lines executed:34.67% of 649
            Creating 'dbug.c.gcov'
             
            *********************
            dgcov sql/sql_show.cc
            *********************
            @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables,
                     : 6601:      }
                     : 6602:#endif
                     : 6603:      Virtual_column_info *check= tables->table->check_constraints[i];
                  132: 6605:      table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info);
                     : 6606:      table->field[3]->store(check->name.str, check->name.length,
                     : 6607:                             system_charset_info);
            
            

            without the suggested patch this is the result:

            *********************
            dgcov sql/sql_show.cc
            *********************
            @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables,
                     : 6601:      }
                     : 6602:#endif
                     : 6603:      Virtual_column_info *check= tables->table->check_constraints[i];
                  132: 6605:      table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info);
                     : 6606:      table->field[3]->store(check->name.str, check->name.length,
                     : 6607:                             system_charset_info);
            
            

            anel Anel Husakovic added a comment - Hi serg , 1. my patch should work on any version where -i is supported. I only had the first patch with wrong information about gcov and mislead about versions.However I wrote details about versions in Zulip and currently using gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026 for tests, tested with older on Centos -works, if you want I can proceed further with tests. 2. Example about my_sha512.cc.gcov where the file doesn't exist is unclear for me and is reason why I removed files not ending with gcov . I tested with long file names -l options where I only got the different filenames separated with # and have pointed that in Zulip realpath too. After gcov -i is invoked gcov file must be created! Documentation: i --intermediate-format The output is a single .gcov file per .gcda file. No source code is required. Header file <name>.hpp cannot have it's own gcov file. It is included in other file and gcda files are created on the exectuable. From gcda files are created gcov . What is not clear for me, how gcda files for headers are created - I guess it has to do something with CMake and usage of add_convinience_library but I'm not sure. And here I will again give the example what is happening: If I remove skipping non-existing files in my patch:   return unless(-f "$`.gcov"); #return unless(-f "$`.gcov") Invoke the test ==============================================================================   TEST RESULT TIME (ms) or COMMENT   worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 funcs_1.is_check_constraints 'innodb' [ pass ] 361   The servers were restarted 0 times Spent 0.361 of 5 seconds executing testcases   Completed: All 1 tests were successful.   Running dgcov open(<aestables.cpp.gcov): No such file or directory at ./dgcov.pl line 166. Above gcov -i aestables.cpp.gcda is exectued, where aestables.cpp.gcda exists and gcov is not generated. If you look the file it is just a namespace namespace TaoCrypt { ... } and is used with add_convinience_library . I have done test of creating the static library with coverage and I'm ending without gcda files again only for exectuable files, but not files in the static library. $ find .|grep aestables ./extra/yassl/taocrypt/src/aestables.cpp ./extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aestables.cpp.gcno ./extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aestables.cpp.o ./extra/yassl/taocrypt/CMakeFiles/taocrypt.dir/src/aestables.cpp.gcda When applying your patch I ended with having gcov files with headers - but they are not needed for the coverage since gcda file is not creating it's own gcov - there is no aestables.cpp.gcov file that is parsed! aestables.cpp.gcda##modes.hpp.gcov at ./dgcov.pl line 168. aestables.cpp.gcda##runtime.hpp.gcov at ./dgcov.pl line 168. But regardless, even if gcda files for header are created (for unknown reason - my culprit is CMake) gcov recognize them as not valid information file for creating gcov files and that's why they need to be skipped IMHO without lost of any information. Regarding the -l , I think it is not related to above problem. I tested locally with header and don't end with gcda files for header even in case of -l option,but it is needed for your patch because of logic in for loop.   -l --long-file-names Create long file names for included source files. For example, if the header file x.h contains code, and was included in the file a.c, then running gcov on the file a.c will produce an output file called a.c##x.h.gcov instead of x.h.gcov. This can be useful if x.h is included in multiple source files and you want to see the individual contributions. If you use the -p option, both the including and included file names will be complete path names. 3. Applying only your patch doesn't work: unknown line 'lcount:2165,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 672. unknown line 'lcount:2175,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 673. unknown line 'lcount:2177,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 674. unknown line 'lcount:2179,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 675. unknown line 'lcount:2180,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 676. unknown line 'lcount:2181,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 677. unknown line 'lcount:2183,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 678. unknown line 'lcount:2188,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 679. unknown line 'lcount:2191,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 680. unknown line 'lcount:2192,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 681. unknown line 'lcount:2194,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 682. unknown line 'lcount:2200,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 683. unknown line 'lcount:2204,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 684. unknown line 'lcount:2206,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 685. unknown line 'lcount:2207,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 686. unknown line 'lcount:2209,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 687. unknown line 'lcount:2210,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 688. unknown line 'lcount:2211,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 689. unknown line 'lcount:2212,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 690. unknown line 'lcount:2213,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 691. unknown line 'lcount:2218,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 692. unknown line 'lcount:2221,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 693. unknown line 'lcount:2222,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 694. unknown line 'lcount:2225,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 695. unknown line 'lcount:2228,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 696. unknown line 'lcount:2229,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 697. unknown line 'lcount:2232,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 698. unknown line 'lcount:2235,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 699. unknown line 'lcount:2236,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 180, <FH> line 700. it is missing part from my patch $fname=$root.$'; . 4. I don't get useful information without redirecting the output: # running the test: ma_alloc.c.gcno:version '605*', prefer 'A75*' ma_alloc.c.gcda:version '605*', prefer version 'A75*' open(<ma_alloc.c.gcda.gcov): No such file or directory at ./dgcov.pl line 168.   # again the file is not created: $ find .|grep "my_alloc\.c" ./mysys/my_alloc.c ./mysys/CMakeFiles/mysys.dir/my_alloc.c.gcno ./mysys/CMakeFiles/mysys.dir/my_alloc.c.o ./mysys/CMakeFiles/mysys.dir/my_alloc.c.gcda Conclusion My conclusion after local testing is that we can safely skip files header files, we can add or remove -l and we will get the valid result. With both patches in my specific example result is the same. Even if you decide to go with your patch + addition, I'm ok with that, but I don't have strong proof why is needed (header usage explained above). 5. Oh one more thing. What I think is needed is this part: unless ($opt_skip_gcov) { - $cmd= "gcov -i '$_' 2>/dev/null >/dev/null"; + $cmd= "gcov -i '$_' 2>/dev/null"; where information about files percentage is shown: File 'mysys/my_basename.c' Lines executed:0.00% of 10 Creating 'my_basename.c.gcov'   File 'mysys/my_rnd.c' Lines executed:84.62% of 13 Creating 'my_rnd.c.gcov'   File 'mysys/mf_radix.c' Lines executed:10.53% of 19 Creating 'mf_radix.c.gcov'   File 'sql-common/my_time.c' Lines executed:15.03% of 572 Creating 'my_time.c.gcov'   File 'include/my_time.h' Lines executed:45.45% of 11 Creating 'my_time.h.gcov'   File 'mysql-test/lib/My/SafeProcess/safe_process.cc' Lines executed:24.62% of 130 Creating 'safe_process.cc.gcov'   File 'dbug/dbug.c' Lines executed:34.67% of 649 Creating 'dbug.c.gcov'   ********************* dgcov sql/sql_show.cc ********************* @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables, : 6601: } : 6602:#endif : 6603: Virtual_column_info *check= tables->table->check_constraints[i]; 132: 6605: table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info); : 6606: table->field[3]->store(check->name.str, check->name.length, : 6607: system_charset_info); without the suggested patch this is the result: ********************* dgcov sql/sql_show.cc ********************* @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables, : 6601: } : 6602:#endif : 6603: Virtual_column_info *check= tables->table->check_constraints[i]; 132: 6605: table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info); : 6606: table->field[3]->store(check->name.str, check->name.length, : 6607: system_charset_info);

            1. try your patch with gcc 5.4.0 for example on Ubuntu Xenial

            2. depends on gcov version. 7.3.0 on Ubuntu Bionic say simply

              -i, --intermediate-format       Output .gcov file in intermediate text format
            

            3. what gcc version is that? it worked on 5.4.0 and on 7.3.0

            4. I don't understand what you're doing. I suggested to run gcov -i manually. Without 2>/dev/null >/dev/null

            serg Sergei Golubchik added a comment - 1. try your patch with gcc 5.4.0 for example on Ubuntu Xenial 2. depends on gcov version. 7.3.0 on Ubuntu Bionic say simply -i, --intermediate-format Output .gcov file in intermediate text format 3. what gcc version is that? it worked on 5.4.0 and on 7.3.0 4. I don't understand what you're doing. I suggested to run gcov -i manually. Without 2>/dev/null >/dev/null

            1. I will test, ok.
            2. Yes https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Invoking-Gcov.html#Invoking-Gcov and what I said is based on that, don't understand what you meant ? -i --json is for 9.1+ and I have created MDEV-26102 for that.
            3. I used 7.5 for my tests on Ubuntu Bionic
            4. And that is exactly what I did, but on the test case ./mtr --gcov is_check_constraints when changing something in sql/sql_show.cc get_check_constraints_record.
            what is your opinion for 5. ?

            anel Anel Husakovic added a comment - 1. I will test, ok. 2. Yes https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Invoking-Gcov.html#Invoking-Gcov and what I said is based on that, don't understand what you meant ? -i --json is for 9.1+ and I have created MDEV-26102 for that. 3. I used 7.5 for my tests on Ubuntu Bionic 4. And that is exactly what I did, but on the test case ./mtr --gcov is_check_constraints when changing something in sql/sql_show.cc get_check_constraints_record . what is your opinion for 5. ?

            2. I mean that there's a fact of life that gcov 7.5 creates *.gcov files that do not always have the same base name as the *.gcda files. We can handle it. Or produce incorrect coverage. My patch handles it.

            3. I tested on Ubuntu Bionic, and it worked.

            5. you can do it in -v -v (very verbose) mode

            serg Sergei Golubchik added a comment - 2. I mean that there's a fact of life that gcov 7.5 creates *.gcov files that do not always have the same base name as the *.gcda files. We can handle it. Or produce incorrect coverage. My patch handles it. 3. I tested on Ubuntu Bionic, and it worked. 5. you can do it in -v -v (very verbose) mode

            Hi Serg,
            1. I have tested on Ubuntu Bionic with gcc/g++ 5.5

            test gcc/g++ 5.5 with my patch

            $ sudo apt-get update
            $ sudo apt-get install gcc-5 g++-5 -y # this installs 5.5 versions
            # the same gcc/g++ version is obtained if added from xenial
            $ sudo touch /etc/apt/sources.list.d/xenial-anel.list && \
              echo "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main" | sudo tee -a /etc/apt/sources.list.d/xenial-anel.list  &&\
              echo "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe"|sudo tee -a /etc/apt/sources.list.d/xenial-anel.list  && sudo apt update
            $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 21
            $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 21
            $ sudo update-alternatives --display gcc
            gcc - manual mode
              link best version is /usr/bin/gcc-5
              link currently points to /usr/bin/gcc-7
              link gcc is /usr/bin/gcc
            /usr/bin/gcc-5 - priority 21
            /usr/bin/gcc-6 - priority 6
            /usr/bin/gcc-7 - priority 7
            /usr/bin/gcc-9 - priority 9
             
            $ sudo update-alternatives --display g++
            g++ - manual mode
              link best version is /usr/bin/g++-5
              link currently points to /usr/bin/g++-7
              link g++ is /usr/bin/g++
            /usr/bin/g++-5 - priority 21
            /usr/bin/g++-6 - priority 6
            /usr/bin/g++-7 - priority 7
            /usr/bin/g++-9 - priority 9
            $ sudo update-alternatives --config gcc
            There are 4 choices for the alternative gcc (providing /usr/bin/gcc).
             
              Selection    Path            Priority   Status
            ------------------------------------------------------------
              0            /usr/bin/gcc-5   21        auto mode
              1            /usr/bin/gcc-5   21        manual mode
              2            /usr/bin/gcc-6   6         manual mode
            * 3            /usr/bin/gcc-7   7         manual mode
              4            /usr/bin/gcc-9   9         manual mode
             
            Press <enter> to keep the current choice[*], or type selection number: 1
            $ gcc --version && g++ --version
            gcc (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
            Copyright (C) 2015 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
             
            g++ (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
            Copyright (C) 2015 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
             
            $ git clean -dffx && cmake . -DCMAKE_BUILD_TYPE=Debug -DCONC_WITH_{UNITTEST,SSL}=OFF -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,PERFSCHEMA,SPIDER,SPHINX}=NO -DWITH_SAFEMALLOC=OFF -DWITH_SSL=bundled -DENABLE_GCOV=ON -DCMAKE_{C_COMPILER=gcc,CXX_COMPILER=g++}-5
            $ cmake --build .
            

            If I check the result for my patch - it works:

            result

            ==============================================================================
             
            TEST                                      RESULT   TIME (ms) or COMMENT
            --------------------------------------------------------------------------
             
            worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
            funcs_1.is_check_constraints 'innodb'    [ pass ]    340
            --------------------------------------------------------------------------
            The servers were restarted 0 times
            Spent 0.340 of 5 seconds executing testcases
             
            Completed: All 1 tests were successful.
             
            Running dgcov
            *********************
            dgcov sql/sql_show.cc
            *********************
            @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables,
                     : 6601:      }
                     : 6602:#endif
                     : 6603:      Virtual_column_info *check= tables->table->check_constraints[i];
                  132: 6605:      table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info);
                     : 6606:      table->field[3]->store(check->name.str, check->name.length,
                     : 6607:                             system_charset_info);
            

            2. I analyzed in which situation names should be different and have showed that on your patch -> "aestable" example ^^^. However I couldn't locally reproduce to have headers with "gcov" extension, although documentation says that. By default it must have <source-name>.gcov and skipping everything else I don't see harmful.

            3. Sorry I don't get working example based on your last patch, I don't know what I'm doing wrong or where we diverge.
            I have tested on ver 6.5 and 7.5 Ubuntu Bionic (by changing CMAKE_

            {C_COMPILER=gcc,CXX_COMPILER=g++}

            -7) resulting in :

            configuration

             
            $ cmake . -DCMAKE_BUILD_TYPE=Debug -DCONC_WITH_{UNITTEST,SSL}=OFF -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,PERFSCHEMA,SPIDER,SPHINX}=NO -DWITH_SAFEMALLOC=OFF -DWITH_SSL=bundled  -DENABLE_GCOV=ON -DCMAKE_\{C_COMPILER=gcc,CXX_COMPILER=g++\}-7 
            $ cmake --build .
             
             
            $ cmake . -LAH|grep -E "CMAKE_C_COMPILER|_CXX_COMPILER|GCOV"
            CMAKE_CXX_COMPILER:STRING=/usr/bin/g++-7
            CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7
            CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7
            CMAKE_C_COMPILER:STRING=/usr/bin/gcc-7
            CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7
            CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7
            ENABLE_GCOV:BOOL=ON
            

            Always I get the same result (see below).
            I applied your patch on top of my patch (where I have added comments) + change for testing the mtr test:

            patch

            $ git diff dgcov.pl ../sql
            diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl
            index 585586f9506..0bc1635a989 100755
            --- a/mysql-test/dgcov.pl
            +++ b/mysql-test/dgcov.pl
            @@ -155,15 +155,17 @@ END
             sub gcov_one_file {
               return unless /\.gcda$/;
               unless ($opt_skip_gcov) {
            -    $cmd= "gcov -i '$_' 2>/dev/null >/dev/null";
            +    $cmd= "gcov -il '$_' 2>/dev/null >/dev/null";
                 print STDERR ++$file_no,"\r" if not $opt_verbose and -t STDERR;
                 logv "Running: $cmd";
                 system($cmd)==0 or die "system($cmd): $? $!";
               }
             
               # now, read the generated file
            -  return unless(-f "$`.gcov");
            -  open FH, '<', "$`.gcov" or die "open(<$`.gcov): $!";
            +  #return unless(-f "$`.gcov");
            +  #open FH, '<', "$`.gcov" or die "open(<$`.gcov): $!";
            +  for my $gcov_file (<$_*.gcov>) {
            +  open FH, '<', "$gcov_file" or die "open(<$gcov_file): $!";
               my $fname;
               while (<FH>) {
                 chomp;
            @@ -171,7 +173,8 @@ sub gcov_one_file {
                   next;
                 }
                 if (/^file:/) {
            -      $fname=$root.$';
            +      #$fname=$root.$';
            +      $fname=realpath($');
                   next;
                 }
                 next if /^lcount:\d+,-\d+/; # whatever that means
            @@ -182,6 +185,7 @@ sub gcov_one_file {
                 $cov{$fname}->{$1}+=$2;
               }
               close(FH);
            +  }
             }
             
             sub write_coverage {
            diff --git a/sql/sql_show.cc b/sql/sql_show.cc
            index 721bb053343..39f0a12132c 100644
            --- a/sql/sql_show.cc
            +++ b/sql/sql_show.cc
            @@ -6601,7 +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables,
                   }
             #endif
                   Virtual_column_info *check= tables->table->check_constraints[i];
            -      table->field[0]->store(STRING_WITH_LEN("def"), system_charset_info);
            +      table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info);
                   table->field[3]->store(check->name.str, check->name.length,
                                          system_charset_info);
                   /* Make sure the string is empty between each print. */
            

            This is the result:

            result

            $ ./mtr --gcov is_check_constraints
            ...
            unknown line 'lcount:2218,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 692.
            unknown line 'lcount:2221,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 693.
            unknown line 'lcount:2222,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 694.
            unknown line 'lcount:2225,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 695.
            unknown line 'lcount:2228,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 696.
            unknown line 'lcount:2229,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 697.
            unknown line 'lcount:2232,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 698.
            unknown line 'lcount:2235,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 699.
            unknown line 'lcount:2236,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 700.
             
            $ cat var/last_changes.dgcov  # empty
            

            Tested with versions:

            gcc-g++-gcov version 6

            $ gcc --version && g++ --version && gcov --version
            gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026
            Copyright (C) 2017 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
             
            g++ (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026
            Copyright (C) 2017 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
             
            gcov (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026
            Copyright (C) 2017 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.
            There is NO warranty; not even for MERCHANTABILITY or 
            FITNESS FOR A PARTICULAR PURPOSE.
            

            Than changed version to 7.5 via update-alternatives

            version 7.5 test

            $ sudo update-alternatives --config gcc && sudo update-alternatives --config g++ && alias gcov="/usr/bin/gcov-7"
             
            $ gcc --version && g++ --version && gcov --version
            gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
            Copyright (C) 2017 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
             
            g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
            Copyright (C) 2017 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
             
            gcov (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
            Copyright (C) 2017 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.
            There is NO warranty; not even for MERCHANTABILITY or 
            FITNESS FOR A PARTICULAR PURPOSE.
            $ cmake --build .
            
            

            However if I change the line to my patch

            change of root

                 if (/^file:/) {
                   $fname=$root.$'; # part of my patch
            +      #$fname=realpath($');
            

            Then result is:

            result-expected

            $ cat var/last_changes.dgcov 
            *********************
            dgcov sql/sql_show.cc
            *********************
            @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables,
                     : 6601:      }
                     : 6602:#endif
                     : 6603:      Virtual_column_info *check= tables->table->check_constraints[i];
                  132: 6605:      table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info);
                     : 6606:      table->field[3]->store(check->name.str, check->name.length,
                     : 6607:                             system_charset_info);
            
            

            5. Tested with --verbose --verbose ending with missing information about the file usage in var/last_changes.dgcov, so still I'm thinking that removing stdout redirection from gcov -i would be good.

            anel Anel Husakovic added a comment - Hi Serg, 1. I have tested on Ubuntu Bionic with gcc/g++ 5.5 test gcc/g++ 5.5 with my patch $ sudo apt-get update $ sudo apt-get install gcc-5 g++-5 -y # this installs 5.5 versions # the same gcc/g++ version is obtained if added from xenial $ sudo touch /etc/apt/sources.list.d/xenial-anel.list && \ echo "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main" | sudo tee -a /etc/apt/sources.list.d/xenial-anel.list &&\ echo "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe"|sudo tee -a /etc/apt/sources.list.d/xenial-anel.list && sudo apt update $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 21 $ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 21 $ sudo update-alternatives --display gcc gcc - manual mode link best version is /usr/bin/gcc-5 link currently points to /usr/bin/gcc-7 link gcc is /usr/bin/gcc /usr/bin/gcc-5 - priority 21 /usr/bin/gcc-6 - priority 6 /usr/bin/gcc-7 - priority 7 /usr/bin/gcc-9 - priority 9   $ sudo update-alternatives --display g++ g++ - manual mode link best version is /usr/bin/g++-5 link currently points to /usr/bin/g++-7 link g++ is /usr/bin/g++ /usr/bin/g++-5 - priority 21 /usr/bin/g++-6 - priority 6 /usr/bin/g++-7 - priority 7 /usr/bin/g++-9 - priority 9 $ sudo update-alternatives --config gcc There are 4 choices for the alternative gcc (providing /usr/bin/gcc).   Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/gcc-5 21 auto mode 1 /usr/bin/gcc-5 21 manual mode 2 /usr/bin/gcc-6 6 manual mode * 3 /usr/bin/gcc-7 7 manual mode 4 /usr/bin/gcc-9 9 manual mode   Press <enter> to keep the current choice[*], or type selection number: 1 $ gcc --version && g++ --version gcc (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   g++ (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   $ git clean -dffx && cmake . -DCMAKE_BUILD_TYPE=Debug -DCONC_WITH_{UNITTEST,SSL}=OFF -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,PERFSCHEMA,SPIDER,SPHINX}=NO -DWITH_SAFEMALLOC=OFF -DWITH_SSL=bundled -DENABLE_GCOV=ON -DCMAKE_{C_COMPILER=gcc,CXX_COMPILER=g++}-5 $ cmake --build . If I check the result for my patch - it works: result ==============================================================================   TEST RESULT TIME (ms) or COMMENT --------------------------------------------------------------------------   worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 funcs_1.is_check_constraints 'innodb' [ pass ] 340 -------------------------------------------------------------------------- The servers were restarted 0 times Spent 0.340 of 5 seconds executing testcases   Completed: All 1 tests were successful.   Running dgcov ********************* dgcov sql/sql_show.cc ********************* @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables, : 6601: } : 6602:#endif : 6603: Virtual_column_info *check= tables->table->check_constraints[i]; 132: 6605: table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info); : 6606: table->field[3]->store(check->name.str, check->name.length, : 6607: system_charset_info); 2. I analyzed in which situation names should be different and have showed that on your patch -> "aestable" example ^^^. However I couldn't locally reproduce to have headers with "gcov" extension, although documentation says that. By default it must have <source-name>.gcov and skipping everything else I don't see harmful. 3. Sorry I don't get working example based on your last patch, I don't know what I'm doing wrong or where we diverge. I have tested on ver 6.5 and 7.5 Ubuntu Bionic (by changing CMAKE_ {C_COMPILER=gcc,CXX_COMPILER=g++} -7) resulting in : configuration   $ cmake . -DCMAKE_BUILD_TYPE=Debug -DCONC_WITH_{UNITTEST,SSL}=OFF -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,PERFSCHEMA,SPIDER,SPHINX}=NO -DWITH_SAFEMALLOC=OFF -DWITH_SSL=bundled -DENABLE_GCOV=ON -DCMAKE_\{C_COMPILER=gcc,CXX_COMPILER=g++\}-7 $ cmake --build .     $ cmake . -LAH|grep -E "CMAKE_C_COMPILER|_CXX_COMPILER|GCOV" CMAKE_CXX_COMPILER:STRING=/usr/bin/g++-7 CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 CMAKE_C_COMPILER:STRING=/usr/bin/gcc-7 CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 ENABLE_GCOV:BOOL=ON Always I get the same result (see below). I applied your patch on top of my patch (where I have added comments) + change for testing the mtr test: patch $ git diff dgcov.pl ../sql diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl index 585586f9506..0bc1635a989 100755 --- a/mysql-test/dgcov.pl +++ b/mysql-test/dgcov.pl @@ -155,15 +155,17 @@ END sub gcov_one_file { return unless /\.gcda$/; unless ($opt_skip_gcov) { - $cmd= "gcov -i '$_' 2>/dev/null >/dev/null"; + $cmd= "gcov -il '$_' 2>/dev/null >/dev/null"; print STDERR ++$file_no,"\r" if not $opt_verbose and -t STDERR; logv "Running: $cmd"; system($cmd)==0 or die "system($cmd): $? $!"; } # now, read the generated file - return unless(-f "$`.gcov"); - open FH, '<', "$`.gcov" or die "open(<$`.gcov): $!"; + #return unless(-f "$`.gcov"); + #open FH, '<', "$`.gcov" or die "open(<$`.gcov): $!"; + for my $gcov_file (<$_*.gcov>) { + open FH, '<', "$gcov_file" or die "open(<$gcov_file): $!"; my $fname; while (<FH>) { chomp; @@ -171,7 +173,8 @@ sub gcov_one_file { next; } if (/^file:/) { - $fname=$root.$'; + #$fname=$root.$'; + $fname=realpath($'); next; } next if /^lcount:\d+,-\d+/; # whatever that means @@ -182,6 +185,7 @@ sub gcov_one_file { $cov{$fname}->{$1}+=$2; } close(FH); + } } sub write_coverage { diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 721bb053343..39f0a12132c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -6601,7 +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables, } #endif Virtual_column_info *check= tables->table->check_constraints[i]; - table->field[0]->store(STRING_WITH_LEN("def"), system_charset_info); + table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info); table->field[3]->store(check->name.str, check->name.length, system_charset_info); /* Make sure the string is empty between each print. */ This is the result: result $ ./mtr --gcov is_check_constraints ... unknown line 'lcount:2218,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 692. unknown line 'lcount:2221,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 693. unknown line 'lcount:2222,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 694. unknown line 'lcount:2225,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 695. unknown line 'lcount:2228,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 696. unknown line 'lcount:2229,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 697. unknown line 'lcount:2232,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 698. unknown line 'lcount:2235,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 699. unknown line 'lcount:2236,0' after running 'gcov -il 'dbug.c.gcda' 2>/dev/null >/dev/null' at ./dgcov.pl line 182, <FH> line 700.   $ cat var/last_changes.dgcov # empty Tested with versions: gcc-g++-gcov version 6 $ gcc --version && g++ --version && gcov --version gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   g++ (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   gcov (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Than changed version to 7.5 via update-alternatives version 7.5 test $ sudo update-alternatives --config gcc && sudo update-alternatives --config g++ && alias gcov="/usr/bin/gcov-7"   $ gcc --version && g++ --version && gcov --version gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   gcov (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ cmake --build . However if I change the line to my patch change of root if (/^file:/) { $fname=$root.$'; # part of my patch + #$fname=realpath($'); Then result is: result-expected $ cat var/last_changes.dgcov ********************* dgcov sql/sql_show.cc ********************* @@ +6601,7 @@ static int get_check_constraints_record(THD *thd, TABLE_LIST *tables, : 6601: } : 6602:#endif : 6603: Virtual_column_info *check= tables->table->check_constraints[i]; 132: 6605: table->field[0]->store(STRING_WITH_LEN("definition"), system_charset_info); : 6606: table->field[3]->store(check->name.str, check->name.length, : 6607: system_charset_info); 5. Tested with --verbose --verbose ending with missing information about the file usage in var/last_changes.dgcov , so still I'm thinking that removing stdout redirection from gcov -i would be good.

            People

              serg Sergei Golubchik
              varun Varun Gupta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.