Switch from int to psa_status_t for test args

Remove unnecessary casts as well.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2023-11-03 19:28:08 +00:00
parent ac12d2dc69
commit 8075c7faf7

View File

@ -10375,7 +10375,7 @@ void ecjpake_size_macros()
/* END_CASE */
/* BEGIN_CASE */
void copy_input(int src_len, int dst_len, int exp_ret)
void copy_input(int src_len, int dst_len, psa_status_t exp_ret)
{
uint8_t *src_buffer = NULL;
uint8_t *dst_buffer = NULL;
@ -10391,9 +10391,9 @@ void copy_input(int src_len, int dst_len, int exp_ret)
fill_buffer_pattern(src_buffer, src_len);
ret = psa_crypto_copy_input(src_buffer, src_len, dst_buffer, dst_len);
TEST_EQUAL((int) ret, exp_ret);
TEST_EQUAL(ret, exp_ret);
if (exp_ret == (int) PSA_SUCCESS) {
if (exp_ret == PSA_SUCCESS) {
/* Note: We compare the first src_len bytes of each buffer, as this is what was copied. */
TEST_MEMORY_COMPARE(src_buffer, src_len, dst_buffer, src_len);
}
@ -10405,7 +10405,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void copy_output(int src_len, int dst_len, int exp_ret)
void copy_output(int src_len, int dst_len, psa_status_t exp_ret)
{
uint8_t *src_buffer = NULL;
uint8_t *dst_buffer = NULL;
@ -10421,9 +10421,9 @@ void copy_output(int src_len, int dst_len, int exp_ret)
fill_buffer_pattern(src_buffer, src_len);
ret = psa_crypto_copy_output(src_buffer, src_len, dst_buffer, dst_len);
TEST_EQUAL((int) ret, exp_ret);
TEST_EQUAL(ret, exp_ret);
if (exp_ret == (int) PSA_SUCCESS) {
if (exp_ret == PSA_SUCCESS) {
/* Note: We compare the first src_len bytes of each buffer, as this is what was copied. */
TEST_MEMORY_COMPARE(src_buffer, src_len, dst_buffer, src_len);
}