diff mbox

[2/5] validation: renaming in odp_time.c

Message ID 1434988980-14008-3-git-send-email-christophe.milard@linaro.org
State Superseded
Headers show

Commit Message

Christophe Milard June 22, 2015, 4:02 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.
Note that time API is actually part of the "system" API modules.
Hence the renaming to systen_*.

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_time.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/test/validation/odp_time.c b/test/validation/odp_time.c
index 38d940e..3005a26 100644
--- a/test/validation/odp_time.c
+++ b/test/validation/odp_time.c
@@ -11,7 +11,7 @@ 
 #define BUSY_LOOP_CNT 100
 
 /* check that a cycles difference gives a reasonable result */
-static void test_odp_cycles_diff(void)
+static void system_test_odp_cycles_diff(void)
 {
 	/* volatile to stop optimization of busy loop */
 	volatile int count = 0;
@@ -31,7 +31,7 @@  static void test_odp_cycles_diff(void)
 }
 
 /* check that a negative cycles difference gives a reasonable result */
-static void test_odp_cycles_negative_diff(void)
+static void system_test_odp_cycles_negative_diff(void)
 {
 	uint64_t diff, cycles1, cycles2;
 	cycles1 = 10;
@@ -41,7 +41,7 @@  static void test_odp_cycles_negative_diff(void)
 }
 
 /* check that related conversions come back to the same value */
-static void test_odp_time_conversion(void)
+static void system_test_odp_time_conversion(void)
 {
 	uint64_t ns1, ns2, cycles;
 	uint64_t upper_limit, lower_limit;
@@ -58,15 +58,15 @@  static void test_odp_time_conversion(void)
 	CU_ASSERT((ns2 <= upper_limit) && (ns2 >= lower_limit));
 }
 
-CU_TestInfo test_odp_time[] = {
-	{"cycles diff", test_odp_cycles_diff},
-	{"negative diff", test_odp_cycles_negative_diff},
-	{"conversion", test_odp_time_conversion},
+CU_TestInfo system_suite_time[] = {
+	{"cycles diff", system_test_odp_cycles_diff},
+	{"negative diff", system_test_odp_cycles_negative_diff},
+	{"conversion", system_test_odp_time_conversion},
 	 CU_TEST_INFO_NULL
 };
 
 static CU_SuiteInfo system_suites[] = {
-		{"Time", NULL, NULL, NULL, NULL, test_odp_time},
+		{"Time", NULL, NULL, NULL, NULL, system_suite_time},
 		 CU_SUITE_INFO_NULL
 };