aboutsummaryrefslogtreecommitdiff
path: root/tftf
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-10-10 13:14:04 +0100
committerDimitris Papastamos <dimitris.papastamos@arm.com>2018-10-11 16:01:47 +0100
commit2bfcf9ef94656ad4ceb5b58b9f0be7aae4f1b589 (patch)
treea8a1eb9a4b5b2372d1daf061d900de7a8766461a /tftf
parent3cd87d77947ec4fc04440268ed122b4ed81c7781 (diff)
downloadtf-a-tests-2bfcf9ef94656ad4ceb5b58b9f0be7aae4f1b589.tar.gz
rt_instr: Pass the parent function name all the way down to the output message
As we are using common functions for performing the various test-cases, we cannot use __func__ directly in those functions. To differentiate the test-cases in the final output, we need the name of test to be passed all the way down to the output function. Change-Id: Ia0c3dabeddf2e25b4aa395103c5261575ad6cac6 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
Diffstat (limited to 'tftf')
-rw-r--r--tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c b/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
index 46b5a920d..feff3a905 100644
--- a/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
+++ b/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
@@ -122,7 +122,7 @@ static test_result_t get_ts(void)
}
/* Dump suspend statistics for the suspend/cpu off test. */
-static int dump_suspend_stats(const char *msg)
+static int dump_suspend_stats(const char *func_name)
{
u_register_t *ts;
u_register_t target_mpid;
@@ -159,7 +159,8 @@ static int dump_suspend_stats(const char *msg)
return TEST_RESULT_FAIL;
}
- printf("<RT_INSTR:%s\t%d\t%02llu\t%02llu\t%02llu/>\n", msg, pos,
+ printf("<RT_INSTR:%s\t%d\t%02llu\t%02llu\t%02llu/>\n",
+ func_name, pos,
(unsigned long long)period[0],
(unsigned long long)period[1],
(unsigned long long)period[2]);
@@ -169,7 +170,7 @@ static int dump_suspend_stats(const char *msg)
}
/* Dump statistics for a PSCI version call. */
-static int dump_psci_version_stats(const char *msg)
+static int dump_psci_version_stats(const char *func_name)
{
u_register_t *ts;
u_register_t target_mpid;
@@ -192,7 +193,7 @@ static int dump_psci_version_stats(const char *msg)
return TEST_RESULT_FAIL;
}
- printf("<RT_INSTR:%s\t%d\t%02llu/>\n", msg, pos,
+ printf("<RT_INSTR:%s\t%d\t%02llu/>\n", func_name, pos,
(unsigned long long)period);
}
@@ -301,7 +302,7 @@ static int is_rt_instr_supported(void)
* Then a suspend to the deepest power level supported on the
* platform is initiated on all cores in parallel.
*/
-static test_result_t test_rt_instr_susp_parallel(void)
+static test_result_t test_rt_instr_susp_parallel(const char *func_name)
{
u_register_t lead_mpid, target_mpid;
int cpu_node, ret;
@@ -345,7 +346,7 @@ static test_result_t test_rt_instr_susp_parallel(void)
cpu_count--;
assert(cpu_count == 0);
- return dump_suspend_stats(__func__);
+ return dump_suspend_stats(func_name);
}
/*
@@ -356,7 +357,7 @@ static test_result_t test_rt_instr_susp_parallel(void)
* powers off because it will be the only core active in the cluster.
* The lead core will also be suspended in a similar fashion.
*/
-static test_result_t test_rt_instr_susp_serial(void)
+static test_result_t test_rt_instr_susp_serial(const char *func_name)
{
u_register_t lead_mpid, target_mpid;
int cpu_node, ret;
@@ -396,7 +397,7 @@ static test_result_t test_rt_instr_susp_serial(void)
cpu_count--;
assert(cpu_count == 0);
- return dump_suspend_stats(__func__);
+ return dump_suspend_stats(func_name);
}
/*
@@ -408,7 +409,12 @@ static test_result_t test_rt_instr_susp_serial(void)
test_result_t test_rt_instr_susp_deep_parallel(void)
{
target_pwrlvl = PLAT_MAX_PWR_LEVEL;
- return test_rt_instr_susp_parallel();
+ /*
+ * The test name needs to be passed all the way down to
+ * the output functions to differentiate the results.
+ * Ditto, for all cases below.
+ */
+ return test_rt_instr_susp_parallel(__func__);
}
/*
@@ -421,7 +427,7 @@ test_result_t test_rt_instr_susp_deep_parallel(void)
test_result_t test_rt_instr_cpu_susp_parallel(void)
{
target_pwrlvl = 0;
- return test_rt_instr_susp_parallel();
+ return test_rt_instr_susp_parallel(__func__);
}
/*
@@ -433,7 +439,7 @@ test_result_t test_rt_instr_cpu_susp_parallel(void)
test_result_t test_rt_instr_susp_deep_serial(void)
{
target_pwrlvl = PLAT_MAX_PWR_LEVEL;
- return test_rt_instr_susp_serial();
+ return test_rt_instr_susp_serial(__func__);
}
/*
@@ -445,7 +451,7 @@ test_result_t test_rt_instr_susp_deep_serial(void)
test_result_t test_rt_instr_cpu_susp_serial(void)
{
target_pwrlvl = 0;
- return test_rt_instr_susp_serial();
+ return test_rt_instr_susp_serial(__func__);
}
/*