@@ -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;
@@ -373,25 +373,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 */
@@ -399,19 +399,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();
@@ -419,7 +419,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();
@@ -427,7 +427,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();
@@ -435,7 +435,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();
@@ -444,7 +444,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();
@@ -453,7 +453,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();
@@ -462,32 +462,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 */
@@ -495,19 +495,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();
@@ -515,7 +515,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();
@@ -523,7 +523,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();
@@ -531,7 +531,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();
@@ -539,7 +539,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();
@@ -547,7 +547,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();
@@ -555,13 +555,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;
@@ -667,7 +667,7 @@ static int create_queues(void)
return 0;
}
-static int scheduler_suite_init(void)
+int scheduler_suite_init(void)
{
odp_shm_t shm;
odp_pool_t pool;
@@ -764,7 +764,7 @@ static int destroy_queues(void)
return 0;
}
-static int scheduler_suite_term(void)
+int scheduler_suite_term(void)
{
odp_pool_t pool;
@@ -780,7 +780,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},
@@ -814,7 +814,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 registery: */
+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(-)