path: root/include/kunit/try-catch.h
Commit message (Collapse)AuthorAgeFilesLines
* kunit: hide unexported try-catch interface in try-catch-impl.hAlan Maguire2020-01-091-10/+0
| | | | | | | | | | | | | Define function as static inline in try-catch-impl.h to allow it to be used in kunit itself and tests. Also remove unused kunit_generic_try_catch Co-developed-by: Knut Omang <> Signed-off-by: Knut Omang <> Signed-off-by: Alan Maguire <> Reviewed-by: Brendan Higgins <> Tested-by: Brendan Higgins <> Signed-off-by: Shuah Khan <>
* kunit: test: add support for test abortBrendan Higgins2019-09-301-0/+75
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. Logically speaking, these are the premises of the test case, so if a premise isn't true, there is no point in continuing the test case because there are no conclusions that can be drawn without the premises. Whereas, the expectation is the thing you are trying to prove. Signed-off-by: Brendan Higgins <> Reviewed-by: Greg Kroah-Hartman <> Reviewed-by: Logan Gunthorpe <> Reviewed-by: Stephen Boyd <> Signed-off-by: Shuah Khan <>