0

I found my coverage report generated by the lcov is not correct. I'm sure some code lines be tested according to the log I print out. But the coverage report shows it did not.

The code is written in C language. The compile flags is '-g -O0 -fprofile-arcs -ftest-coverage". I wonder if someone encountered the same problem and know how to fix it.

Thanks in advance.

Shuduo
  • 727
  • 5
  • 14

1 Answers1

0

I solved the problem finally. Since my program will be intentionally terminated by sending signal. The gcov need flush before the program exit. Now the result is correct.

Shuduo
  • 727
  • 5
  • 14