linux-test-project / lcov

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

TOT failing with: undefined error code for 'unexpected non-zero initial branch' #255

Closed Vladyyy closed 9 months ago

Vladyyy commented 9 months ago

Running the following on TOT fails with (this runs fine on lcov2.0.1)

lcov --capture --no-external --directory ~/gcda_gcno_data --base-directory ~/src --output-file /tmp/tmp2ec7df9c --branch-coverage --ignore-errors inconsistent --ignore-errors branch --ignore-errors unused
Capturing coverage data from ~/gcda_gcno_data
geninfo cmd: '~/gcda_gcno_data --output-filename /tmp/tmp2ec7df9c --source-directory ~/src --base-directory ~/src --no-external --branch-coverage'
Found gcov version: 7.3.1
Using intermediate gcov format
Writing temporary data to /tmp/geninfo_datUGz2
Scanning ~/gcda_gcno_data for .gcda files ...
Found 258 data files in ~/gcda_gcno_data
using: chunkSize: 1, nchunks:258, intervalLength:12
geninfo: ERROR: undefined error code for 'unexpected non-zero initial branch'
geninfo: ERROR: undefined error code for 'unexpected non-zero initial branch'
Message summary:
  no messages were reported
henry2cox commented 9 months ago

Bummer - this is a typo near line lcovutil.pm:4028: 'lcuvutil::..' -> 'lcovutil::...' (an 'o' not a 'u'). Fixed in my sandbox.

I suspect that I didn't notice it up to now because we don't use gcc/7 - and there is something funny in its output data. (lcov should handle it - but may not right now). I will push this fix with a couple of others after some testing.

henry2cox commented 9 months ago

I think that this one is fixed - but there may be another error that happens right after. Could you give TOT another try, and report back? (Close if it seems fixed.)

Vladyyy commented 9 months ago

Tested with TOT, I didn't hit the issue