[LTP] [PATCH v2 1/2] epoll_pwait: Refactor timeout to struct timespec

Petr Vorel pvorel@suse.cz
Thu Jun 5 08:28:32 CEST 2025


Hi Martin,

...
> > > +++ b/testcases/kernel/syscalls/epoll_pwait/epoll_pwait_var.h
> > > @@ -14,22 +14,22 @@
> > >   #define NSEC_PER_MSEC (1000000L)

> > >   static int do_epoll_pwait(int epfd, struct epoll_event *events, int
> > > -	maxevents, int timeout, const sigset_t *sigmask)
> > > +	maxevents, struct timespec *timeout, const sigset_t *sigmask)
> > >   {
> > > -	if (tst_variant == 0)
> > > -		return epoll_pwait(epfd, events, maxevents, timeout, sigmask);
> > > +	if (tst_variant == 0) {
> > > +		int timeout_ms = -1;

> > very nit: I would reverse the condition to save indent for tst_variant == 0:

> Feel free to do it during merge, but it'd be better to check (tst_variant ==
> 1) instead in case there will be epoll_pwait3() in the future.

Thanks for your ack + good point, changed as tst_variant == 1.
Patchset merged, thanks!

Kind regards,
Petr


More information about the ltp mailing list