Re: [PATCH v2 08/17] kunit: test: add support for test abort

2019-05-06 Thread Brendan Higgins
On Fri, May 3, 2019 at 5:33 AM Logan Gunthorpe wrote: > > > > On 2019-05-03 12:48 a.m., Brendan Higgins wrote: > > On Thu, May 2, 2019 at 8:15 PM Logan Gunthorpe wrote: > >> On 2019-05-01 5:01 p.m., Brendan Higgins wrote: > >>> +/* > >>> + * struct kunit_try_catch - provides a generic way to run

Re: [PATCH v2 08/17] kunit: test: add support for test abort

2019-05-03 Thread Logan Gunthorpe
On 2019-05-03 12:48 a.m., Brendan Higgins wrote: > On Thu, May 2, 2019 at 8:15 PM Logan Gunthorpe wrote: >> On 2019-05-01 5:01 p.m., Brendan Higgins wrote: >>> +/* >>> + * struct kunit_try_catch - provides a generic way to run code which might >>> fail. >>> + * @context: used to pass user data

Re: [PATCH v2 08/17] kunit: test: add support for test abort

2019-05-02 Thread Brendan Higgins
On Thu, May 2, 2019 at 8:15 PM Logan Gunthorpe wrote: > > > > On 2019-05-01 5:01 p.m., Brendan Higgins wrote: > > +/* > > + * struct kunit_try_catch - provides a generic way to run code which might > > fail. > > + * @context: used to pass user data to the try and catch functions. > > + * > > + *

Re: [PATCH v2 08/17] kunit: test: add support for test abort

2019-05-02 Thread Logan Gunthorpe
On 2019-05-01 5:01 p.m., Brendan Higgins wrote: > +/* > + * struct kunit_try_catch - provides a generic way to run code which might > fail. > + * @context: used to pass user data to the try and catch functions. > + * > + * kunit_try_catch provides a generic, architecture independent way to > e

[PATCH v2 08/17] kunit: test: add support for test abort

2019-05-01 Thread Brendan Higgins
Add support for aborting/bailing out of test cases, which is needed for implementing assertions. An assertion is like an expectation, but bails out of the test case early if the assertion is not met. The idea with assertions is that you use them to state all the preconditions for your test. Logica