diff mbox

[PATCHv2,2/4] validation: renaming in odp_pool.c

Message ID 1435243338-29958-3-git-send-email-christophe.milard@linaro.org
State Accepted
Commit e95a6c3dbcd02a6429cef861acceaae0db9d3b1d
Headers show

Commit Message

Christophe Milard June 25, 2015, 2:42 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>
---
 test/validation/odp_pool.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/test/validation/odp_pool.c b/test/validation/odp_pool.c
index 4379eb5..ba5dc79 100644
--- a/test/validation/odp_pool.c
+++ b/test/validation/odp_pool.c
@@ -26,7 +26,7 @@  static void pool_create_destroy(odp_pool_param_t *params)
 	CU_ASSERT(odp_pool_destroy(pool) == 0);
 }
 
-static void pool_create_destroy_buffer(void)
+static void pool_test_create_destroy_buffer(void)
 {
 	odp_pool_param_t params = {
 			.buf = {
@@ -40,7 +40,7 @@  static void pool_create_destroy_buffer(void)
 	pool_create_destroy(&params);
 }
 
-static void pool_create_destroy_packet(void)
+static void pool_test_create_destroy_packet(void)
 {
 	odp_pool_param_t params = {
 			.pkt = {
@@ -54,7 +54,7 @@  static void pool_create_destroy_packet(void)
 	pool_create_destroy(&params);
 }
 
-static void pool_create_destroy_timeout(void)
+static void pool_test_create_destroy_timeout(void)
 {
 	odp_pool_param_t params = {
 			.tmo = {
@@ -66,7 +66,7 @@  static void pool_create_destroy_timeout(void)
 	pool_create_destroy(&params);
 }
 
-static void pool_create_destroy_buffer_shm(void)
+static void pool_test_create_destroy_buffer_shm(void)
 {
 	odp_pool_t pool;
 	odp_shm_t test_shm;
@@ -92,7 +92,7 @@  static void pool_create_destroy_buffer_shm(void)
 	CU_ASSERT(odp_shm_free(test_shm) == 0);
 }
 
-static void pool_lookup_info_print(void)
+static void pool_test_lookup_info_print(void)
 {
 	odp_pool_t pool;
 	const char pool_name[] = "pool_for_lookup_test";
@@ -127,18 +127,18 @@  static void pool_lookup_info_print(void)
 
 #define _CU_TEST_INFO(test_func) {#test_func, test_func}
 
-static CU_TestInfo pool_tests[] = {
-	_CU_TEST_INFO(pool_create_destroy_buffer),
-	_CU_TEST_INFO(pool_create_destroy_packet),
-	_CU_TEST_INFO(pool_create_destroy_timeout),
-	_CU_TEST_INFO(pool_create_destroy_buffer_shm),
-	_CU_TEST_INFO(pool_lookup_info_print),
+static CU_TestInfo pool_suite[] = {
+	_CU_TEST_INFO(pool_test_create_destroy_buffer),
+	_CU_TEST_INFO(pool_test_create_destroy_packet),
+	_CU_TEST_INFO(pool_test_create_destroy_timeout),
+	_CU_TEST_INFO(pool_test_create_destroy_buffer_shm),
+	_CU_TEST_INFO(pool_test_lookup_info_print),
 	CU_TEST_INFO_NULL,
 };
 
 static CU_SuiteInfo pool_suites[] = {
 	{ .pName = "Pool tests",
-			.pTests = pool_tests,
+			.pTests = pool_suite,
 	},
 	CU_SUITE_INFO_NULL,
 };