@@ -78,7 +78,7 @@ static int exit_schedule_loop(void)
return ret;
}
-static void scheduler_test_wait_time(void)
+void scheduler_test_wait_time(void)
{
uint64_t wait_time;
@@ -91,7 +91,7 @@ static void scheduler_test_wait_time(void)
CU_ASSERT(wait_time > 0);
}
-static void scheduler_test_num_prio(void)
+void scheduler_test_num_prio(void)
{
int prio;
@@ -101,7 +101,7 @@ static void scheduler_test_num_prio(void)
CU_ASSERT(prio == odp_schedule_num_prio());
}
-static void scheduler_test_queue_destroy(void)
+void scheduler_test_queue_destroy(void)
{
odp_pool_t p;
odp_pool_param_t params;
@@ -371,25 +371,25 @@ static void parallel_execute(odp_schedule_sync_t sync, int num_queues,
}
/* 1 queue 1 thread ODP_SCHED_SYNC_NONE */
-static void scheduler_test_1q_1t_n(void)
+void scheduler_test_1q_1t_n(void)
{
schedule_common(ODP_SCHED_SYNC_NONE, ONE_Q, ONE_PRIO, SCHD_ONE);
}
/* 1 queue 1 thread ODP_SCHED_SYNC_ATOMIC */
-static void scheduler_test_1q_1t_a(void)
+void scheduler_test_1q_1t_a(void)
{
schedule_common(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_ONE);
}
/* 1 queue 1 thread ODP_SCHED_SYNC_ORDERED */
-static void scheduler_test_1q_1t_o(void)
+void scheduler_test_1q_1t_o(void)
{
schedule_common(ODP_SCHED_SYNC_ORDERED, ONE_Q, ONE_PRIO, SCHD_ONE);
}
/* Many queues 1 thread ODP_SCHED_SYNC_NONE */
-static void scheduler_test_mq_1t_n(void)
+void scheduler_test_mq_1t_n(void)
{
/* Only one priority involved in these tests, but use
the same number of queues the more general case uses */
@@ -397,19 +397,19 @@ static void scheduler_test_mq_1t_n(void)
}
/* Many queues 1 thread ODP_SCHED_SYNC_ATOMIC */
-static void scheduler_test_mq_1t_a(void)
+void scheduler_test_mq_1t_a(void)
{
schedule_common(ODP_SCHED_SYNC_ATOMIC, MANY_QS, ONE_PRIO, SCHD_ONE);
}
/* Many queues 1 thread ODP_SCHED_SYNC_ORDERED */
-static void scheduler_test_mq_1t_o(void)
+void scheduler_test_mq_1t_o(void)
{
schedule_common(ODP_SCHED_SYNC_ORDERED, MANY_QS, ONE_PRIO, SCHD_ONE);
}
/* Many queues 1 thread check priority ODP_SCHED_SYNC_NONE */
-static void scheduler_test_mq_1t_prio_n(void)
+void scheduler_test_mq_1t_prio_n(void)
{
int prio = odp_schedule_num_prio();
@@ -417,7 +417,7 @@ static void scheduler_test_mq_1t_prio_n(void)
}
/* Many queues 1 thread check priority ODP_SCHED_SYNC_ATOMIC */
-static void scheduler_test_mq_1t_prio_a(void)
+void scheduler_test_mq_1t_prio_a(void)
{
int prio = odp_schedule_num_prio();
@@ -425,7 +425,7 @@ static void scheduler_test_mq_1t_prio_a(void)
}
/* Many queues 1 thread check priority ODP_SCHED_SYNC_ORDERED */
-static void scheduler_test_mq_1t_prio_o(void)
+void scheduler_test_mq_1t_prio_o(void)
{
int prio = odp_schedule_num_prio();
@@ -433,7 +433,7 @@ static void scheduler_test_mq_1t_prio_o(void)
}
/* Many queues many threads check priority ODP_SCHED_SYNC_NONE */
-static void scheduler_test_mq_mt_prio_n(void)
+void scheduler_test_mq_mt_prio_n(void)
{
int prio = odp_schedule_num_prio();
@@ -442,7 +442,7 @@ static void scheduler_test_mq_mt_prio_n(void)
}
/* Many queues many threads check priority ODP_SCHED_SYNC_ATOMIC */
-static void scheduler_test_mq_mt_prio_a(void)
+void scheduler_test_mq_mt_prio_a(void)
{
int prio = odp_schedule_num_prio();
@@ -451,7 +451,7 @@ static void scheduler_test_mq_mt_prio_a(void)
}
/* Many queues many threads check priority ODP_SCHED_SYNC_ORDERED */
-static void scheduler_test_mq_mt_prio_o(void)
+void scheduler_test_mq_mt_prio_o(void)
{
int prio = odp_schedule_num_prio();
@@ -460,32 +460,32 @@ static void scheduler_test_mq_mt_prio_o(void)
}
/* 1 queue many threads check exclusive access on ATOMIC queues */
-static void scheduler_test_1q_mt_a_excl(void)
+void scheduler_test_1q_mt_a_excl(void)
{
parallel_execute(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_ONE,
ENABLE_EXCL_ATOMIC);
}
/* 1 queue 1 thread ODP_SCHED_SYNC_NONE multi */
-static void scheduler_test_multi_1q_1t_n(void)
+void scheduler_test_multi_1q_1t_n(void)
{
schedule_common(ODP_SCHED_SYNC_NONE, ONE_Q, ONE_PRIO, SCHD_MULTI);
}
/* 1 queue 1 thread ODP_SCHED_SYNC_ATOMIC multi */
-static void scheduler_test_multi_1q_1t_a(void)
+void scheduler_test_multi_1q_1t_a(void)
{
schedule_common(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_MULTI);
}
/* 1 queue 1 thread ODP_SCHED_SYNC_ORDERED multi */
-static void scheduler_test_multi_1q_1t_o(void)
+void scheduler_test_multi_1q_1t_o(void)
{
schedule_common(ODP_SCHED_SYNC_ORDERED, ONE_Q, ONE_PRIO, SCHD_MULTI);
}
/* Many queues 1 thread ODP_SCHED_SYNC_NONE multi */
-static void scheduler_test_multi_mq_1t_n(void)
+void scheduler_test_multi_mq_1t_n(void)
{
/* Only one priority involved in these tests, but use
the same number of queues the more general case uses */
@@ -493,19 +493,19 @@ static void scheduler_test_multi_mq_1t_n(void)
}
/* Many queues 1 thread ODP_SCHED_SYNC_ATOMIC multi */
-static void scheduler_test_multi_mq_1t_a(void)
+void scheduler_test_multi_mq_1t_a(void)
{
schedule_common(ODP_SCHED_SYNC_ATOMIC, MANY_QS, ONE_PRIO, SCHD_MULTI);
}
/* Many queues 1 thread ODP_SCHED_SYNC_ORDERED multi */
-static void scheduler_test_multi_mq_1t_o(void)
+void scheduler_test_multi_mq_1t_o(void)
{
schedule_common(ODP_SCHED_SYNC_ORDERED, MANY_QS, ONE_PRIO, SCHD_MULTI);
}
/* Many queues 1 thread check priority ODP_SCHED_SYNC_NONE multi */
-static void scheduler_test_multi_mq_1t_prio_n(void)
+void scheduler_test_multi_mq_1t_prio_n(void)
{
int prio = odp_schedule_num_prio();
@@ -513,7 +513,7 @@ static void scheduler_test_multi_mq_1t_prio_n(void)
}
/* Many queues 1 thread check priority ODP_SCHED_SYNC_ATOMIC multi */
-static void scheduler_test_multi_mq_1t_prio_a(void)
+void scheduler_test_multi_mq_1t_prio_a(void)
{
int prio = odp_schedule_num_prio();
@@ -521,7 +521,7 @@ static void scheduler_test_multi_mq_1t_prio_a(void)
}
/* Many queues 1 thread check priority ODP_SCHED_SYNC_ORDERED multi */
-static void scheduler_test_multi_mq_1t_prio_o(void)
+void scheduler_test_multi_mq_1t_prio_o(void)
{
int prio = odp_schedule_num_prio();
@@ -529,7 +529,7 @@ static void scheduler_test_multi_mq_1t_prio_o(void)
}
/* Many queues many threads check priority ODP_SCHED_SYNC_NONE multi */
-static void scheduler_test_multi_mq_mt_prio_n(void)
+void scheduler_test_multi_mq_mt_prio_n(void)
{
int prio = odp_schedule_num_prio();
@@ -537,7 +537,7 @@ static void scheduler_test_multi_mq_mt_prio_n(void)
}
/* Many queues many threads check priority ODP_SCHED_SYNC_ATOMIC multi */
-static void scheduler_test_multi_mq_mt_prio_a(void)
+void scheduler_test_multi_mq_mt_prio_a(void)
{
int prio = odp_schedule_num_prio();
@@ -545,7 +545,7 @@ static void scheduler_test_multi_mq_mt_prio_a(void)
}
/* Many queues many threads check priority ODP_SCHED_SYNC_ORDERED multi */
-static void scheduler_test_multi_mq_mt_prio_o(void)
+void scheduler_test_multi_mq_mt_prio_o(void)
{
int prio = odp_schedule_num_prio();
@@ -553,13 +553,13 @@ static void scheduler_test_multi_mq_mt_prio_o(void)
}
/* 1 queue many threads check exclusive access on ATOMIC queues multi */
-static void scheduler_test_multi_1q_mt_a_excl(void)
+void scheduler_test_multi_1q_mt_a_excl(void)
{
parallel_execute(ODP_SCHED_SYNC_ATOMIC, ONE_Q, ONE_PRIO, SCHD_MULTI,
ENABLE_EXCL_ATOMIC);
}
-static void scheduler_test_pause_resume(void)
+void scheduler_test_pause_resume(void)
{
odp_queue_t queue;
odp_buffer_t buf;
@@ -665,7 +665,7 @@ static int create_queues(void)
return 0;
}
-static int scheduler_suite_init(void)
+int scheduler_suite_init(void)
{
odp_cpumask_t mask;
odp_shm_t shm;
@@ -763,7 +763,7 @@ static int destroy_queues(void)
return 0;
}
-static int scheduler_suite_term(void)
+int scheduler_suite_term(void)
{
odp_pool_t pool;
@@ -779,7 +779,7 @@ static int scheduler_suite_term(void)
return 0;
}
-static struct CU_TestInfo scheduler_suite[] = {
+CU_TestInfo scheduler_suite[] = {
{"schedule_wait_time", scheduler_test_wait_time},
{"schedule_num_prio", scheduler_test_num_prio},
{"schedule_queue_destroy", scheduler_test_queue_destroy},
@@ -813,7 +813,7 @@ static struct CU_TestInfo scheduler_suite[] = {
CU_TEST_INFO_NULL,
};
-static CU_SuiteInfo scheduler_suites[] = {
+CU_SuiteInfo scheduler_suites[] = {
{"Scheduler",
scheduler_suite_init, scheduler_suite_term, NULL, NULL, scheduler_suite
},
@@ -7,6 +7,51 @@
#ifndef _ODP_TEST_SCHEDULER_H_
#define _ODP_TEST_SCHEDULER_H_
+#include <CUnit/Basic.h>
+
+/* test functions: */
+void scheduler_test_wait_time(void);
+void scheduler_test_num_prio(void);
+void scheduler_test_queue_destroy(void);
+void scheduler_test_1q_1t_n(void);
+void scheduler_test_1q_1t_a(void);
+void scheduler_test_1q_1t_o(void);
+void scheduler_test_mq_1t_n(void);
+void scheduler_test_mq_1t_a(void);
+void scheduler_test_mq_1t_o(void);
+void scheduler_test_mq_1t_prio_n(void);
+void scheduler_test_mq_1t_prio_a(void);
+void scheduler_test_mq_1t_prio_o(void);
+void scheduler_test_mq_mt_prio_n(void);
+void scheduler_test_mq_mt_prio_a(void);
+void scheduler_test_mq_mt_prio_o(void);
+void scheduler_test_1q_mt_a_excl(void);
+void scheduler_test_multi_1q_1t_n(void);
+void scheduler_test_multi_1q_1t_a(void);
+void scheduler_test_multi_1q_1t_o(void);
+void scheduler_test_multi_mq_1t_n(void);
+void scheduler_test_multi_mq_1t_a(void);
+void scheduler_test_multi_mq_1t_o(void);
+void scheduler_test_multi_mq_1t_prio_n(void);
+void scheduler_test_multi_mq_1t_prio_a(void);
+void scheduler_test_multi_mq_1t_prio_o(void);
+void scheduler_test_multi_mq_mt_prio_n(void);
+void scheduler_test_multi_mq_mt_prio_a(void);
+void scheduler_test_multi_mq_mt_prio_o(void);
+void scheduler_test_multi_1q_mt_a_excl(void);
+void scheduler_test_pause_resume(void);
+
+/* test arrays: */
+extern CU_TestInfo scheduler_suite[];
+
+/* test array init/term functions: */
+int scheduler_suite_init(void);
+int scheduler_suite_term(void);
+
+/* test registry: */
+extern CU_SuiteInfo scheduler_suites[];
+
+/* main test program: */
int scheduler_main(void);
#endif
test symbols are now exported in the module lib. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- test/validation/scheduler/scheduler.c | 68 +++++++++++++++++------------------ test/validation/scheduler/scheduler.h | 45 +++++++++++++++++++++++ 2 files changed, 79 insertions(+), 34 deletions(-)