linux-test-project / lcov

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

Option geninfo_external from a user-provided lcovrc file gets ignored #307

Closed cesaro closed 4 months ago

cesaro commented 5 months ago

If I read correctly the lcovrc(5) man page, doing this:

echo 'geninfo_external = 0' > rc
lcov -c -i -d path/to/src --config-file rc -o zero.info

and doing this:

lcov -c -i -d path/to/src --no-external -o zero.info

should produce exactly the same results, namely, generating a trace in zero.info that exclusively describes the coverpoints of C++ files recursively found in path/to/src.

However, only the second case (with --no-external) does what it promises. The first case (with --config-file rc) outputs a zero.info file such that lcov -l zero.info prints files outside path/to/src. What's more, in the first case, having an rc file with

produces exactly the same results.

Version info: lcov v2.1, running on Red Hat Enterprise Linux 8.4, while analyzing .gcno files generated by gcc 9.3.0.

If you have trouble to reproduce, please ping me and I will provide detailed instructions.

henry2cox commented 5 months ago

Better to provide complete testcase - saves effort to reproduce. Even better to create complete testcase in style of lcov regression suite, and corresponding PR.

lozanopo commented 4 months ago

JuanlozanošŸ˜

henry2cox commented 4 months ago

Not sure what to make of the attachments form @lozanopo. Seems unrelated to lcov generally, and specifically unrelated to this issue.

(Issue is fixed the the commit mentioned above, BTW.)

oberpar commented 4 months ago

Not sure what to make of the attachments form @lozanopo. Seems unrelated to lcov generally, and specifically unrelated to this issue.

Could be spam or malware related, so to stay on the safe side I deleted the comment from this issue.