ATF-devel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

atf_check syntax (Was: Re: CVS commit: src/tests/lib/libc/ssp (fwd))

On Wed Dec 29 2010 at 14:02:30 +0100, Julio Merino wrote:
> On Wed, Dec 29, 2010 at 11:32 AM, Antti Kantee <> 
> wrote:
> >
> > On a tangent, how do you access fields in awk in an atf_check pipeline?
> > I tried and I tried, and ended up having to use a temporary file and a
> > non-pipelined atf_check (tests/usr.sbin/traceroute):
> >
> >    atf_check -o inline:'\n2.3.4.5\n' awk '{print $2}' < tmpfile
> >
> > (verified answers only, please ;)
> This works (at least it does here):
>         atf_check -s exit:0 -o inline:'\n2.3.4.5\n' -e ignore -x \
>             "rump.traceroute ${1} -n | awk '{print \$2}'"

Yup, that works.  However, just as a data point, I made *two* mistakes
in copypasting the above.  Getting the syntax right is difficult even
if you know what you're doing, let alone if you're shooting in the dark.

If you can at all improve the usability of an atf_check equivalent in
The Cure, it would be a very welcome feature.  Unfortunately, I don't
have any concrete suggestions.  Currently to me, atf_check is like the
testing framework equivalent of ;)

älä karot toivorikkauttas, kyl rätei ja lumpui piisaa

Home | Main Index | Thread Index | Old Index