Home
last modified time | relevance | path

Searched refs:kunit (Results 1 – 25 of 298) sorted by relevance

12345678910>>...12

/linux/include/kunit/
H A Dresource.h153 int __kunit_add_resource(struct kunit *test,
169 static inline int kunit_add_resource(struct kunit *test, in kunit_add_resource()
180 kunit_find_named_resource(struct kunit *test, const char *name);
191 static inline int kunit_add_named_resource(struct kunit *test, in kunit_add_named_resource()
237 kunit_alloc_and_get_resource(struct kunit *test, in kunit_alloc_and_get_resource()
280 static inline void *kunit_alloc_resource(struct kunit *test, in kunit_alloc_resource()
299 typedef bool (*kunit_resource_match_t)(struct kunit *test,
309 static inline bool kunit_resource_name_match(struct kunit *test, in kunit_resource_name_match()
323 kunit_find_resource(struct kunit *test, in kunit_find_resource()
351 kunit_find_named_resource(struct kunit *test, in kunit_find_named_resource()
[all …]
H A Dclk.h10 struct kunit;
13 clk_get_kunit(struct kunit *test, struct device *dev, const char *con_id);
15 of_clk_get_kunit(struct kunit *test, struct device_node *np, int index);
18 clk_hw_get_clk_kunit(struct kunit *test, struct clk_hw *hw, const char *con_id);
20 clk_hw_get_clk_prepared_enabled_kunit(struct kunit *test, struct clk_hw *hw,
23 int clk_prepare_enable_kunit(struct kunit *test, struct clk *clk);
25 int clk_hw_register_kunit(struct kunit *test, struct device *dev, struct clk_hw *hw);
26 int of_clk_hw_register_kunit(struct kunit *test, struct device_node *node,
29 int of_clk_add_hw_provider_kunit(struct kunit *test, struct device_node *np,
/linux/sound/soc/
H A Dsoc-topology-test.c25 static int snd_soc_tplg_test_init(struct kunit *test) in snd_soc_tplg_test_init()
35 static void snd_soc_tplg_test_exit(struct kunit *test) in snd_soc_tplg_test_exit()
46 struct kunit *kunit; member
60 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret, in d_probe()
73 KUNIT_EXPECT_EQ(kunit_comp->kunit, 0, ret); in d_remove()
223 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret, in d_probe_null_comp()
234 static void snd_soc_tplg_test_load_with_null_comp(struct kunit *test) in snd_soc_tplg_test_load_with_null_comp()
242 kunit_comp->kunit = test; in snd_soc_tplg_test_load_with_null_comp()
276 static void snd_soc_tplg_test_load_with_null_ops(struct kunit *test) in snd_soc_tplg_test_load_with_null_ops()
284 kunit_comp->kunit = test; in snd_soc_tplg_test_load_with_null_ops()
[all …]
/linux/lib/kunit/
H A Dkunit-example-test.c22 static void example_simple_test(struct kunit *test) 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()
[all …]
H A Dkunit-test.c26 struct kunit *test = data; in kunit_test_successful_try()
34 struct kunit *test = data; in kunit_test_no_catch()
39 static void kunit_test_try_catch_successful_try_no_catch(struct kunit *test) in kunit_test_try_catch_successful_try_no_catch()
56 struct kunit *test = data; in kunit_test_unsuccessful_try()
66 struct kunit *test = data; in kunit_test_catch()
72 static void kunit_test_try_catch_unsuccessful_try_does_catch(struct kunit *test) in kunit_test_try_catch_unsuccessful_try_does_catch()
87 static int kunit_try_catch_test_init(struct kunit *test) in kunit_try_catch_test_init()
119 struct kunit *test = data; in kunit_test_null_dereference()
127 static void kunit_test_fault_null_dereference(struct kunit *test) in kunit_test_fault_null_dereference()
163 struct kunit test;
[all …]
H A Dtest.c108 static void kunit_print_test_stats(struct kunit *test, in kunit_print_test_stats()
175 static void kunit_print_ok_not_ok(struct kunit *test, in kunit_print_ok_not_ok()
258 static void kunit_print_string_stream(struct kunit *test, in kunit_print_string_stream()
281 static void kunit_fail(struct kunit *test, const struct kunit_loc *loc, in kunit_fail()
306 void __noreturn __kunit_abort(struct kunit *test) in __kunit_abort()
320 void __kunit_do_failed_assertion(struct kunit *test, in __kunit_do_failed_assertion()
340 static void kunit_init_params(struct kunit *test) in kunit_init_params()
348 void kunit_init_test(struct kunit *test, const char *name, struct string_stream *log) in kunit_init_test()
373 static void kunit_run_case_check_speed(struct kunit *test, in kunit_run_case_check_speed()
429 static void kunit_run_case_internal(struct kunit *test, in kunit_run_case_internal()
[all …]
/linux/mm/kasan/
H A Dkasan_test_c.c91 static void kasan_test_exit(struct kunit *test) in kasan_test_exit()
198 static void kmalloc_oob_right(struct kunit *test) in kmalloc_oob_right()
227 static void kmalloc_oob_left(struct kunit *test) in kmalloc_oob_left()
240 static void kmalloc_node_oob_right(struct kunit *test) in kmalloc_node_oob_right()
253 static void kmalloc_track_caller_oob_right(struct kunit *test) in kmalloc_track_caller_oob_right()
287 static void kmalloc_big_oob_right(struct kunit *test) in kmalloc_big_oob_right()
306 static void kmalloc_large_oob_right(struct kunit *test) in kmalloc_large_oob_right()
320 static void kmalloc_large_uaf(struct kunit *test) in kmalloc_large_uaf()
332 static void kmalloc_large_invalid_free(struct kunit *test) in kmalloc_large_invalid_free()
343 static void page_alloc_oob_right(struct kunit *test) in page_alloc_oob_right()
[all …]
/linux/Documentation/dev-tools/kunit/
H A Drunning_tips.rst7 Using ``kunit.py run`` ("kunit tool")
18 ( cd "$(git rev-parse --show-toplevel)" && ./tools/testing/kunit/kunit.py run "$@" )
22 Early versions of ``kunit.py`` (before 5.6) didn't work unless run from
28 ``kunit.py run`` accepts an optional glob argument to filter tests. The format
35 $ echo -e 'CONFIG_KUNIT=y\nCONFIG_KUNIT_ALL_TESTS=y' > .kunit/.kunitconfig
36 $ ./tools/testing/kunit/kunit.py run 'sysctl*'
42 $ echo -e 'CONFIG_KUNIT=y\nCONFIG_KUNIT_ALL_TESTS=y' > .kunit/.kunitconfig
43 $ ./tools/testing/kunit/kunit.py run 'sysctl*.*write*'
55 ``kunit.py run`` (along with ``build``, and ``config``) supports a
60 E.g. kunit has one for its tests:
[all …]
H A Dstart.rst24 ./tools/testing/kunit/kunit.py run
30 This happens because internally kunit.py specifies ``.kunit``
57 Documentation/dev-tools/kunit/run_wrapper.rst.
72 If you didn't run ``kunit.py run`` yet, you can generate it by running:
77 tools/testing/kunit/kunit.py config
78 cat .kunit/.kunitconfig
81 ``.kunitconfig`` lives in the ``--build_dir`` used by kunit.py, which is
82 ``.kunit`` by default.
90 a. Edit ``.kunit/.kunitconfig``. The file should contain the list of kconfig
94 If you need to run on an architecture other than UML see :ref:`kunit-on-qemu`.
[all …]
H A Drun_wrapper.rst9 manually, see: Documentation/dev-tools/kunit/run_manual.rst.
19 ./tools/testing/kunit/kunit.py run
33 ./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all`
53 ./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig
59 ./tools/testing/kunit/kunit.py run --help
67 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/kunit/configs…
81 cp tools/testing/kunit/configs/default.config .kunit/.kunitconfig
99 work, therefore by default use ``make O=.kunit menuconfig``.
111 ./tools/testing/kunit/kunit.py config
118 ./tools/testing/kunit/kunit.py build
[all …]
/linux/lib/tests/
H A Dprintf_kunit.c6 #include <kunit/test.h>
42 do_test(struct kunit *kunittest, const char *file, const int line, int bufsize, const char *expect, in do_test()
109 __test(struct kunit *kunittest, const char *file, const int line, const char *expect, int elen, in __test()
154 test_basic(struct kunit *kunittest) in test_basic()
166 test_number(struct kunit *kunittest) in test_number()
188 test_string(struct kunit *kunittest) in test_string()
237 plain_hash_to_buffer(struct kunit *kunittest, const void *p, char *buf, size_t len) in plain_hash_to_buffer()
249 hash_pointer(struct kunit *kunittest) in hash_pointer()
285 null_pointer(struct kunit *kunittest) in null_pointer()
296 error_pointer(struct kunit *kunittes in error_pointer()
[all...]
H A Dlist-test.c18 static void list_test_list_init(struct kunit *test) in list_test_list_init()
47 static void list_test_list_add(struct kunit *test) in list_test_list_add()
61 static void list_test_list_add_tail(struct kunit *test) in list_test_list_add_tail()
75 static void list_test_list_del(struct kunit *test) in list_test_list_del()
91 static void list_test_list_replace(struct kunit *test) in list_test_list_replace()
109 static void list_test_list_replace_init(struct kunit *test) in list_test_list_replace_init()
130 static void list_test_list_swap(struct kunit *test) in list_test_list_swap()
152 static void list_test_list_del_init(struct kunit *test) in list_test_list_del_init()
169 static void list_test_list_del_init_careful(struct kunit *test) in list_test_list_del_init_careful()
189 static void list_test_list_move(struct kunit *test) in list_test_list_move()
[all …]
H A Dffs_kunit.c102 static void validate_ffs_result(struct kunit *test, unsigned long input, in validate_ffs_result()
114 static void validate_ffs64_result(struct kunit *test, u64 input, in validate_ffs64_result()
126 static void validate_ffs_relationships(struct kunit *test, unsigned long input) in validate_ffs_relationships()
166 static void validate_ffs64_relationships(struct kunit *test, u64 input) in validate_ffs64_relationships()
207 static void ffs_basic_correctness_test(struct kunit *test) in ffs_basic_correctness_test()
243 static void ffs64_correctness_test(struct kunit *test) in ffs64_correctness_test()
266 static void ffs_mathematical_relationships_test(struct kunit *test) in ffs_mathematical_relationships_test()
284 static void ffs_edge_cases_test(struct kunit *test) in ffs_edge_cases_test()
310 static void ffs64_edge_cases_test(struct kunit *test) in ffs64_edge_cases_test()
382 static void ffz_basic_correctness_test(struct kunit *test) in ffz_basic_correctness_test()
[all …]
/linux/include/drm/
H A Ddrm_kunit_helpers.h18 struct kunit;
20 struct device *drm_kunit_helper_alloc_device(struct kunit *test);
21 void drm_kunit_helper_free_device(struct kunit *test, struct device *dev);
24 __drm_kunit_helper_alloc_drm_device_with_driver(struct kunit *test,
56 __drm_kunit_helper_alloc_drm_device(struct kunit *test, in __drm_kunit_helper_alloc_drm_device()
101 drm_kunit_helper_atomic_state_alloc(struct kunit *test,
106 drm_kunit_helper_create_primary_plane(struct kunit *test,
115 drm_kunit_helper_create_crtc(struct kunit *test,
122 int drm_kunit_helper_enable_crtc_connector(struct kunit *test,
129 int drm_kunit_add_mode_destroy_action(struct kunit *test,
[all …]
/linux/mm/kmsan/
H A Dkmsan_test.c165 static void test_uninit_kmalloc(struct kunit *test) in test_uninit_kmalloc()
179 static void test_init_kmalloc(struct kunit *test) in test_init_kmalloc()
192 static void test_init_kzalloc(struct kunit *test) in test_init_kzalloc()
204 static void test_uninit_stack_var(struct kunit *test) in test_uninit_stack_var()
215 static void test_init_stack_var(struct kunit *test) in test_init_stack_var()
246 static void test_params(struct kunit *test) in test_params()
274 static void test_uninit_multiple_params(struct kunit *test) in test_uninit_multiple_params()
298 static void test_uninit_kmsan_check_memory(struct kunit *test) in test_uninit_kmsan_check_memory()
316 static void test_init_kmsan_vmap_vunmap(struct kunit *test) in test_init_kmsan_vmap_vunmap()
347 static void test_init_vmalloc(struct kunit *test) in test_init_vmalloc()
[all …]
/linux/drivers/gpu/drm/vc4/tests/
H A Dvc4_mock.h9 struct drm_crtc *vc4_find_crtc_for_encoder(struct kunit *test, in vc4_find_crtc_for_encoder()
24 struct drm_plane *vc4_dummy_plane(struct kunit *test, struct drm_device *drm,
31 struct vc4_dummy_crtc *vc4_mock_pv(struct kunit *test,
44 struct vc4_dummy_output *vc4_dummy_output(struct kunit *test,
51 struct vc4_dev *vc4_mock_device(struct kunit *test);
52 struct vc4_dev *vc5_mock_device(struct kunit *test);
54 int vc4_mock_atomic_add_output(struct kunit *test,
57 int vc4_mock_atomic_del_output(struct kunit *test,
/linux/lib/crc/tests/
H A Dcrc_kunit.c176 static void crc_interrupt_context_test(struct kunit *test, in crc_interrupt_context_test()
194 static void crc_test(struct kunit *test, const struct crc_variant *v) in crc_test()
234 crc_benchmark(struct kunit *test, in crc_benchmark()
288 static void crc7_be_test(struct kunit *test) in crc7_be_test()
293 static void crc7_be_benchmark(struct kunit *test) in crc7_be_benchmark()
312 static void crc16_test(struct kunit *test) in crc16_test()
317 static void crc16_benchmark(struct kunit *test) in crc16_benchmark()
336 static void crc_t10dif_test(struct kunit *test) in crc_t10dif_test()
341 static void crc_t10dif_benchmark(struct kunit *test) in crc_t10dif_benchmark()
360 static void crc32_le_test(struct kunit *test) in crc32_le_test()
[all …]
/linux/security/apparmor/
H A Dpolicy_unpack_test.c57 struct kunit *test, size_t buf_size) in build_aa_ext_struct()
113 static int policy_unpack_test_init(struct kunit *test) in policy_unpack_test_init()
128 static void policy_unpack_test_inbounds_when_inbounds(struct kunit *test) in policy_unpack_test_inbounds_when_inbounds()
137 static void policy_unpack_test_inbounds_when_out_of_bounds(struct kunit *test) in policy_unpack_test_inbounds_when_out_of_bounds()
144 static void policy_unpack_test_unpack_array_with_null_name(struct kunit *test) in policy_unpack_test_unpack_array_with_null_name()
157 static void policy_unpack_test_unpack_array_with_name(struct kunit *test) in policy_unpack_test_unpack_array_with_name()
171 static void policy_unpack_test_unpack_array_out_of_bounds(struct kunit *test) in policy_unpack_test_unpack_array_out_of_bounds()
185 static void policy_unpack_test_unpack_blob_with_null_name(struct kunit *test) in policy_unpack_test_unpack_blob_with_null_name()
199 static void policy_unpack_test_unpack_blob_with_name(struct kunit *test) in policy_unpack_test_unpack_blob_with_name()
213 static void policy_unpack_test_unpack_blob_out_of_bounds(struct kunit *test) in policy_unpack_test_unpack_blob_out_of_bounds()
[all …]
/linux/drivers/clk/
H A Dclk-gate_test.c11 static void clk_gate_register_test_dev(struct kunit *test) in clk_gate_register_test_dev()
29 static void clk_gate_register_test_parent_names(struct kunit *test) in clk_gate_register_test_parent_names()
47 static void clk_gate_register_test_parent_data(struct kunit *test) in clk_gate_register_test_parent_data()
67 static void clk_gate_register_test_parent_data_legacy(struct kunit *test) in clk_gate_register_test_parent_data_legacy()
87 static void clk_gate_register_test_parent_hw(struct kunit *test) in clk_gate_register_test_parent_hw()
105 static void clk_gate_register_test_hiword_invalid(struct kunit *test) in clk_gate_register_test_hiword_invalid()
137 static struct clk_gate_test_context *clk_gate_test_alloc_ctx(struct kunit *test) in clk_gate_test_alloc_ctx()
148 static void clk_gate_test_parent_rate(struct kunit *test) in clk_gate_test_parent_rate()
159 static void clk_gate_test_enable(struct kunit *test) in clk_gate_test_enable()
176 static void clk_gate_test_disable(struct kunit *test) in clk_gate_test_disable()
[all …]
H A Dclk_kunit_helpers.c23 int clk_prepare_enable_kunit(struct kunit *test, struct clk *clk) in clk_prepare_enable_kunit()
38 static struct clk *__clk_get_kunit(struct kunit *test, struct clk *clk) in __clk_get_kunit()
64 clk_get_kunit(struct kunit *test, struct device *dev, const char *con_id) in clk_get_kunit()
86 of_clk_get_kunit(struct kunit *test, struct device_node *np, int index) in of_clk_get_kunit()
108 clk_hw_get_clk_kunit(struct kunit *test, struct clk_hw *hw, const char *con_id) in clk_hw_get_clk_kunit()
138 clk_hw_get_clk_prepared_enabled_kunit(struct kunit *test, struct clk_hw *hw, in clk_hw_get_clk_prepared_enabled_kunit()
170 int clk_hw_register_kunit(struct kunit *test, struct device *dev, struct clk_hw *hw) in clk_hw_register_kunit()
194 int of_clk_hw_register_kunit(struct kunit *test, struct device_node *node, struct clk_hw *hw) in of_clk_hw_register_kunit()
222 int of_clk_add_hw_provider_kunit(struct kunit *test, struct device_node *np, in of_clk_add_hw_provider_kunit()
/linux/security/landlock/
H A Did.c44 static void __init test_init_min(struct kunit *const test) in test_init_min()
52 static void __init test_init_max(struct kunit *const test) in test_init_max()
60 static void __init test_init_once(struct kunit *const test) in test_init_once()
128 static void test_range1_rand0(struct kunit *const test) in test_range1_rand0()
142 static void test_range1_rand1(struct kunit *const test) in test_range1_rand1()
156 static void test_range1_rand15(struct kunit *const test) in test_range1_rand15()
170 static void test_range1_rand16(struct kunit *const test) in test_range1_rand16()
184 static void test_range2_rand0(struct kunit *const test) in test_range2_rand0()
198 static void test_range2_rand1(struct kunit *const test) in test_range2_rand1()
212 static void test_range2_rand2(struct kunit *const test) in test_range2_rand2()
[all …]
/linux/drivers/gpu/drm/xe/tests/
H A Dxe_guc_relay_test.c25 static int relay_test_init(struct kunit *test) in relay_test_init()
65 struct kunit *test = kunit_get_current_test(); in replacement_xe_guc_ct_send_recv_always_fails()
78 struct kunit *test = kunit_get_current_test(); in replacement_xe_guc_ct_send_recv_expects_pf2guc_relay()
120 static void pf_rejects_guc2pf_too_short(struct kunit *test) in pf_rejects_guc2pf_too_short()
129 static void pf_rejects_guc2pf_too_long(struct kunit *test) in pf_rejects_guc2pf_too_long()
138 static void pf_rejects_guc2pf_no_payload(struct kunit *test) in pf_rejects_guc2pf_no_payload()
147 static void pf_fails_no_payload(struct kunit *test) in pf_fails_no_payload()
155 static void pf_fails_bad_origin(struct kunit *test) in pf_fails_bad_origin()
167 static void pf_fails_bad_type(struct kunit *test) in pf_fails_bad_type()
179 static void pf_txn_reports_error(struct kunit *test) in pf_txn_reports_error()
[all …]
/linux/drivers/pinctrl/qcom/
H A Dtlmm-test.c145 static void tlmm_test_request_hard_irq(struct kunit *test, unsigned long irqflags) in tlmm_test_request_hard_irq()
154 static void tlmm_test_request_threaded_irq(struct kunit *test, unsigned long irqflags) in tlmm_test_request_threaded_irq()
166 static void tlmm_test_silent(struct kunit *test, unsigned long irqflags) in tlmm_test_silent()
188 static void tlmm_test_silent_rising(struct kunit *test) in tlmm_test_silent_rising()
196 static void tlmm_test_silent_falling(struct kunit *test) in tlmm_test_silent_falling()
204 static void tlmm_test_silent_low(struct kunit *test) in tlmm_test_silent_low()
212 static void tlmm_test_silent_high(struct kunit *test) in tlmm_test_silent_high()
220 static void tlmm_test_rising(struct kunit *test) in tlmm_test_rising()
245 static void tlmm_test_falling(struct kunit *test) in tlmm_test_falling()
270 static void tlmm_test_low(struct kunit *test) in tlmm_test_low()
[all …]
/linux/kernel/events/
H A Dhw_breakpoint_test.c65 static void fill_one_bp_slot(struct kunit *test, int *id, int cpu, struct task_struct *tsk) in fill_one_bp_slot()
80 static bool fill_bp_slots(struct kunit *test, int *id, int cpu, struct task_struct *tsk, int skip) in fill_bp_slots()
93 static struct task_struct *get_other_task(struct kunit *test) in get_other_task()
122 static void test_one_cpu(struct kunit *test) in test_one_cpu()
131 static void test_many_cpus(struct kunit *test) in test_many_cpus()
146 static void test_one_task_on_all_cpus(struct kunit *test) in test_one_task_on_all_cpus()
159 static void test_two_tasks_on_all_cpus(struct kunit *test) in test_two_tasks_on_all_cpus()
177 static void test_one_task_on_one_cpu(struct kunit *test) in test_one_task_on_one_cpu()
193 static void test_one_task_mixed(struct kunit *test) in test_one_task_mixed()
213 static void test_two_tasks_on_one_cpu(struct kunit *test) in test_two_tasks_on_one_cpu()
[all …]
/linux/drivers/iommu/generic_pt/
H A Dkunit_generic_pt.h11 static void do_map(struct kunit *test, pt_vaddr_t va, pt_oaddr_t pa, in do_map()
31 struct kunit *test;
33 void (*fn)(struct kunit *test, struct pt_state *pts, void *arg);
41 struct kunit *test = chk->test; in __check_all_levels()
103 static void check_all_levels(struct kunit *test, in check_all_levels()
104 void (*fn)(struct kunit *test, in check_all_levels()
136 static void test_init(struct kunit *test) in test_init()
148 static void test_bitops(struct kunit *test) in test_bitops()
208 static void test_best_pgsize(struct kunit *test) in test_best_pgsize()
318 static void test_lvl_table_ptr(struct kunit *test, struct pt_state *pts, in test_lvl_table_ptr()
[all …]

12345678910>>...12