diff mbox

[2/4] validation: renaming in odp_shared_memory.c

Message ID 1435933656-6848-3-git-send-email-christophe.milard@linaro.org
State Accepted
Commit 4ad1bcba04e9f41a01091e68611d1d040aee221b
Headers show

Commit Message

Christophe Milard July 3, 2015, 2:27 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_shared_memory.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/test/validation/odp_shared_memory.c b/test/validation/odp_shared_memory.c
index b7f431a..050e3e5 100644
--- a/test/validation/odp_shared_memory.c
+++ b/test/validation/odp_shared_memory.c
@@ -43,7 +43,7 @@  static void *run_shm_thread(void *arg)
 	return arg;
 }
 
-static void test_odp_shm_sunnyday(void)
+static void shmem_test_odp_shm_sunnyday(void)
 {
 	pthrd_arg thrdarg;
 	odp_shm_t shm;
@@ -75,13 +75,13 @@  static void test_odp_shm_sunnyday(void)
 	odp_cunit_thread_exit(&thrdarg);
 }
 
-static CU_TestInfo test_odp_shm[] = {
-	{"test_odp_shm_creat",  test_odp_shm_sunnyday},
+static CU_TestInfo shmem_suite[] = {
+	{"test_odp_shm_creat",  shmem_test_odp_shm_sunnyday},
 	CU_TEST_INFO_NULL,
 };
 
 static CU_SuiteInfo shmem_suites[] = {
-	{"Shared Memory", NULL, NULL, NULL, NULL, test_odp_shm},
+	{"Shared Memory", NULL, NULL, NULL, NULL, shmem_suite},
 	CU_SUITE_INFO_NULL,
 };