[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 3:14 PM, Paul Goyette <paul%whooppee.com@localhost>
> On Mon, 27 Dec 2010, Julio Merino wrote:
>> On Mon, Dec 27, 2010 at 6:31 AM, Paul Goyette <paul%whooppee.com@localhost>
>>> 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?
> It does not work. :(
> In this case, I need to use
> atf_check -x -s signal:6 "echo foo | test_prog"
> Even though test_prog exits with signal 6 (SIGABRT), the shell process does
> not (it exits normally). The test case reports
> tc-se:Fail: program did not receive a signal
Ah, I see what you mean. So wouldn't this work?
echo foo | atf_check -s signal:6 test_prog
I think this is similar to what you mentioned at the beginning but
your example had a more convoluted syntax.
> BTW, it does not appear that "-s signal:name" works. I've tried ABRT,
> ABORT, SIGABRT, and SIGABORT and all fail with
> tc-se:atf-check: ERROR: Invalid signal name or number in -s option
Mea culpa. The SIGABRT name was not defined in atf-sh/atf-check.cpp.
I've added support for this upstream; would you like the change pulled
up to NetBSD also? It's a one-liner.
Main Index |
Thread Index |