[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sbin/ifconfig
On 3/18/12 1:53 AM, Jukka Ruohonen wrote:
On Fri, Mar 16, 2012 at 10:25:08PM -0400, Christos Zoulas wrote:
Module Name: src
Committed By: christos
Date: Sat Mar 17 02:25:08 UTC 2012
PR/43141: Tobias Nygren: Print an error on unknown interfaces.
Now this is trival and it is fixed. But I guess there is a bug here in ATF.
The test only checks that the exit code is not zero:
atf_check -s not-exit:0 ifconfig nonexistent0 22.214.171.124/24
But why is stderr being involved?
If you really want to ignore stderr in the test, pass "-e ignore" to
atf_check. The default is "-o empty -e empty".
Now, the question is: do you really want to ignore the message, or do
you want to validate that the appropriate error message is printed? If
the later (which should be the preferred way), "-e inline:'foo bar\n'"
or "-e match:'foo bar'" or "-e file:experr" (with experr being
pre-populated with the expected message) will do the job.
Main Index |
Thread Index |