Exclude a few lines from lcov coverage stats:

- "fail" branches in selftests
- "should never happen" errors in SSL
- cipher_xxx() failures in SSL
- some things that fail only if malloc() fails
- some things that fail only if fread/fwrite()/ftell() fails
  (after fopen() succeeded)
- some things that fail only if a parameter is invalid, but the parameter was
  actually validated earlier
- generated code in library/error.c
This commit is contained in:
Manuel Pégourié-Gonnard
2014-04-11 15:31:02 +02:00
committed by Manuel Pégourié-Gonnard
parent 021c8d61f2
commit a0d3a26dbd
43 changed files with 307 additions and 287 deletions

View File

@@ -62,7 +62,9 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
// High level error codes
//
// BEGIN generated code
// LCOV_EXCL_START
HIGH_LEVEL_CODE_CHECKS
// LCOV_EXCL_STOP
// END generated code
if( strlen( buf ) == 0 )
@@ -93,7 +95,9 @@ HIGH_LEVEL_CODE_CHECKS
// Low level error codes
//
// BEGIN generated code
// LCOV_EXCL_START
LOW_LEVEL_CODE_CHECKS
// LCOV_EXCL_STOP
// END generated code
if( strlen( buf ) != 0 )