[LTP] [PATCH 1/1] syscalls, lib: Use SAFE_{BIND, LISTEN, SOCKET} macros

Cyril Hrubis chrubis@suse.cz
Mon Oct 2 17:21:09 CEST 2017


Hi!
> > > // SAFE_BIND
> > > @old_safe_bind depends on test_h@
> > > expression sockfd, sockaddr, addrlen;
> > > identifier cleanup_fn;
> > > expression e, x;
> > > constant TFAIL;
> > > @@
> > > -if (bind(sockfd, sockaddr, addrlen) < 0) {
> > > -	tst_brkm(e, cleanup_fn, ...);
> > > (
> > > -	return -1;
> 
> > > )
> > > 	... when != x & TFAIL
> 
> > What does the last line do? I am guessing it prevents the substitution
> > if it finds TFAIL anywhere in the above expression.
> Precisely :-).

Shouldn't that be when != e & TFAIL? As far as I can tell the x is not
used in the matching part, or did I miss something?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list