ATF-devel archive

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

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



On Mon Dec 27 2010 at 09:34:17 +0100, Julio Merino wrote:
> On Mon, Dec 27, 2010 at 6:31 AM, Paul Goyette <paul%whooppee.com@localhost> 
> wrote:
> > OK, previously reported problem has been resolved!
> >
> > It seems that
> >
> >        cmd="echo blah | prog"
> >        atf_check .... $cmd
> >
> > doesn't do what was expected.  So I changed the test script to
> >
> >        cmd="prog" ; stdin="echo blah |"
> >        eval $stdin atf_check .... $cmd
> >
> > and it seems to work much better.   :)
> 
> atf_check has a -x flag to pass the command through /bin/sh instead of
> executing it with directly with exec().  That makes pipelines work.
> 
> Can you try to see if this actually does work and update the tests
> accordingly for less black magic?

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:'1.2.3.1\n2.3.4.5\n' awk '{print $2}' < tmpfile

(verified answers only, please ;)

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


Home | Main Index | Thread Index | Old Index