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 Modified Files: src/sbin/ifconfig: af_inetany.c Log Message: 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 1.2.3.4/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.