[LTP] [PATCH 2/5] syscalls: settimeofday: Use gettimeofday()

Arnd Bergmann arnd@arndb.de
Tue May 19 12:24:10 CEST 2020


On Tue, May 19, 2020 at 11:25 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 19-05-20, 11:20, Arnd Bergmann wrote:
> > On Tue, May 19, 2020 at 10:51 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > >
> > > Use gettimeofday() instead of calling it with tst_syscall().
> > >
> > > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > > ---
> >
> > I think the change makes it work reliably, but it does change what you
> > are testing for: instead of testing the low-level system call interface,
> > this will now test the libc interface, which is implemented on top
> > of the vdso or clock_gettime().
>
> Actually the testcase was for settimeofday() and we were unnecessarily
> calling gettimeofday with tst_syscall(). And so the testcase should
> remain unaffected that way. Had this been a testcase for
> gettimeofday(), I would have agreed with you.

Ok, makes sense. Just mention in the changelog text that this fixes
running against an updated libc with 64-bit time_t in that case.

       Arnd


More information about the ltp mailing list