Why does kcov calculate incorrect code coverage statistics for Rust programs?

后端 未结 2 1937
名媛妹妹
名媛妹妹 2020-12-17 17:34

I\'ve tried to use kcov to get code coverage for a Rust library. I\'ve followed this tutorial to build and use kcov. The coverage seems to work, however I\'m facing a strang

2条回答
  •  别那么骄傲
    2020-12-17 18:10

    You're correct: totally unused functions are stripped at the moment, so coverage tools like kcov are only good for branch coverage within used functions (at least, the summary functionality of such tools). There is some discussion about making this not happen by default for test/debug builds.

提交回复
热议问题