mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 02:05:39 +01:00
Merge pull request #3625 from gilles-peskine-arm/test-fail-report-first
Report the first unit test failure, not the last one
This commit is contained in:
commit
853f9bd65e
@ -407,6 +407,12 @@ void test_set_step( unsigned long step )
|
|||||||
|
|
||||||
void test_fail( const char *test, int line_no, const char* filename )
|
void test_fail( const char *test, int line_no, const char* filename )
|
||||||
{
|
{
|
||||||
|
if( test_info.result == TEST_RESULT_FAILED )
|
||||||
|
{
|
||||||
|
/* We've already recorded the test as having failed. Don't
|
||||||
|
* overwrite any previous information about the failure. */
|
||||||
|
return;
|
||||||
|
}
|
||||||
test_info.result = TEST_RESULT_FAILED;
|
test_info.result = TEST_RESULT_FAILED;
|
||||||
test_info.test = test;
|
test_info.test = test;
|
||||||
test_info.line_no = line_no;
|
test_info.line_no = line_no;
|
||||||
|
@ -596,7 +596,7 @@ void mbedtls_mpi_lt_mpi_ct( int size_X, char * input_X,
|
|||||||
int size_Y, char * input_Y,
|
int size_Y, char * input_Y,
|
||||||
int input_ret, int input_err )
|
int input_ret, int input_err )
|
||||||
{
|
{
|
||||||
unsigned ret;
|
unsigned ret = -1;
|
||||||
unsigned input_uret = input_ret;
|
unsigned input_uret = input_ret;
|
||||||
mbedtls_mpi X, Y;
|
mbedtls_mpi X, Y;
|
||||||
mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y );
|
mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y );
|
||||||
|
Loading…
Reference in New Issue
Block a user