[LTP] [PATCH 3/5] syscalls: Don't use tst_syscall() unnecessarily

Viresh Kumar viresh.kumar@linaro.org
Wed May 20 09:19:48 CEST 2020


On 19-05-20, 15:45, Cyril Hrubis wrote:
> Hi!
> > > > -     tst_clock_gettime(CLOCK_MONOTONIC, &ts);
> > > > +     clock_gettime(CLOCK_MONOTONIC, &ts);
> > >
> > > I guess that this will reintroduce LTP compilation failures on older
> > > glibc, which was the primary reason we used the tst_clock_gettime()
> > > instead of clock_gettime().
> > 
> > I see that clock_gettime was first added in glibc-2.1.3 back in 1999.
> > Can that actually run LTP any more? If it can and this is considered
> > important, I fear the tst_clock_gettime() call needs to be extended
> > to call the clock_gettime()/clock_gettime64()/gettimeofday() syscalls,
> > whichever is the first to work, and convert the formats from the
> > native kernel format to the glibc format.
> 
> I guess that at the current time we do support distros that are at max
> 10 years old, mostly because enterprise support cycles are about 10
> years in lenght.
> 
> The issue here is that glibc needed -lrt passed to linker couple of
> years ago and we wanted to avoid the need of linking everything with
> -lrt, as calling the raw syscall was just easier fix.

To conclude the discussion, is this patch okay or not ? The reason why I am
asking this is because this file still uses the old test framework and so can't
include tst_timer.h, and so doesn't have access to struct __kernel_old_timespec.

What do you suggest I do here ?

-- 
viresh


More information about the ltp mailing list