diff options
author | Soby Mathew <soby.mathew@arm.com> | 2017-10-18 16:38:45 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2017-11-03 14:08:01 +0000 |
commit | 331796d70bc77e1d34a223b1483bf096e7e9c657 (patch) | |
tree | 3d538c1ff8f154780642f7c632a87408d40cb6ce /tests/runtime_services | |
parent | 8701624266657227c9c7aa0aa189246d755a8ecc (diff) |
Fix SYSTEM_SUSPEND stress test for FVP
Previously the FVP didn't support SYSTEM SUSPEND and the test
relied on PLATFORM_CORE_COUNT macro to make assumptions about the
platform. On FVP, the actual core count maybe different from the
PLATFORM_CORE_COUNT macro and need to be queried from the TFTF
framework. This patch fixes the same for the SYSTEM SUSPEND stress
test.
Change-Id: I70697d7d230f3c31592b69ae447b4c51abe667ad
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'tests/runtime_services')
-rw-r--r-- | tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c b/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c index 4773367..6c7e33a 100644 --- a/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c +++ b/tests/runtime_services/standard_service/psci/system_tests/test_psci_system_suspend_stress.c @@ -188,9 +188,9 @@ static test_result_t do_sys_susp_on_off_stress(void) /* Turn off random number of cores 1 out of 3 times */ if (rand() % 3) - off_cpu_count = rand() % PLATFORM_CORE_COUNT; + off_cpu_count = rand() % participating_cpu_count; else - off_cpu_count = PLATFORM_CORE_COUNT - 1; + off_cpu_count = participating_cpu_count - 1; /* Signal random number of CPUs to turn OFF */ tftf_send_event_to(&sync_event, off_cpu_count); @@ -207,7 +207,7 @@ static test_result_t do_sys_susp_on_off_stress(void) tftf_cancel_timer(); /* Check return value of SYSTEM SUSPEND API */ - if (off_cpu_count == (PLATFORM_CORE_COUNT - 1)) { + if (off_cpu_count == (participating_cpu_count - 1)) { if (psci_ret != PSCI_E_SUCCESS) { tftf_testcase_printf("SYSTEM SUSPEND did not succeed " "where expected\n"); @@ -226,10 +226,10 @@ static test_result_t do_sys_susp_on_off_stress(void) /* Unblock the waiting CPUs */ tftf_send_event_to(&sync_event, - (PLATFORM_CORE_COUNT - 1) - off_cpu_count); + (participating_cpu_count - 1) - off_cpu_count); /* Wait for all CPUs other than current to turn OFF */ - while (get_off_cpu_count() != (PLATFORM_CORE_COUNT - 1)) + while (get_off_cpu_count() != (participating_cpu_count - 1)) ; dec_cpu_count(); |