From 693bf312d94ad2ea364cd3902e9d944091b1c5be Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Fri, 23 Jul 2021 17:40:41 +0100 Subject: [PATCH] Fix _arg argument not being cast to correct type Also change to TEST_EQUAL, as this is now possible. Signed-off-by: Paul Elliott --- tests/suites/test_suite_psa_crypto.function | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index 0d9543d7b..5e4eaf85f 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -3685,6 +3685,7 @@ void aead_multipart_generate_nonce( int key_type_arg, data_t *key_data, uint8_t nonce_buffer[PSA_AEAD_NONCE_MAX_SIZE]; psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; psa_status_t status = PSA_ERROR_GENERIC_ERROR; + psa_status_t expected_status = expected_status_arg; size_t nonce_generated_len = 0; size_t expected_generated_len = expected_generated_len_arg; unsigned char *output_data = NULL; @@ -3735,13 +3736,13 @@ void aead_multipart_generate_nonce( int key_type_arg, data_t *key_data, nonce_len, &nonce_generated_len ); - TEST_ASSERT( status == expected_status_arg ); + TEST_EQUAL( status, expected_status ); TEST_EQUAL( nonce_generated_len, expected_generated_len ); TEST_ASSERT( nonce_generated_len < PSA_AEAD_NONCE_MAX_SIZE ); - if( expected_status_arg == PSA_SUCCESS ) + if( expected_status == PSA_SUCCESS ) { /* Ensure we can still complete operation. */ @@ -3837,7 +3838,7 @@ void aead_multipart_set_nonce( int key_type_arg, data_t *key_data, status = psa_aead_set_nonce( &operation, nonce_buffer, nonce_len ); - TEST_ASSERT( status == expected_status ); + TEST_EQUAL( status, expected_status ); if( expected_status == PSA_SUCCESS ) {