Lines Matching full:kunit

3  * Example KUnit test to show how to use KUnit.
9 #include <kunit/test.h>
10 #include <kunit/static_stub.h>
13 * This is the most fundamental element of KUnit, the test case. A test case
18 * In KUnit, a test case is just a function with the signature
19 * `void (*)(struct kunit *)`. `struct kunit` is a context object that stores
22 static void example_simple_test(struct kunit *test) in example_simple_test()
25 * This is an EXPECTATION; it is how KUnit tests things. When you want in example_simple_test()
27 * code should do. KUnit then runs the test and verifies that the code's in example_simple_test()
37 static int example_test_init(struct kunit *test) in example_test_init()
48 static void example_test_exit(struct kunit *test) in example_test_exit()
78 static void example_skip_test(struct kunit *test) in example_skip_test()
93 static void example_mark_skipped_test(struct kunit *test) in example_mark_skipped_test()
108 static void example_all_expect_macros_test(struct kunit *test) in example_all_expect_macros_test()
184 static void example_static_stub_test(struct kunit *test) in example_static_stub_test()
208 static void example_static_stub_using_fn_ptr_test(struct kunit *test) in example_static_stub_using_fn_ptr_test()
243 static void example_params_test(struct kunit *test) in example_params_test()
261 static void example_priv_test(struct kunit *test) in example_priv_test()
275 static void example_slow_test(struct kunit *test) in example_slow_test()
307 static bool example_resource_alloc_match(struct kunit *test, in example_resource_alloc_match()
318 static void example_param_array_get_desc(struct kunit *test, const void *p, char *desc) in example_param_array_get_desc()
328 * struct kunit belonging to the parameterized test. You can use this function
332 static int example_param_init(struct kunit *test) in example_param_init()
339 * ctx, and adds it to the struct kunit's resources list. Note that in example_param_init()
351 * struct kunit. Note that you will need to provide kunit_array_gen_params() in example_param_init()
364 static void example_params_test_with_init(struct kunit *test) in example_params_test_with_init()
399 static void *make_fibonacci_params(struct kunit *test, size_t seq_size) in make_fibonacci_params()
408 * by KUnit after the parameterized test finishes. in make_fibonacci_params()
427 static void example_param_dynamic_arr_get_desc(struct kunit *test, const void *p, char *desc) in example_param_dynamic_arr_get_desc()
438 static int example_param_init_dynamic_arr(struct kunit *test) in example_param_init_dynamic_arr()
453 * context struct kunit. The array and its metadata will be stored in in example_param_init_dynamic_arr()
471 static void example_param_exit_dynamic_arr(struct kunit *test) in example_param_exit_dynamic_arr()
480 static void example_params_test_with_init_dynamic_arr(struct kunit *test) in example_params_test_with_init_dynamic_arr()
500 * use KUnit, just know that this is how you associate test cases with a
552 * This registers the above test suite telling KUnit that this is a suite of
565 static void __init example_init_test(struct kunit *test) in example_init_test()
594 MODULE_DESCRIPTION("Example KUnit test suite");