Remove now-redundant test result check
Since 349eadc58f
, test_fail() reports
the first failure. So it's safe to call test_fail() again to report a
cleanup failure when we don't want to potentially erase information
about an earlier failure.
The behavior of mbedtls_test_helper_is_psa_pristine() changes if
test_info.result was neither TEST_RESULT_SUCCESS nor
TEST_RESULT_FAILED, but this should not matter since a skipped test
should not cause mbedtls_test_helper_is_psa_pristine() to fail.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
ddfd080128
commit
86cadb37d1
1 changed files with 1 additions and 4 deletions
|
@ -46,10 +46,7 @@ static int mbedtls_test_helper_is_psa_pristine( int line, const char *file )
|
|||
msg = "Some slots are still marked as locked.";
|
||||
}
|
||||
|
||||
/* If the test has already failed, don't overwrite the failure
|
||||
* information. Do keep the stats lookup above, because it can be
|
||||
* convenient to break on it when debugging a failure. */
|
||||
if( msg != NULL && test_info.result == TEST_RESULT_SUCCESS )
|
||||
if( msg != NULL )
|
||||
test_fail( msg, line, file );
|
||||
|
||||
return( msg == NULL );
|
||||
|
|
Loading…
Reference in a new issue