TFTF: Use CACTUS_ECHO_CMD in direct message tests
There were two very similar tests, that were targeted to the same
purpose. This patch keeps the logic using an echo value, as it was being
used in tests involving SPs.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ib278d28098e60dddf807b267951f7e2b8762e9e3
diff --git a/spm/cactus/cactus_test_cmds.c b/spm/cactus/cactus_test_cmds.c
index 128f4c0..e13e40d 100644
--- a/spm/cactus/cactus_test_cmds.c
+++ b/spm/cactus/cactus_test_cmds.c
@@ -21,12 +21,14 @@
bool cactus_handle_cmd(smc_ret_values *cmd_args, smc_ret_values *ret,
struct mailbox_buffers *mb)
{
+ uint64_t in_cmd;
+
if (cmd_args == NULL || ret == NULL) {
ERROR("Invalid argumentos passed to %s!\n", __func__);
return false;
}
- uint64_t in_cmd = cactus_get_cmd(*cmd_args);
+ in_cmd = cactus_get_cmd(*cmd_args);
for (struct cactus_cmd_handler *it_cmd = cactus_cmd_handler_begin;
it_cmd < cactus_cmd_handler_end;
@@ -37,5 +39,8 @@
}
}
- return false;
+ *ret = cactus_error_resp(ffa_dir_msg_dest(*cmd_args),
+ ffa_dir_msg_source(*cmd_args),
+ CACTUS_ERROR_UNHANDLED);
+ return true;
}