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
diff --git a/library/camellia.c b/library/camellia.c
index e015ca2..226c7b1 100644
--- a/library/camellia.c
+++ b/library/camellia.c
@@ -935,12 +935,12 @@
mbedtls_camellia_crypt_ecb( &ctx, v, src, buf );
if( memcmp( buf, dst, 16 ) != 0 )
- {
+ { // LCOV_EXCL_START
if( verbose != 0 )
mbedtls_printf( "failed\n" );
return( 1 );
- }
+ } // LCOV_EXCL_STOP
}
if( verbose != 0 )
@@ -988,12 +988,12 @@
mbedtls_camellia_crypt_cbc( &ctx, v, 16, iv, src, buf );
if( memcmp( buf, dst, 16 ) != 0 )
- {
+ { // LCOV_EXCL_START
if( verbose != 0 )
mbedtls_printf( "failed\n" );
return( 1 );
- }
+ } // LCOV_EXCL_STOP
}
if( verbose != 0 )
@@ -1032,12 +1032,12 @@
buf, buf );
if( memcmp( buf, camellia_test_ctr_pt[u], len ) != 0 )
- {
+ { // LCOV_EXCL_START
if( verbose != 0 )
mbedtls_printf( "failed\n" );
return( 1 );
- }
+ } // LCOV_EXCL_STOP
}
else
{
@@ -1048,12 +1048,12 @@
buf, buf );
if( memcmp( buf, camellia_test_ctr_ct[u], len ) != 0 )
- {
+ { // LCOV_EXCL_START
if( verbose != 0 )
mbedtls_printf( "failed\n" );
return( 1 );
- }
+ } // LCOV_EXCL_STOP
}
if( verbose != 0 )