diff mbox

[12/17] validation: scheduler: lib populated

Message ID 1436489068-8929-13-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard July 10, 2015, 12:44 a.m. UTC
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(-)
diff mbox

Patch

diff --git a/test/validation/scheduler/scheduler.c b/test/validation/scheduler/scheduler.c
index e03af13..87e88fe 100644
--- a/test/validation/scheduler/scheduler.c
+++ b/test/validation/scheduler/scheduler.c
@@ -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;
@@ -370,25 +370,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 */
@@ -396,19 +396,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();
 
@@ -416,7 +416,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();
 
@@ -424,7 +424,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();
 
@@ -432,7 +432,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();
 
@@ -441,7 +441,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();
 
@@ -450,7 +450,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();
 
@@ -459,32 +459,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 */
@@ -492,19 +492,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();
 
@@ -512,7 +512,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();
 
@@ -520,7 +520,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();
 
@@ -528,7 +528,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();
 
@@ -536,7 +536,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();
 
@@ -544,7 +544,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();
 
@@ -552,13 +552,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;
@@ -663,7 +663,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;
@@ -760,7 +760,7 @@  static int destroy_queues(void)
 	return 0;
 }
 
-static int scheduler_suite_term(void)
+int scheduler_suite_term(void)
 {
 	odp_pool_t pool;
 
@@ -776,7 +776,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},
@@ -810,7 +810,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
 	},
diff --git a/test/validation/scheduler/scheduler.h b/test/validation/scheduler/scheduler.h
index f2d5795..4ccf226 100644
--- a/test/validation/scheduler/scheduler.h
+++ b/test/validation/scheduler/scheduler.h
@@ -4,4 +4,49 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
+#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);