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/md2.c b/library/md2.c
index 8976701..298a994 100644
--- a/library/md2.c
+++ b/library/md2.c
@@ -266,12 +266,12 @@
strlen( md2_test_str[i] ), md2sum );
if( memcmp( md2sum, md2_test_sum[i], 16 ) != 0 )
- {
+ { // LCOV_EXCL_START
if( verbose != 0 )
mbedtls_printf( "failed\n" );
return( 1 );
- }
+ } // LCOV_EXCL_STOP
if( verbose != 0 )
mbedtls_printf( "passed\n" );