NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/51667: atf-run wrongly passes even if atf_check fails in some cases
>Number: 51667
>Category: bin
>Synopsis: atf-run wrongly passes even if atf_check fails in some cases
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 28 07:20:00 +0000 2016
>Originator: Ryota Ozaki
>Release: -current
>Organization:
>Environment:
NetBSD rangeley 7.99.42 NetBSD 7.99.42 (RANGELEY) #34: Tue Nov 22 17:25:06 JST 2016 ozaki-r@rangeley:(hidden) amd64
>Description:
atf-run wrongly passes even if an atf_check fails in a case like the below sample test.
Normally we don't put atf_check at the end of a pipe, but we may want to write
a script like this:
cat somefile | while read a b c; do
atf_check -s exit:0 ...
done
It doesn't work as well.
>How-To-Repeat:
atf_test_case should_fail
should_fail_body()
{
atf_expect_fail "It should fail"
echo zzz | atf_check -s exit:0 ls /tmp/non_exisiting_file
}
atf_init_test_cases()
{
atf_add_test_case should_fail
}
# The test fails with "should_fail: [0.035389s] Failed: Test case was expecting a failure but none were raised"
>Fix:
n/a
Home |
Main Index |
Thread Index |
Old Index