Home
last modified time | relevance | path

Searched refs:try_catch (Results 1 – 8 of 8) sorted by relevance

/linux/lib/kunit/
H A Dtry-catch.c18 void __noreturn kunit_try_catch_throw(struct kunit_try_catch *try_catch) in kunit_try_catch_throw() argument
20 try_catch->try_result = -EFAULT; in kunit_try_catch_throw()
27 struct kunit_try_catch *try_catch = data; in kunit_generic_run_threadfn_adapter() local
29 try_catch->try_result = -EINTR; in kunit_generic_run_threadfn_adapter()
30 try_catch->try(try_catch->context); in kunit_generic_run_threadfn_adapter()
31 if (try_catch->try_result == -EINTR) in kunit_generic_run_threadfn_adapter()
32 try_catch->try_result = 0; in kunit_generic_run_threadfn_adapter()
62 void kunit_try_catch_run(struct kunit_try_catch *try_catch, void *context) in kunit_try_catch_run() argument
64 struct kunit *test = try_catch->test; in kunit_try_catch_run()
69 try_catch->context = context; in kunit_try_catch_run()
[all …]
H A Dtry-catch-impl.h17 static inline void kunit_try_catch_init(struct kunit_try_catch *try_catch, in kunit_try_catch_init() argument
22 try_catch->test = test; in kunit_try_catch_init()
23 try_catch->try = try; in kunit_try_catch_init()
24 try_catch->catch = catch; in kunit_try_catch_init()
H A Dkunit-test.c19 struct kunit_try_catch *try_catch; member
41 struct kunit_try_catch *try_catch = ctx->try_catch; in kunit_test_try_catch_successful_try_no_catch() local
43 kunit_try_catch_init(try_catch, in kunit_test_try_catch_successful_try_no_catch()
47 kunit_try_catch_run(try_catch, test); in kunit_test_try_catch_successful_try_no_catch()
56 struct kunit_try_catch *try_catch = ctx->try_catch; in kunit_test_unsuccessful_try() local
58 kunit_try_catch_throw(try_catch); in kunit_test_unsuccessful_try()
73 struct kunit_try_catch *try_catch = ctx->try_catch; in kunit_test_try_catch_unsuccessful_try_does_catch() local
75 kunit_try_catch_init(try_catch, in kunit_test_try_catch_unsuccessful_try_does_catch()
79 kunit_try_catch_run(try_catch, test); in kunit_test_try_catch_unsuccessful_try_does_catch()
92 ctx->try_catch = kunit_kmalloc(test, in kunit_try_catch_test_init()
[all …]
H A Dtest.c301 kunit_try_catch_throw(&test->try_catch); /* Does not return. */ in __kunit_abort()
461 int try_exit_code = kunit_try_catch_get_result(&test->try_catch); in kunit_catch_run_case_cleanup()
492 int try_exit_code = kunit_try_catch_get_result(&test->try_catch); in kunit_catch_run_case()
523 struct kunit_try_catch *try_catch; in kunit_run_case_catch_errors() local
525 try_catch = &test->try_catch; in kunit_run_case_catch_errors()
527 kunit_try_catch_init(try_catch, in kunit_run_case_catch_errors()
534 kunit_try_catch_run(try_catch, &context); in kunit_run_case_catch_errors()
537 kunit_try_catch_init(try_catch, in kunit_run_case_catch_errors()
541 kunit_try_catch_run(try_catch, &context); in kunit_run_case_catch_errors()
/linux/include/kunit/
H A Dtry-catch.h53 void kunit_try_catch_run(struct kunit_try_catch *try_catch, void *context);
55 void __noreturn kunit_try_catch_throw(struct kunit_try_catch *try_catch);
57 static inline int kunit_try_catch_get_result(struct kunit_try_catch *try_catch) in kunit_try_catch_get_result() argument
59 return try_catch->try_result; in kunit_try_catch_get_result()
H A Dtest.h283 struct kunit_try_catch try_catch; member
586 kunit_try_catch_throw(&((test_or_suite)->try_catch)); \
/linux/Documentation/dev-tools/kunit/
H A Darchitecture.rst125 ``void __noreturn kunit_try_catch_throw(struct kunit_try_catch *try_catch)``.
H A Dstyle.rst101 Part of the ``kunit`` implementation itself, testing the ``try_catch`` area.