From 849b05afb805d84cf986f206e6a0a0fe0cf02a0d Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Fri, 9 Aug 2019 10:22:32 +0100 Subject: [PATCH] Fix PSA tests The test framework has changed, but it did not cause any merge conflicts. Still it affected new code in the tests. --- tests/psa_crypto_helpers.h | 2 +- tests/suites/target_test.function | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/psa_crypto_helpers.h b/tests/psa_crypto_helpers.h index 26d562344..3780d161a 100644 --- a/tests/psa_crypto_helpers.h +++ b/tests/psa_crypto_helpers.h @@ -45,7 +45,7 @@ static int test_helper_is_psa_pristine( int line, const char *file ) /* 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.failed == 0 ) + if( msg != NULL && test_info.result == TEST_RESULT_SUCCESS ) test_fail( msg, line, file ); return( msg == NULL ); diff --git a/tests/suites/target_test.function b/tests/suites/target_test.function index d430d9d5d..91f719873 100644 --- a/tests/suites/target_test.function +++ b/tests/suites/target_test.function @@ -374,7 +374,7 @@ int execute_tests( int args, const char ** argv ) while ( 1 ) { ret = 0; - test_info.failed = 0; + test_info.result = TEST_RESULT_SUCCESS; data_len = 0; data = receive_data( &data_len ); @@ -432,7 +432,7 @@ int execute_tests( int args, const char ** argv ) if ( ret ) send_failure( ret ); else - send_status( test_info.failed ); + send_status( test_info.result ); } return( 0 ); }