Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 2014 16:54:38 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        "Kilner, Peter" <Peter.Kilner@emc.com>
Cc:        "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>
Subject:   Re: ATF Test Cases
Message-ID:  <CAOtMX2jMZnx4cAz32PyKQT8RouaCankpVW4wk9PD0Fx4Cg9Xig@mail.gmail.com>
In-Reply-To: <DB777D43-945C-4C0D-A3A8-66DD5C9B214E@isilon.com>
References:  <DB777D43-945C-4C0D-A3A8-66DD5C9B214E@isilon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 26, 2014 at 4:26 PM, Kilner, Peter <Peter.Kilner@emc.com> wrote=
:
> Hello,
>
> I hope I am posting this question to the correct list.
>
> Is there a way to have a single ATF test case report multiple pass/fail r=
esults?  Currently I have seen that one can include a number of test condit=
ions in a single test case (for example many aft_checks).  However the test=
 case will only report one pass/fail result for that case.

Nope.

>
> I would like to build a test case that will iterate though many configura=
tions and would like to see a pass/fail for each config.  However this is d=
ifficult to implement with multiply test cases because of the for loops tha=
t I am using.
>
> Any suggestions would be appreciated.

Is this in C/C++ or sh?  With atf-c-api(3), you can call atf_expect()
instead of atf_require().  That way the test will continue even after
one of the expectations failed.  If multiple expectations fail, then I
think kyua will print an error message for each failed expectation.  I
could be wrong however.  Also, I don't think that equivalent
functionality exists in atf-sh-api(3).

Apart from that, you pretty much have to write multiple test cases.
Note that separate test cases run in separate processes.  If your for
loop is very long and this is a C test program, using multiple test
cases will be much slower than using a single test case with multiple
expectations.

-Alan

>
> Thank you,
>
> Peter Kilner
> Software Engineer
> EMC, Isilon Seattle
> peter.kilner@isilon.com<mailto:peter.kilner@isilon.com>
> 206-777-7859
>
>
>
> _______________________________________________
> freebsd-testing@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-testing
> To unsubscribe, send any mail to "freebsd-testing-unsubscribe@freebsd.org=
"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2jMZnx4cAz32PyKQT8RouaCankpVW4wk9PD0Fx4Cg9Xig>