diff mbox

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

Message ID 1435592374-3517-3-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 5bb15aa5aa2b3e0fd0e8894a75197a9d3f621766
Headers show

Commit Message

Christophe Milard June 29, 2015, 3:39 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_queue.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/test/validation/odp_queue.c b/test/validation/odp_queue.c
index e944677..9f17743 100644
--- a/test/validation/odp_queue.c
+++ b/test/validation/odp_queue.c
@@ -14,7 +14,7 @@ 
 static int queue_contest = 0xff;
 static odp_pool_t pool;
 
-static int init_queue_suite(void)
+static int queue_suite_init(void)
 {
 	odp_pool_param_t params;
 
@@ -32,12 +32,12 @@  static int init_queue_suite(void)
 	return 0;
 }
 
-static int init_queue_finalize(void)
+static int queue_suite_term(void)
 {
 	return odp_pool_destroy(pool);
 }
 
-static void test_odp_queue_sunnyday(void)
+static void queue_test_sunnydays(void)
 {
 	odp_queue_t queue_creat_id, queue_id;
 	odp_event_t enev[MAX_BUFFER_QUEUE];
@@ -107,14 +107,14 @@  static void test_odp_queue_sunnyday(void)
 	return;
 }
 
-static CU_TestInfo test_odp_queue[] = {
-	{"queue sunnyday",  test_odp_queue_sunnyday},
+static CU_TestInfo queue_suite[] = {
+	{"queue sunnyday",  queue_test_sunnydays},
 	CU_TEST_INFO_NULL,
 };
 
 static CU_SuiteInfo queue_suites[] = {
-	{"Queue", init_queue_suite, init_queue_finalize,
-			NULL, NULL, test_odp_queue},
+	{"Queue", queue_suite_init, queue_suite_term,
+			NULL, NULL, queue_suite},
 	CU_SUITE_INFO_NULL,
 };