aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhukar Pappireddy <madhukar.pappireddy@arm.com>2020-07-28 21:14:14 +0000
committerTrustedFirmware Code Review <review@review.trustedfirmware.org>2020-07-28 21:14:14 +0000
commit96ca5b1b4b77a16cc4d39e6afbffc46ff271c378 (patch)
treef543f84ced5126e59c15507f5a5479dcbd6a2a1b
parent6bbe5a6dad046f048b1a0b320aa3d7489a0d378e (diff)
parent9bc1ee80937bd3affc4384f7b6380e3b26b25fb3 (diff)
downloadtf-a-tests-96ca5b1b4b77a16cc4d39e6afbffc46ff271c378.tar.gz
Merge "Update SMCCC_ARCH_SOC_ID test case"HEADmaster
-rw-r--r--tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c b/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c
index b866450..3fa48df 100644
--- a/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c
+++ b/tftf/tests/runtime_services/arm_arch_svc/smccc_arch_soc_id.c
@@ -34,8 +34,6 @@ test_result_t test_smccc_arch_soc_id(void)
smc_args args;
smc_ret_values ret;
int32_t expected_ver;
- int32_t skip_cnt = 0;
- bool fail_soc_id_test = false;
/* Check if SMCCC version is at least v1.2 */
expected_ver = MAKE_SMCCC_VERSION(1, 2);
@@ -55,7 +53,7 @@ test_result_t test_smccc_arch_soc_id(void)
ret = tftf_smc(&args);
if ((int)ret.ret0 == SMC_ARCH_CALL_NOT_SUPPORTED) {
tftf_testcase_printf("SMCCC_ARCH_SOC_ID is not implemented\n");
- return TEST_RESULT_FAIL;
+ return TEST_RESULT_SKIPPED;
}
/* If the call returns SMC_OK then SMCCC_ARCH_SOC_ID is feature available */
@@ -63,31 +61,29 @@ test_result_t test_smccc_arch_soc_id(void)
ret = get_soc_id_param(SMC_GET_SOC_REVISION);
if ((int)ret.ret0 == SMC_ARCH_CALL_INVAL_PARAM) {
- ERROR("Invalid param passed to SMCCC_ARCH_SOC_ID\n");
- fail_soc_id_test = true;
+ tftf_testcase_printf("Invalid param passed to \
+ SMCCC_ARCH_SOC_ID\n");
+ return TEST_RESULT_FAIL;
} else if ((int)ret.ret0 == SMC_ARCH_CALL_NOT_SUPPORTED) {
tftf_testcase_printf("SOC Rev is not implemented\n");
- skip_cnt++;
- } else {
- tftf_testcase_printf("SOC Rev = 0x%x\n", (int)ret.ret0);
+ return TEST_RESULT_FAIL;
}
+ tftf_testcase_printf("SOC Rev = 0x%x\n", (int)ret.ret0);
+
ret = get_soc_id_param(SMC_GET_SOC_VERSION);
if ((int)ret.ret0 == SMC_ARCH_CALL_INVAL_PARAM) {
- ERROR("Invalid param passed to SMCCC_ARCH_SOC_ID\n");
- fail_soc_id_test = true;
+ tftf_testcase_printf("Invalid param passed to \
+ SMCCC_ARCH_SOC_ID\n");
+ return TEST_RESULT_FAIL;
} else if ((int)ret.ret0 == SMC_ARCH_CALL_NOT_SUPPORTED) {
tftf_testcase_printf("SOC Ver is not implemented\n");
- skip_cnt++;
- } else {
- tftf_testcase_printf("SOC Ver = 0x%x\n", (int)ret.ret0);
+ return TEST_RESULT_FAIL;
}
- if (skip_cnt == 2)
- return TEST_RESULT_SKIPPED;
- else if (fail_soc_id_test)
- return TEST_RESULT_FAIL;
+ tftf_testcase_printf("SOC Ver = 0x%x\n", (int)ret.ret0);
+
} else {
ERROR("Invalid error during SMCCC_ARCH_FEATURES call = 0x%x\n",
(int)ret.ret0);