aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Shvetsov <maksims.svecovs@arm.com>2020-07-01 14:09:48 +0100
committerMax Shvetsov <maksims.svecovs@arm.com>2020-07-27 13:36:01 +0100
commit57c6ddbfddeb0d5ebe27d62b426bb1029fe8d622 (patch)
tree3ca54a71167a91304db18c5ee891ce2f831f03b6
parentc32f47899de53f58b08c549aff396062b256c029 (diff)
downloadtf-a-tests-57c6ddbfddeb0d5ebe27d62b426bb1029fe8d622.tar.gz
Cactus: tidying FFA_VERSION test.
Moving FFA_VERSION test to separate test function. Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: I09f1ca726eddbcaba0416f981eae292ba88c64b4
-rw-r--r--spm/cactus/cactus_ffa_tests.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/spm/cactus/cactus_ffa_tests.c b/spm/cactus/cactus_ffa_tests.c
index 2e6e446..25c20b0 100644
--- a/spm/cactus/cactus_ffa_tests.c
+++ b/spm/cactus/cactus_ffa_tests.c
@@ -142,17 +142,14 @@ static void ffa_partition_info_get_test(struct mailbox_buffers *mb)
announce_test_section_end(test_partition_info);
}
-void ffa_tests(struct mailbox_buffers *mb)
+void ffa_version_test(void)
{
- const char *test_ffa = "FFA Interfaces";
const char *test_ffa_version = "FFA Version interface";
- announce_test_section_start(test_ffa);
-
announce_test_start(test_ffa_version);
smc_ret_values ret = ffa_version(MAKE_FFA_VERSION(FFA_MAJOR, FFA_MINOR));
- uint32_t spm_version = (uint32_t)(0xFFFFFFFF & ret.ret0);
+ uint32_t spm_version = (uint32_t)ret.ret0;
bool ffa_version_compatible =
((spm_version >> FFA_VERSION_MAJOR_SHIFT) == FFA_MAJOR &&
@@ -166,8 +163,16 @@ void ffa_tests(struct mailbox_buffers *mb)
expect((int)ffa_version_compatible, (int)true);
announce_test_end(test_ffa_version);
+}
+
+void ffa_tests(struct mailbox_buffers *mb)
+{
+ const char *test_ffa = "FFA Interfaces";
+
+ announce_test_section_start(test_ffa);
ffa_features_test();
+ ffa_version_test();
ffa_partition_info_get_test(mb);
announce_test_section_end(test_ffa);