aboutsummaryrefslogtreecommitdiff
path: root/tftf/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tftf/tests')
-rw-r--r--tftf/tests/runtime_services/secure_service/ffa_helpers.c6
-rw-r--r--tftf/tests/runtime_services/secure_service/test_ffa_direct_messaging.c18
-rw-r--r--tftf/tests/runtime_services/secure_service/test_ffa_features.c16
-rw-r--r--tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c11
-rw-r--r--tftf/tests/runtime_services/secure_service/test_ffa_rxtx_map.c4
-rw-r--r--tftf/tests/runtime_services/secure_service/test_spm_cpu_features.c5
6 files changed, 31 insertions, 29 deletions
diff --git a/tftf/tests/runtime_services/secure_service/ffa_helpers.c b/tftf/tests/runtime_services/secure_service/ffa_helpers.c
index 7d94d2782..923ee2c94 100644
--- a/tftf/tests/runtime_services/secure_service/ffa_helpers.c
+++ b/tftf/tests/runtime_services/secure_service/ffa_helpers.c
@@ -304,9 +304,9 @@ ffa_memory_handle_t ffa_memory_send(
return FFA_MEMORY_HANDLE_INVALID;
}
- if (ret.ret0 != FFA_SUCCESS_SMC32) {
- ERROR("Failed to send memory to %x, error: %lx.\n",
- receiver, ret.ret2);
+ if (ffa_func_id(ret) != FFA_SUCCESS_SMC32) {
+ ERROR("Failed to send memory to %x, error: %x.\n",
+ receiver, ffa_error_code(ret));
return FFA_MEMORY_HANDLE_INVALID;
}
diff --git a/tftf/tests/runtime_services/secure_service/test_ffa_direct_messaging.c b/tftf/tests/runtime_services/secure_service/test_ffa_direct_messaging.c
index 3bdacda96..12954426d 100644
--- a/tftf/tests/runtime_services/secure_service/test_ffa_direct_messaging.c
+++ b/tftf/tests/runtime_services/secure_service/test_ffa_direct_messaging.c
@@ -38,9 +38,9 @@ static test_result_t send_receive_direct_msg(unsigned int sp_id,
* Return responses may be FFA_MSG_SEND_DIRECT_RESP or FFA_INTERRUPT,
* but only expect the former. Expect SMC32 convention from SP.
*/
- if (ret_values.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
- tftf_testcase_printf("ffa_msg_send_direct_req returned %lx\n",
- (u_register_t)ret_values.ret0);
+ if (ffa_func_id(ret_values) != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
+ tftf_testcase_printf("ffa_msg_send_direct_req returned %x\n",
+ ffa_func_id(ret_values));
return TEST_RESULT_FAIL;
}
@@ -105,9 +105,9 @@ static test_result_t send_cactus_req_echo_cmd(ffa_vm_id_t sender,
ret = cactus_req_echo_send_cmd(sender, dest, echo_dest, value);
- if (ret.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
- ERROR("Failed to send message. error: %lx\n",
- ret.ret2);
+ if (ffa_func_id(ret) != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
+ ERROR("Failed to send message. error: %x\n",
+ ffa_error_code(ret));
return TEST_RESULT_FAIL;
}
@@ -157,9 +157,9 @@ test_result_t test_ffa_sp_to_sp_deadlock(void)
ret = cactus_req_deadlock_send_cmd(HYP_ID, SP_ID(1), SP_ID(2), SP_ID(3));
- if (ret.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
- ERROR("Failed to send message. error: %lx\n",
- ret.ret2);
+ if (ffa_func_id(ret) != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
+ ERROR("Failed to send message. error: %x\n",
+ ffa_error_code(ret));
return TEST_RESULT_FAIL;
}
diff --git a/tftf/tests/runtime_services/secure_service/test_ffa_features.c b/tftf/tests/runtime_services/secure_service/test_ffa_features.c
index beee5d234..e4cd845fd 100644
--- a/tftf/tests/runtime_services/secure_service/test_ffa_features.c
+++ b/tftf/tests/runtime_services/secure_service/test_ffa_features.c
@@ -25,20 +25,20 @@ test_result_t test_ffa_features(void)
for (i = 0U; i < test_target_size; i++) {
ffa_ret = ffa_features(ffa_feature_test_target[i].feature);
- if (ffa_ret.ret0 != ffa_feature_test_target[i].expected_ret) {
- tftf_testcase_printf("%s returned %lx, expected %x\n",
+ if (ffa_func_id(ffa_ret) != ffa_feature_test_target[i].expected_ret) {
+ tftf_testcase_printf("%s returned %x, expected %x\n",
ffa_feature_test_target[i].test_name,
- ffa_ret.ret0,
+ ffa_func_id(ffa_ret),
ffa_feature_test_target[i].expected_ret);
return TEST_RESULT_FAIL;
}
- if ((ffa_feature_test_target[i].expected_ret == (u_register_t)FFA_ERROR) &&
- (ffa_ret.ret2 != (u_register_t)FFA_ERROR_NOT_SUPPORTED)) {
+ if ((ffa_feature_test_target[i].expected_ret == FFA_ERROR) &&
+ (ffa_error_code(ffa_ret) != FFA_ERROR_NOT_SUPPORTED)) {
tftf_testcase_printf("%s failed for the wrong reason: "
- "returned %lx, expected %lx\n",
+ "returned %x, expected %x\n",
ffa_feature_test_target[i].test_name,
- ffa_ret.ret2,
- (u_register_t)FFA_ERROR_NOT_SUPPORTED);
+ ffa_error_code(ffa_ret),
+ FFA_ERROR_NOT_SUPPORTED);
return TEST_RESULT_FAIL;
}
}
diff --git a/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c b/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
index 5b59c439a..05a8b5914 100644
--- a/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
+++ b/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
@@ -79,9 +79,9 @@ static test_result_t test_memory_send_sp(uint32_t mem_func)
ret = cactus_mem_send_cmd(SENDER, RECEIVER, mem_func, handle);
- if (ret.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
- ERROR("Failed to send message. error: %lx\n",
- ret.ret2);
+ if (ffa_func_id(ret) != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
+ ERROR("Failed to send message. error: %x\n",
+ ffa_error_code(ret));
return TEST_RESULT_FAIL;
}
@@ -144,8 +144,9 @@ static test_result_t test_req_mem_send_sp_to_sp(uint32_t mem_func,
ret = cactus_req_mem_send_send_cmd(HYP_ID, sender_sp, mem_func,
receiver_sp);
- if (ret.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
- ERROR("Failed to send message. error: %lx\n", ret.ret2);
+ if (ffa_func_id(ret) != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
+ ERROR("Failed to send message. error: %x\n",
+ ffa_error_code(ret));
return TEST_RESULT_FAIL;
}
diff --git a/tftf/tests/runtime_services/secure_service/test_ffa_rxtx_map.c b/tftf/tests/runtime_services/secure_service/test_ffa_rxtx_map.c
index 1e4c4e069..1b47c5f99 100644
--- a/tftf/tests/runtime_services/secure_service/test_ffa_rxtx_map.c
+++ b/tftf/tests/runtime_services/secure_service/test_ffa_rxtx_map.c
@@ -33,8 +33,8 @@ static test_result_t test_ffa_rxtx_map(uint32_t expected_return)
* FFA_RXTX_MAP.
*/
CONFIGURE_AND_MAP_MAILBOX(mb, PAGE_SIZE, ret);
- if (ret.ret0 != expected_return) {
- ERROR("Failed to map RXTX buffers %lx!\n", ret.ret2);
+ if (ffa_func_id(ret) != expected_return) {
+ ERROR("Failed to map RXTX buffers %x!\n", ffa_error_code(ret));
return TEST_RESULT_FAIL;
}
diff --git a/tftf/tests/runtime_services/secure_service/test_spm_cpu_features.c b/tftf/tests/runtime_services/secure_service/test_spm_cpu_features.c
index 3b3edba83..c6470c14a 100644
--- a/tftf/tests/runtime_services/secure_service/test_spm_cpu_features.c
+++ b/tftf/tests/runtime_services/secure_service/test_spm_cpu_features.c
@@ -55,8 +55,9 @@ test_result_t test_simd_vectors_preserved(void)
smc_ret_values ret = cactus_req_simd_fill_send_cmd(SENDER, RECEIVER);
- if (ret.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
- ERROR("Failed to send message. error: %lx\n", ret.ret2);
+ if (ffa_func_id(ret) != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
+ ERROR("Failed to send message. error: %x\n",
+ ffa_error_code(ret));
return TEST_RESULT_FAIL;
}