[LTP] [PATCH V6 01/17] syscalls/timer_gettime: Add support for time64 tests

Viresh Kumar viresh.kumar@linaro.org
Thu Jun 25 13:10:17 CEST 2020


On 25-06-20, 13:07, Cyril Hrubis wrote:
> >         TEST(tv->func(timer, tst_its_get(&spec)));
> >         if (TST_RET == 0) {
> > -               tst_res(TPASS, "timer_gettime() Passed");
> > +               if ((spec.type == TST_KERN_OLD_TIMESPEC &&
> > +                       (spec.ts.kern_old_its.it_interval.tv_sec ||
> > +                        spec.ts.kern_old_its.it_interval.tv_nsec ||
> > +                        spec.ts.kern_old_its.it_value.tv_sec ||
> > +                        spec.ts.kern_old_its.it_value.tv_nsec)) ||
> > +                   (spec.type == TST_KERN_TIMESPEC &&
> > +                       (spec.ts.kern_its.it_interval.tv_sec ||
> > +                        spec.ts.kern_its.it_interval.tv_nsec ||
> > +                        spec.ts.kern_its.it_value.tv_sec ||
> > +                        spec.ts.kern_its.it_value.tv_nsec)))
> > +                       tst_res(TFAIL, "timespec should have been zeroed");
> 
> Indeed that's what I had in mind, can we please abstract this properly
> as well? I guess that we can add helpers such as tst_its_interval_sec()
> tst_its_inverval_nsec, etc.

I preferred it this way as no one else uses it and so maybe we can
live without adding those helpers ?

-- 
viresh


More information about the ltp mailing list