Message ID | 1452004877-15647-1-git-send-email-ivan.khoronzhuk@linaro.org |
---|---|
State | Superseded |
Headers | show |
ignore this. see series "correct validation limits" On 05.01.16 16:41, Ivan Khoronzhuk wrote: > The resolution vars were not initialized at init, as result the resolution > is ideal. > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> > --- > test/validation/time/time.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/test/validation/time/time.c b/test/validation/time/time.c > index 8b469b0..5761540 100644 > --- a/test/validation/time/time.c > +++ b/test/validation/time/time.c > @@ -31,7 +31,7 @@ void time_test_constants(void) > CU_ASSERT(ns == ODP_TIME_USEC_IN_NS); > } > > -static void time_test_res(time_res_cb time_res, uint64_t res) > +static int time_test_res(time_res_cb time_res, uint64_t res) > { > uint64_t rate; > > @@ -41,16 +41,17 @@ static void time_test_res(time_res_cb time_res, uint64_t res) > > res = ODP_TIME_SEC_IN_NS / rate; > res = res ? res : 1; > + return res; > } > > void time_test_local_res(void) > { > - time_test_res(odp_time_local_res, local_res); > + local_res = time_test_res(odp_time_local_res, local_res); > } > > void time_test_global_res(void) > { > - time_test_res(odp_time_global_res, global_res); > + global_res = time_test_res(odp_time_global_res, global_res); > } > > /* check that related conversions come back to the same value */ >
diff --git a/test/validation/time/time.c b/test/validation/time/time.c index 8b469b0..5761540 100644 --- a/test/validation/time/time.c +++ b/test/validation/time/time.c @@ -31,7 +31,7 @@ void time_test_constants(void) CU_ASSERT(ns == ODP_TIME_USEC_IN_NS); } -static void time_test_res(time_res_cb time_res, uint64_t res) +static int time_test_res(time_res_cb time_res, uint64_t res) { uint64_t rate; @@ -41,16 +41,17 @@ static void time_test_res(time_res_cb time_res, uint64_t res) res = ODP_TIME_SEC_IN_NS / rate; res = res ? res : 1; + return res; } void time_test_local_res(void) { - time_test_res(odp_time_local_res, local_res); + local_res = time_test_res(odp_time_local_res, local_res); } void time_test_global_res(void) { - time_test_res(odp_time_global_res, global_res); + global_res = time_test_res(odp_time_global_res, global_res); } /* check that related conversions come back to the same value */
The resolution vars were not initialized at init, as result the resolution is ideal. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- test/validation/time/time.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)