linux-test-project / lcov

LCOV
GNU General Public License v2.0
894 stars 240 forks source link

2.0 release: Wrong error code used at lcovutil.pm:4222 #259

Closed jeremybettis closed 5 months ago

jeremybettis commented 8 months ago

The code at lcovutil.pm:4222 in the 2.0 release is incorrect. It uses $lcovutil::ERROR_INCONSISTENT which doesn't exist, but it should be $lcovutil::ERROR_INCONSISTENT_DATA.

This was fixed in commit 6f48bf2, which is not included in the 2.0 release.

Can you either apply this patch to the release branch, or create a 2.0.1 release that includes that commit?

--- lcov-2.0/lib/lcovutil.pm
+++ lcov-2.0-fixed/lib/lcovutil.pm
@@ -4219,7 +4219,7 @@
                         } else {
                             if ($f->end_line() != $func->end_line()) {
                                 lcovutil::ignorable_error(
-                                       $lcovutil::ERROR_INCONSISTENT,
+                                       $lcovutil::ERROR_INCONSISTENT_DATA,
                                        '"' . $func->file() .
                                            '":' . $first . ': function \'' .
                                            $func->name() . ' last line is ' .

The error message I saw looked like:

genhtml: ERROR: "/mnt/host/source/src/platform/ec/common/vboot/vb21_lib.c":18: function 'vb21_is_packed_key
_valid last line is 24 but is 25 in testcase 'vboot'
        (use "genhtml --ignore-errors code_ ..." to bypass this error)

And code_ is not a valid error for --ignore-errors.

henry2cox commented 5 months ago

v2.1 release is finally available. Sorry for the long delay. Please give it a shot - and close this issue if it seems OK. Thanks Henry

henry2cox commented 5 months ago

Closing now, as I believe this is fixed in v2.1.

If there is still a problem, please either reopen this issue or file a new one. If possible, please include a testcase which illustrates the bug. Thanks Henry