Message ID | 1441901930-29287-3-git-send-email-ivan.khoronzhuk@linaro.org |
---|---|
State | Accepted |
Commit | 68f6f9334b810b3f218b0c0e4d2e4f18315f2bf6 |
Headers | show |
I don't want to delete check under odp_schedule_wait_time((uint64_t)-1LL); because at least for now it's only one test that check smth real. It will be deleted along with patches that add real wait_time test on odp_schedule(). In this concrete patch I'm not fixing it. So, please don't hesitate to review it. On 10.09.15 19:18, Ivan Khoronzhuk wrote: > The ODP_SCHED_NO_WAIT now corresponds to 0, not 1. > So no need to check it anymore. > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> > --- > test/validation/scheduler/scheduler.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/test/validation/scheduler/scheduler.c b/test/validation/scheduler/scheduler.c > index 1874889..39357e7 100644 > --- a/test/validation/scheduler/scheduler.c > +++ b/test/validation/scheduler/scheduler.c > @@ -95,9 +95,7 @@ void scheduler_test_wait_time(void) > uint64_t wait_time; > > wait_time = odp_schedule_wait_time(0); > - > wait_time = odp_schedule_wait_time(1); > - CU_ASSERT(wait_time > 0); > > wait_time = odp_schedule_wait_time((uint64_t)-1LL); > CU_ASSERT(wait_time > 0); >
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Improves the validation test, but the remaining CU_ASSERT(wait_time > 0) should be also removed. Some platform may very well code odp_schedule_wait_time((uint64_t)-1LL) to return 0. uint64_t odp_schedule_wait_time(uint64_t nsec) { if (nsec < 100) return NO_WAIT; // can be e.g 1 if (nsec > 10*YEAR) return WAIT; // can be e.g. 0 return nsec; // 100 nsec ... 10 years in nsec } -Petri > -----Original Message----- > From: EXT Ivan Khoronzhuk [mailto:ivan.khoronzhuk@linaro.org] > Sent: Thursday, September 10, 2015 7:19 PM > To: lng-odp@lists.linaro.org; Savolainen, Petri (Nokia - FI/Espoo); > nmorey@kalray.eu > Cc: Ivan Khoronzhuk > Subject: [lng-odp] [PATCH v2 2/2] validation: schedule: don't check > schedule time on 0 > > The ODP_SCHED_NO_WAIT now corresponds to 0, not 1. > So no need to check it anymore. > > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> > --- > test/validation/scheduler/scheduler.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/test/validation/scheduler/scheduler.c > b/test/validation/scheduler/scheduler.c > index 1874889..39357e7 100644 > --- a/test/validation/scheduler/scheduler.c > +++ b/test/validation/scheduler/scheduler.c > @@ -95,9 +95,7 @@ void scheduler_test_wait_time(void) > uint64_t wait_time; > > wait_time = odp_schedule_wait_time(0); > - > wait_time = odp_schedule_wait_time(1); > - CU_ASSERT(wait_time > 0); > > wait_time = odp_schedule_wait_time((uint64_t)-1LL); > CU_ASSERT(wait_time > 0); > -- > 1.9.1
diff --git a/test/validation/scheduler/scheduler.c b/test/validation/scheduler/scheduler.c index 1874889..39357e7 100644 --- a/test/validation/scheduler/scheduler.c +++ b/test/validation/scheduler/scheduler.c @@ -95,9 +95,7 @@ void scheduler_test_wait_time(void) uint64_t wait_time; wait_time = odp_schedule_wait_time(0); - wait_time = odp_schedule_wait_time(1); - CU_ASSERT(wait_time > 0); wait_time = odp_schedule_wait_time((uint64_t)-1LL); CU_ASSERT(wait_time > 0);
The ODP_SCHED_NO_WAIT now corresponds to 0, not 1. So no need to check it anymore. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- test/validation/scheduler/scheduler.c | 2 -- 1 file changed, 2 deletions(-)