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

Cyril Hrubis
2017-10-02T15:21:09Z

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