[LTP] [PATCH 03/19] Unify error handling in lib/tst_safe_timerfd.c

Petr Vorel pvorel@suse.cz
Sat Nov 7 17:42:14 CET 2020


Hi Martin, Xu,

> > Hi Martin, Xu,

> > > > diff --git a/lib/tst_safe_timerfd.c b/lib/tst_safe_timerfd.c
> > > > index ffe7b2ef7..4c36a309c 100644
> > > > --- a/lib/tst_safe_timerfd.c
> > > > +++ b/lib/tst_safe_timerfd.c
> > > > @@ -17,9 +17,14 @@ int safe_timerfd_create(const char *file, const int lineno,
> > > >    	int fd;

> > > >    	fd = timerfd_create(clockid, flags);
> > > > -	if (fd<   0) {
> > > > -		tst_brk(TTYPE | TERRNO, "%s:%d timerfd_create(%s) failed",
> > > > -			file, lineno, tst_clock_name(clockid));
> > > > +
> > > > +	if (fd == -1) {
> > > > +		tst_brk_(file, lineno, TTYPE | TERRNO,
> > > > +			"timerfd_create(%s) failed", tst_clock_name(clockid));
> > > > +	} else if (fd<   0) {
> > nit: fd<   0 =>  fd<   0
> Sorry, It is my email format problem, on patchwork[1], the format is right.

Martin, sorry for not checking what you send in the patch.

> [1]https://patchwork.ozlabs.org/project/ltp/patch/20201026164756.30556-4-mdoucha@suse.cz/

Kind regards,
Petr


More information about the ltp mailing list