diff mbox

[PATCHv2,2/5] validation: renaming in odp_timer.c

Message ID 1436364701-27420-3-git-send-email-christophe.milard@linaro.org
State Accepted
Commit f842ee7f1a0efb72fb58ebf23a6d9b55a4137557
Headers show

Commit Message

Christophe Milard July 8, 2015, 2:11 p.m. UTC
Renaming of things which may be, one day, exported in a lib.
This renaming is important, as it creates consistency between test
symbols, which is needed if things get eventually exported in the lib.
Also, tests are often created from other tests: Fixing the first exemples
will help geting future tests better.

Things that are candidate to be exported in the lib in the future
have been named as follows:
 -Tests, i.e. functions which are used in CUNIT testsuites are named:
    <Module>_test_*
 -Test arrays, i.e. arrays of CU_TestInfo, listing the test functions
  belonging to a suite, are called:
    <Module>_suite[_*]
  where the possible suffix can be used if many suites are declared.
 -CUNIT suite init and termination functions are called:
    <Module>_suite[_*]_init() and <Module>_suite[_*]_term()
  respectively.
 -Suite arrays, i.e. arrays of CU_SuiteInfo used in executables are called:
    <Module>_suites[_*]
  where the possible suffix identifies the executable using it, if many.
 -Main function(s), are called:
    <Module>_main[_*]
  where the possible suffix identifies the executable using it

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 test/validation/odp_timer.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c
index bff585e..3ab395d 100644
--- a/test/validation/odp_timer.c
+++ b/test/validation/odp_timer.c
@@ -49,7 +49,7 @@  struct test_timer {
 
 #define TICK_INVALID (~(uint64_t)0)
 
-static void test_timeout_pool_alloc(void)
+static void timer_test_timeout_pool_alloc(void)
 {
 	odp_pool_t pool;
 	const int num = 3;
@@ -93,7 +93,7 @@  static void test_timeout_pool_alloc(void)
 	CU_ASSERT(odp_pool_destroy(pool) == 0);
 }
 
-static void test_timeout_pool_free(void)
+static void timer_test_timeout_pool_free(void)
 {
 	odp_pool_t pool;
 	odp_timeout_t tmo;
@@ -124,7 +124,7 @@  static void test_timeout_pool_free(void)
 	CU_ASSERT(odp_pool_destroy(pool) == 0);
 }
 
-static void test_odp_timer_cancel(void)
+static void timer_test_odp_timer_cancel(void)
 {
 	odp_pool_t pool;
 	odp_pool_param_t params;
@@ -434,7 +434,7 @@  static void *worker_entrypoint(void *arg TEST_UNUSED)
 }
 
 /* @private Timer test case entrypoint */
-static void test_odp_timer_all(void)
+static void timer_test_odp_timer_all(void)
 {
 	int rc;
 	odp_pool_param_t params;
@@ -527,16 +527,16 @@  static void test_odp_timer_all(void)
 	CU_PASS("ODP timer test");
 }
 
-static CU_TestInfo test_odp_timer[] = {
-	{"test_timeout_pool_alloc",  test_timeout_pool_alloc},
-	{"test_timeout_pool_free",  test_timeout_pool_free},
-	{"test_odp_timer_cancel",  test_odp_timer_cancel},
-	{"test_odp_timer_all",  test_odp_timer_all},
+static CU_TestInfo timer_suite[] = {
+	{"test_timeout_pool_alloc",  timer_test_timeout_pool_alloc},
+	{"test_timeout_pool_free",  timer_test_timeout_pool_free},
+	{"test_odp_timer_cancel",  timer_test_odp_timer_cancel},
+	{"test_odp_timer_all",  timer_test_odp_timer_all},
 	CU_TEST_INFO_NULL,
 };
 
 static CU_SuiteInfo timer_suites[] = {
-	{"Timer", NULL, NULL, NULL, NULL, test_odp_timer},
+	{"Timer", NULL, NULL, NULL, NULL, timer_suite},
 	CU_SUITE_INFO_NULL,
 };