Home
last modified time | relevance | path

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

/linux-5.19.10/lib/kunit/
Dtry-catch.c17 void __noreturn kunit_try_catch_throw(struct kunit_try_catch *try_catch) in kunit_try_catch_throw() argument
19 try_catch->try_result = -EFAULT; in kunit_try_catch_throw()
20 kthread_complete_and_exit(try_catch->try_completion, -EFAULT); in kunit_try_catch_throw()
26 struct kunit_try_catch *try_catch = data; in kunit_generic_run_threadfn_adapter() local
28 try_catch->try(try_catch->context); in kunit_generic_run_threadfn_adapter()
30 kthread_complete_and_exit(try_catch->try_completion, 0); in kunit_generic_run_threadfn_adapter()
58 void kunit_try_catch_run(struct kunit_try_catch *try_catch, void *context) in kunit_try_catch_run() argument
61 struct kunit *test = try_catch->test; in kunit_try_catch_run()
65 try_catch->context = context; in kunit_try_catch_run()
66 try_catch->try_completion = &try_completion; in kunit_try_catch_run()
[all …]
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()
Dkunit-test.c13 struct kunit_try_catch *try_catch; member
35 struct kunit_try_catch *try_catch = ctx->try_catch; in kunit_test_try_catch_successful_try_no_catch() local
37 kunit_try_catch_init(try_catch, in kunit_test_try_catch_successful_try_no_catch()
41 kunit_try_catch_run(try_catch, test); in kunit_test_try_catch_successful_try_no_catch()
50 struct kunit_try_catch *try_catch = ctx->try_catch; in kunit_test_unsuccessful_try() local
52 kunit_try_catch_throw(try_catch); in kunit_test_unsuccessful_try()
67 struct kunit_try_catch *try_catch = ctx->try_catch; in kunit_test_try_catch_unsuccessful_try_does_catch() local
69 kunit_try_catch_init(try_catch, in kunit_test_try_catch_unsuccessful_try_does_catch()
73 kunit_try_catch_run(try_catch, test); in kunit_test_try_catch_unsuccessful_try_does_catch()
86 ctx->try_catch = kunit_kmalloc(test, in kunit_try_catch_test_init()
[all …]
Dtest.c273 kunit_try_catch_throw(&test->try_catch); /* Does not return. */ in kunit_abort()
388 int try_exit_code = kunit_try_catch_get_result(&test->try_catch); in kunit_catch_run_case()
425 struct kunit_try_catch *try_catch; in kunit_run_case_catch_errors() local
428 try_catch = &test->try_catch; in kunit_run_case_catch_errors()
430 kunit_try_catch_init(try_catch, in kunit_run_case_catch_errors()
437 kunit_try_catch_run(try_catch, &context); in kunit_run_case_catch_errors()
/linux-5.19.10/include/kunit/
Dtry-catch.h56 void kunit_try_catch_run(struct kunit_try_catch *try_catch, void *context);
58 void __noreturn kunit_try_catch_throw(struct kunit_try_catch *try_catch);
60 static inline int kunit_try_catch_get_result(struct kunit_try_catch *try_catch) in kunit_try_catch_get_result() argument
62 return try_catch->try_result; in kunit_try_catch_get_result()
Dtest.h202 struct kunit_try_catch try_catch; member
446 kunit_try_catch_throw(&((test_or_suite)->try_catch)); \
/linux-5.19.10/Documentation/dev-tools/kunit/
Darchitecture.rst125 ``void __noreturn kunit_try_catch_throw(struct kunit_try_catch *try_catch)``.
Dstyle.rst101 Part of the ``kunit`` implementation itself, testing the ``try_catch`` area.