Message ID | 1411642048-19451-1-git-send-email-santosh.shukla@linaro.org |
---|---|
State | Accepted |
Commit | 544b46a6ea9617750bd92a805b6452496a4ecb94 |
Headers | show |
Tested-by: Ankit Jindal <ankit.jindal@linaro.org> Thanks, Ankit On 25 September 2014 16:17, Santosh Shukla <santosh.shukla@linaro.org> wrote: > Also set appropriate timer resolution. w/o this error check odp ping > application will segfault. > > Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org> > --- > test/api_test/odp_timer_ping.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c > index 5ae379f..29a6392 100644 > --- a/test/api_test/odp_timer_ping.c > +++ b/test/api_test/odp_timer_ping.c > @@ -43,6 +43,11 @@ > #define PING_CNT 10 > #define PING_THRD 2 /* Send and Rx Ping thread */ > > +/* Nanoseconds */ > +#define RESUS 10000 > +#define MINUS 10000 > +#define MAXUS 10000000 > + > static odp_timer_t test_timer_ping; > static odp_timer_tmo_t test_ping_tmo; > > @@ -353,7 +358,15 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) > } > > test_timer_ping = odp_timer_create("ping_timer", pool, > - 1000000, 1000000, 1000000000000UL); > + RESUS*ODP_TIME_USEC, > + MINUS*ODP_TIME_USEC, > + MAXUS*ODP_TIME_USEC); > + > + if (test_timer_ping == ODP_TIMER_INVALID) { > + ODP_ERR("Timer create failed.\n"); > + return -1; > + } > + > odp_shm_print_all(); > > pingarg.thrdarg.testcase = ODP_TIMER_PING_TEST; > -- > 1.7.9.5 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp
Merged, thanks! Maxim. On 09/25/2014 02:47 PM, Santosh Shukla wrote: > Also set appropriate timer resolution. w/o this error check odp ping > application will segfault. > > Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org> > --- > test/api_test/odp_timer_ping.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c > index 5ae379f..29a6392 100644 > --- a/test/api_test/odp_timer_ping.c > +++ b/test/api_test/odp_timer_ping.c > @@ -43,6 +43,11 @@ > #define PING_CNT 10 > #define PING_THRD 2 /* Send and Rx Ping thread */ > > +/* Nanoseconds */ > +#define RESUS 10000 > +#define MINUS 10000 > +#define MAXUS 10000000 > + > static odp_timer_t test_timer_ping; > static odp_timer_tmo_t test_ping_tmo; > > @@ -353,7 +358,15 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) > } > > test_timer_ping = odp_timer_create("ping_timer", pool, > - 1000000, 1000000, 1000000000000UL); > + RESUS*ODP_TIME_USEC, > + MINUS*ODP_TIME_USEC, > + MAXUS*ODP_TIME_USEC); > + > + if (test_timer_ping == ODP_TIMER_INVALID) { > + ODP_ERR("Timer create failed.\n"); > + return -1; > + } > + > odp_shm_print_all(); > > pingarg.thrdarg.testcase = ODP_TIMER_PING_TEST;
diff --git a/test/api_test/odp_timer_ping.c b/test/api_test/odp_timer_ping.c index 5ae379f..29a6392 100644 --- a/test/api_test/odp_timer_ping.c +++ b/test/api_test/odp_timer_ping.c @@ -43,6 +43,11 @@ #define PING_CNT 10 #define PING_THRD 2 /* Send and Rx Ping thread */ +/* Nanoseconds */ +#define RESUS 10000 +#define MINUS 10000 +#define MAXUS 10000000 + static odp_timer_t test_timer_ping; static odp_timer_tmo_t test_ping_tmo; @@ -353,7 +358,15 @@ int main(int argc ODP_UNUSED, char *argv[] ODP_UNUSED) } test_timer_ping = odp_timer_create("ping_timer", pool, - 1000000, 1000000, 1000000000000UL); + RESUS*ODP_TIME_USEC, + MINUS*ODP_TIME_USEC, + MAXUS*ODP_TIME_USEC); + + if (test_timer_ping == ODP_TIMER_INVALID) { + ODP_ERR("Timer create failed.\n"); + return -1; + } + odp_shm_print_all(); pingarg.thrdarg.testcase = ODP_TIMER_PING_TEST;
Also set appropriate timer resolution. w/o this error check odp ping application will segfault. Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org> --- test/api_test/odp_timer_ping.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)