diff mbox

[PATCHv2,12/20] validation: cpumask: lib populated

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

Commit Message

Christophe Milard July 24, 2015, 11:27 a.m. UTC
test symbols are now exported in the module lib.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/cpumask/cpumask.c | 32 ++++++++++++++++----------------
 test/validation/cpumask/cpumask.h | 25 +++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 16 deletions(-)
diff mbox

Patch

diff --git a/test/validation/cpumask/cpumask.c b/test/validation/cpumask/cpumask.c
index 943a8e0..f117242 100644
--- a/test/validation/cpumask/cpumask.c
+++ b/test/validation/cpumask/cpumask.c
@@ -79,7 +79,7 @@  static unsigned int get_max_number_of_cpus_in_a_mask(void)
 	return odp_cpu_count();
 }
 
-static void cpumask_test_odp_cpumask_to_from_str(void)
+void cpumask_test_odp_cpumask_to_from_str(void)
 {
 	odp_cpumask_t mask;
 	int32_t str_sz;
@@ -151,7 +151,7 @@  static void cpumask_test_odp_cpumask_to_from_str(void)
 	free(buf_in);
 }
 
-static void cpumask_test_odp_cpumask_equal(void)
+void cpumask_test_odp_cpumask_equal(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -182,7 +182,7 @@  static void cpumask_test_odp_cpumask_equal(void)
 	CU_ASSERT_FALSE(odp_cpumask_equal(&mask1, &mask3));
 }
 
-static void cpumask_test_odp_cpumask_zero(void)
+void cpumask_test_odp_cpumask_zero(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -193,7 +193,7 @@  static void cpumask_test_odp_cpumask_zero(void)
 	CU_ASSERT(odp_cpumask_equal(&mask1, &mask2));
 }
 
-static void cpumask_test_odp_cpumask_set(void)
+void cpumask_test_odp_cpumask_set(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -215,7 +215,7 @@  static void cpumask_test_odp_cpumask_set(void)
 	CU_ASSERT(odp_cpumask_equal(&mask1, &mask2));
 }
 
-static void cpumask_test_odp_cpumask_clr(void)
+void cpumask_test_odp_cpumask_clr(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -242,7 +242,7 @@  static void cpumask_test_odp_cpumask_clr(void)
 	CU_ASSERT(odp_cpumask_equal(&mask1, &mask2));
 }
 
-static void cpumask_test_odp_cpumask_isset(void)
+void cpumask_test_odp_cpumask_isset(void)
 {
 	odp_cpumask_t mask1;
 
@@ -262,7 +262,7 @@  static void cpumask_test_odp_cpumask_isset(void)
 	CU_ASSERT_FALSE(odp_cpumask_isset(&mask1, 3));
 }
 
-static void cpumask_test_odp_cpumask_count(void)
+void cpumask_test_odp_cpumask_count(void)
 {
 	odp_cpumask_t mask1;
 
@@ -279,7 +279,7 @@  static void cpumask_test_odp_cpumask_count(void)
 	CU_ASSERT(odp_cpumask_count(&mask1) == 2);
 }
 
-static void cpumask_test_odp_cpumask_and(void)
+void cpumask_test_odp_cpumask_and(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -314,7 +314,7 @@  static void cpumask_test_odp_cpumask_and(void)
 	CU_ASSERT(odp_cpumask_equal(&mask3, &mask4));
 }
 
-static void cpumask_test_odp_cpumask_or(void)
+void cpumask_test_odp_cpumask_or(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -349,7 +349,7 @@  static void cpumask_test_odp_cpumask_or(void)
 	CU_ASSERT(odp_cpumask_equal(&mask3, &mask4));
 }
 
-static void cpumask_test_odp_cpumask_xor(void)
+void cpumask_test_odp_cpumask_xor(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -384,7 +384,7 @@  static void cpumask_test_odp_cpumask_xor(void)
 	CU_ASSERT(odp_cpumask_equal(&mask3, &mask4));
 }
 
-static void cpumask_test_odp_cpumask_copy(void)
+void cpumask_test_odp_cpumask_copy(void)
 {
 	odp_cpumask_t mask1;
 	odp_cpumask_t mask2;
@@ -394,7 +394,7 @@  static void cpumask_test_odp_cpumask_copy(void)
 	CU_ASSERT(odp_cpumask_equal(&mask1, &mask2));
 }
 
-static void cpumask_test_odp_cpumask_first(void)
+void cpumask_test_odp_cpumask_first(void)
 {
 	odp_cpumask_t mask1;
 
@@ -413,7 +413,7 @@  static void cpumask_test_odp_cpumask_first(void)
 	CU_ASSERT(odp_cpumask_first(&mask1) == 1);
 }
 
-static void cpumask_test_odp_cpumask_last(void)
+void cpumask_test_odp_cpumask_last(void)
 {
 	odp_cpumask_t mask1;
 
@@ -432,7 +432,7 @@  static void cpumask_test_odp_cpumask_last(void)
 	CU_ASSERT(odp_cpumask_last(&mask1) == 3);
 }
 
-static void cpumask_test_odp_cpumask_next(void)
+void cpumask_test_odp_cpumask_next(void)
 {
 	unsigned int i;
 	int expected[] = {1, 3, 3, -1};
@@ -456,7 +456,7 @@  static void cpumask_test_odp_cpumask_next(void)
 		CU_ASSERT(odp_cpumask_next(&mask1, i) == expected[i]);
 }
 
-static CU_TestInfo cpumask_suite[] = {
+CU_TestInfo cpumask_suite[] = {
 	{"odp_cpumask_to/from_str()", cpumask_test_odp_cpumask_to_from_str},
 	{"odp_cpumask_equal()",	      cpumask_test_odp_cpumask_equal},
 	{"odp_cpumask_zero()",	      cpumask_test_odp_cpumask_zero},
@@ -474,7 +474,7 @@  static CU_TestInfo cpumask_suite[] = {
 	CU_TEST_INFO_NULL,
 };
 
-static CU_SuiteInfo cpumask_suites[] = {
+CU_SuiteInfo cpumask_suites[] = {
 	{"Cpumask", NULL, NULL, NULL, NULL, cpumask_suite},
 	CU_SUITE_INFO_NULL,
 };
diff --git a/test/validation/cpumask/cpumask.h b/test/validation/cpumask/cpumask.h
index 2c6fb4a..fe2e52c 100644
--- a/test/validation/cpumask/cpumask.h
+++ b/test/validation/cpumask/cpumask.h
@@ -7,6 +7,31 @@ 
 #ifndef _ODP_TEST_CPUMASK_H_
 #define _ODP_TEST_CPUMASK_H_
 
+#include <CUnit/Basic.h>
+
+/* test functions: */
+void cpumask_test_odp_cpumask_to_from_str(void);
+void cpumask_test_odp_cpumask_equal(void);
+void cpumask_test_odp_cpumask_zero(void);
+void cpumask_test_odp_cpumask_set(void);
+void cpumask_test_odp_cpumask_clr(void);
+void cpumask_test_odp_cpumask_isset(void);
+void cpumask_test_odp_cpumask_count(void);
+void cpumask_test_odp_cpumask_and(void);
+void cpumask_test_odp_cpumask_or(void);
+void cpumask_test_odp_cpumask_xor(void);
+void cpumask_test_odp_cpumask_copy(void);
+void cpumask_test_odp_cpumask_first(void);
+void cpumask_test_odp_cpumask_last(void);
+void cpumask_test_odp_cpumask_next(void);
+
+/* test arrays: */
+extern CU_TestInfo cpumask_suite[];
+
+/* test registery: */
+extern CU_SuiteInfo cpumask_suites[];
+
+/* main test program: */
 int cpumask_main(void);
 
 #endif