diff mbox

[PATCHv3,09/20] validation: classification: lib populated

Message ID 1438018732-2778-10-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 0b7634218eb2800e767d15a4dc129c3d4acf0369
Headers show

Commit Message

Christophe Milard July 27, 2015, 5:38 p.m. UTC
test symbols are now exported in the module lib.

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
---
 test/validation/classification/classification.c    |  2 +-
 test/validation/classification/classification.h    | 31 ++++++++++++++++++++++
 .../classification/odp_classification_basic.c      | 17 ++++++------
 .../classification/odp_classification_tests.c      | 13 ++++-----
 4 files changed, 48 insertions(+), 15 deletions(-)
diff mbox

Patch

diff --git a/test/validation/classification/classification.c b/test/validation/classification/classification.c
index 2582aaa..d0fef93 100644
--- a/test/validation/classification/classification.c
+++ b/test/validation/classification/classification.c
@@ -9,7 +9,7 @@ 
 #include "odp_classification_testsuites.h"
 #include "classification.h"
 
-static CU_SuiteInfo classification_suites[] = {
+CU_SuiteInfo classification_suites[] = {
 	{ .pName = "classification basic",
 			.pTests = classification_suite_basic,
 	},
diff --git a/test/validation/classification/classification.h b/test/validation/classification/classification.h
index 63ad022..d2847e5 100644
--- a/test/validation/classification/classification.h
+++ b/test/validation/classification/classification.h
@@ -7,6 +7,37 @@ 
 #ifndef _ODP_TEST_CLASSIFICATION_H_
 #define _ODP_TEST_CLASSIFICATION_H_
 
+#include <CUnit/Basic.h>
+
+/* test functions: */
+void classification_test_create_cos(void);
+void classification_test_destroy_cos(void);
+void classification_test_create_pmr_match(void);
+void classification_test_destroy_pmr(void);
+void classification_test_cos_set_queue(void);
+void classification_test_cos_set_drop(void);
+void classification_test_pmr_match_set_create(void);
+void classification_test_pmr_match_set_destroy(void);
+
+void classification_test_pktio_set_skip(void);
+void classification_test_pktio_set_headroom(void);
+void classification_test_pmr_terms_avail(void);
+void classification_test_pmr_terms_cap(void);
+void classification_test_pktio_configure(void);
+void classification_test_pktio_test(void);
+
+/* test arrays: */
+extern CU_TestInfo classification_suite_basic[];
+extern CU_TestInfo classification_suite[];
+
+/* test array init/term functions: */
+int classification_suite_init(void);
+int classification_suite_term(void);
+
+/* test registry: */
+extern CU_SuiteInfo classification_suites[];
+
+/* main test program: */
 int classification_main(void);
 
 #endif
diff --git a/test/validation/classification/odp_classification_basic.c b/test/validation/classification/odp_classification_basic.c
index 99202ee..79c775e 100644
--- a/test/validation/classification/odp_classification_basic.c
+++ b/test/validation/classification/odp_classification_basic.c
@@ -5,10 +5,11 @@ 
  */
 
 #include "odp_classification_testsuites.h"
+#include "classification.h"
 
 #define PMR_SET_NUM	5
 
-static void classification_test_create_cos(void)
+void classification_test_create_cos(void)
 {
 	odp_cos_t cos;
 	char name[ODP_COS_NAME_LEN];
@@ -19,7 +20,7 @@  static void classification_test_create_cos(void)
 	odp_cos_destroy(cos);
 }
 
-static void classification_test_destroy_cos(void)
+void classification_test_destroy_cos(void)
 {
 	odp_cos_t cos;
 	char name[ODP_COS_NAME_LEN];
@@ -33,7 +34,7 @@  static void classification_test_destroy_cos(void)
 	CU_ASSERT(retval < 0);
 }
 
-static void classification_test_create_pmr_match(void)
+void classification_test_create_pmr_match(void)
 {
 	odp_pmr_t pmr;
 	uint16_t val;
@@ -46,7 +47,7 @@  static void classification_test_create_pmr_match(void)
 	odp_pmr_destroy(pmr);
 }
 
-static void classification_test_destroy_pmr(void)
+void classification_test_destroy_pmr(void)
 {
 	odp_pmr_t pmr;
 	uint16_t val;
@@ -62,7 +63,7 @@  static void classification_test_destroy_pmr(void)
 	CU_ASSERT(retval < 0);
 }
 
-static void classification_test_cos_set_queue(void)
+void classification_test_cos_set_queue(void)
 {
 	int retval;
 	char cosname[ODP_COS_NAME_LEN];
@@ -87,7 +88,7 @@  static void classification_test_cos_set_queue(void)
 	odp_queue_destroy(queue_cos);
 }
 
-static void classification_test_cos_set_drop(void)
+void classification_test_cos_set_drop(void)
 {
 	int retval;
 	char cosname[ODP_COS_NAME_LEN];
@@ -103,7 +104,7 @@  static void classification_test_cos_set_drop(void)
 	odp_cos_destroy(cos_drop);
 }
 
-static void classification_test_pmr_match_set_create(void)
+void classification_test_pmr_match_set_create(void)
 {
 	odp_pmr_set_t pmr_set;
 	int retval;
@@ -127,7 +128,7 @@  static void classification_test_pmr_match_set_create(void)
 	CU_ASSERT(retval == 0);
 }
 
-static void classification_test_pmr_match_set_destroy(void)
+void classification_test_pmr_match_set_destroy(void)
 {
 	odp_pmr_set_t pmr_set;
 	int retval;
diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c
index a4072c4..0e0c4eb 100644
--- a/test/validation/classification/odp_classification_tests.c
+++ b/test/validation/classification/odp_classification_tests.c
@@ -5,6 +5,7 @@ 
  */
 
 #include "odp_classification_testsuites.h"
+#include "classification.h"
 #include <odp_cunit_common.h>
 #include <odp/helper/eth.h>
 #include <odp/helper/ip.h>
@@ -564,7 +565,7 @@  void test_pktio_error_cos(void)
 	odp_packet_free(pkt);
 }
 
-static void classification_test_pktio_set_skip(void)
+void classification_test_pktio_set_skip(void)
 {
 	int retval;
 	size_t offset = 5;
@@ -581,7 +582,7 @@  static void classification_test_pktio_set_skip(void)
 	CU_ASSERT(retval == 0);
 }
 
-static void classification_test_pktio_set_headroom(void)
+void classification_test_pktio_set_headroom(void)
 {
 	size_t headroom;
 	int retval;
@@ -793,7 +794,7 @@  void test_pktio_pmr_match_set_cos(void)
 	odp_packet_free(pkt);
 }
 
-static void classification_test_pmr_terms_avail(void)
+void classification_test_pmr_terms_avail(void)
 {
 	int retval;
 	/* Since this API called at the start of the suite the return value
@@ -802,7 +803,7 @@  static void classification_test_pmr_terms_avail(void)
 	CU_ASSERT(retval > 0);
 }
 
-static void classification_test_pmr_terms_cap(void)
+void classification_test_pmr_terms_cap(void)
 {
 	unsigned long long retval;
 	/* Need to check different values for different platforms */
@@ -810,7 +811,7 @@  static void classification_test_pmr_terms_cap(void)
 	CU_ASSERT(retval & (1 << ODP_PMR_IPPROTO));
 }
 
-static void classification_test_pktio_configure(void)
+void classification_test_pktio_configure(void)
 {
 	/* Configure the Different CoS for the pktio interface */
 	if (TEST_DEFAULT)
@@ -827,7 +828,7 @@  static void classification_test_pktio_configure(void)
 		configure_pktio_pmr_match_set_cos();
 }
 
-static void classification_test_pktio_test(void)
+void classification_test_pktio_test(void)
 {
 	/* Test Different CoS on the pktio interface */
 	if (TEST_DEFAULT)