/openbmc/linux/include/kunit/ |
H A D | resource.h | 153 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 …]
|
/openbmc/linux/sound/soc/ |
H A D | soc-topology-test.c | 28 static int snd_soc_tplg_test_init(struct kunit *test) in snd_soc_tplg_test_init() 40 static void snd_soc_tplg_test_exit(struct kunit *test) in snd_soc_tplg_test_exit() 52 struct kunit *kunit; member 66 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret, in d_probe() 79 KUNIT_EXPECT_EQ(kunit_comp->kunit, 0, ret); in d_remove() 231 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret, in d_probe_null_comp() 242 static void snd_soc_tplg_test_load_with_null_comp(struct kunit *test) in snd_soc_tplg_test_load_with_null_comp() 250 kunit_comp->kunit = test; in snd_soc_tplg_test_load_with_null_comp() 284 static void snd_soc_tplg_test_load_with_null_ops(struct kunit *test) in snd_soc_tplg_test_load_with_null_ops() 292 kunit_comp->kunit = test; in snd_soc_tplg_test_load_with_null_ops() [all …]
|
/openbmc/linux/mm/kasan/ |
H A D | kasan_test.c | 88 static void kasan_test_exit(struct kunit *test) in kasan_test_exit() 159 static void kmalloc_oob_right(struct kunit *test) in kmalloc_oob_right() 188 static void kmalloc_oob_left(struct kunit *test) in kmalloc_oob_left() 201 static void kmalloc_node_oob_right(struct kunit *test) in kmalloc_node_oob_right() 220 static void kmalloc_pagealloc_oob_right(struct kunit *test) in kmalloc_pagealloc_oob_right() 236 static void kmalloc_pagealloc_uaf(struct kunit *test) in kmalloc_pagealloc_uaf() 250 static void kmalloc_pagealloc_invalid_free(struct kunit *test) in kmalloc_pagealloc_invalid_free() 263 static void pagealloc_oob_right(struct kunit *test) in pagealloc_oob_right() 285 static void pagealloc_uaf(struct kunit *test) in pagealloc_uaf() 299 static void kmalloc_large_oob_right(struct kunit *test) in kmalloc_large_oob_right() [all …]
|
/openbmc/linux/Documentation/dev-tools/kunit/ |
H A D | start.rst | 24 ./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 D | running_tips.rst | 7 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 D | run_wrapper.rst | 9 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 …]
|
H A D | faq.rst | 34 (``tools/testing/kunit/kunit.py``) that might not support some architectures 35 (see :ref:`kunit-on-qemu`). 40 For more information, see :ref:`kunit-on-non-uml`. 73 1. Run ``./tools/testing/kunit/kunit.py run`` with the ``--raw_output`` 76 2. Instead of running ``kunit.py run``, try running ``kunit.py config``, 77 ``kunit.py build``, and ``kunit.py exec`` independently. This can help track 79 can run it manually against ``stdin`` or a file with ``kunit.py parse``.) 82 after building the UML kernel (for example, by using ``kunit.py build``). 89 around, so you can see what config was used after running ``kunit.py run``. 93 5. Try to run ``make ARCH=um defconfig`` before running ``kunit.py run``. This [all …]
|
/openbmc/linux/lib/kunit/ |
H A D | kunit-test.c | 20 struct kunit *test = data; in kunit_test_successful_try() 28 struct kunit *test = data; in kunit_test_no_catch() 33 static void kunit_test_try_catch_successful_try_no_catch(struct kunit *test) in kunit_test_try_catch_successful_try_no_catch() 49 struct kunit *test = data; in kunit_test_unsuccessful_try() 59 struct kunit *test = data; in kunit_test_catch() 65 static void kunit_test_try_catch_unsuccessful_try_does_catch(struct kunit *test) in kunit_test_try_catch_unsuccessful_try_does_catch() 79 static int kunit_try_catch_test_init(struct kunit *test) in kunit_try_catch_test_init() 112 struct kunit test; 134 static void kunit_resource_test_init_resources(struct kunit *test) in kunit_resource_test_init_resources() 143 static void kunit_resource_test_alloc_resource(struct kunit *test) in kunit_resource_test_alloc_resource() [all …]
|
H A D | kunit-example-test.c | 22 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() 174 static void example_static_stub_test(struct kunit *test) in example_static_stub_test() 208 static void example_params_test(struct kunit *test) in example_params_test() 226 static void example_slow_test(struct kunit *test) in example_slow_test()
|
H A D | Makefile | 1 obj-$(CONFIG_KUNIT) += kunit.o 3 kunit-objs += test.o \ 13 kunit-objs += debugfs.o 19 obj-$(CONFIG_KUNIT_TEST) += kunit-test.o 26 obj-$(CONFIG_KUNIT_EXAMPLE_TEST) += kunit-example-test.o
|
H A D | executor_test.c | 12 static void free_suite_set_at_end(struct kunit *test, const void *to_free); 13 static struct kunit_suite *alloc_fake_suite(struct kunit *test, 17 static void dummy_test(struct kunit *test) {} in dummy_test() 26 static void parse_filter_test(struct kunit *test) in parse_filter_test() 43 static void filter_suites_test(struct kunit *test) in filter_suites_test() 69 static void filter_suites_test_glob_test(struct kunit *test) in filter_suites_test_glob_test() 98 static void filter_suites_to_empty_test(struct kunit *test) in filter_suites_to_empty_test() 118 static void parse_filter_attr_test(struct kunit *test) in parse_filter_attr_test() 150 static void filter_attr_test(struct kunit *test) in filter_attr_test() 188 static void filter_attr_empty_test(struct kunit *test) in filter_attr_empty_test() [all …]
|
H A D | resource.c | 19 int __kunit_add_resource(struct kunit *test, in __kunit_add_resource() 48 void kunit_remove_resource(struct kunit *test, struct kunit_resource *res) in kunit_remove_resource() 63 int kunit_destroy_resource(struct kunit *test, kunit_resource_match_t match, in kunit_destroy_resource() 95 int kunit_add_action(struct kunit *test, void (*action)(void *), void *ctx) in kunit_add_action() 116 int kunit_add_action_or_reset(struct kunit *test, void (*action)(void *), in kunit_add_action_or_reset() 127 static bool __kunit_action_match(struct kunit *test, in __kunit_action_match() 141 void kunit_remove_action(struct kunit *test, in kunit_remove_action() 161 void kunit_release_action(struct kunit *test, in kunit_release_action()
|
H A D | test.c | 97 static void kunit_print_test_stats(struct kunit *test, in kunit_print_test_stats() 198 static void kunit_print_ok_not_ok(struct kunit *test, in kunit_print_ok_not_ok() 281 static void kunit_print_string_stream(struct kunit *test, in kunit_print_string_stream() 304 static void kunit_fail(struct kunit *test, const struct kunit_loc *loc, in kunit_fail() 329 void __noreturn __kunit_abort(struct kunit *test) in __kunit_abort() 343 void __kunit_do_failed_assertion(struct kunit *test, in __kunit_do_failed_assertion() 363 void kunit_init_test(struct kunit *test, const char *name, char *log) in kunit_init_test() 387 static void kunit_run_case_check_speed(struct kunit *test, in kunit_run_case_check_speed() 409 static void kunit_run_case_internal(struct kunit *test, in kunit_run_case_internal() 435 static void kunit_case_internal_cleanup(struct kunit *test) in kunit_case_internal_cleanup() [all …]
|
/openbmc/linux/drivers/gpu/drm/vc4/tests/ |
H A D | vc4_mock.h | 9 struct drm_crtc *vc4_find_crtc_for_encoder(struct kunit *test, in vc4_find_crtc_for_encoder() 28 struct vc4_dummy_plane *vc4_dummy_plane(struct kunit *test, 36 struct vc4_dummy_crtc *vc4_mock_pv(struct kunit *test, 49 struct vc4_dummy_output *vc4_dummy_output(struct kunit *test, 56 struct vc4_dev *vc4_mock_device(struct kunit *test); 57 struct vc4_dev *vc5_mock_device(struct kunit *test); 59 int vc4_mock_atomic_add_output(struct kunit *test, 62 int vc4_mock_atomic_del_output(struct kunit *test,
|
/openbmc/linux/lib/ |
H A D | list-test.c | 18 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() 107 static void list_test_list_replace_init(struct kunit *test) in list_test_list_replace_init() 126 static void list_test_list_swap(struct kunit *test) in list_test_list_swap() 148 static void list_test_list_del_init(struct kunit *test) in list_test_list_del_init() 165 static void list_test_list_del_init_careful(struct kunit *test) in list_test_list_del_init_careful() 185 static void list_test_list_move(struct kunit *test) in list_test_list_move() [all …]
|
/openbmc/linux/mm/kmsan/ |
H A D | kmsan_test.c | 154 static void test_uninit_kmalloc(struct kunit *test) in test_uninit_kmalloc() 168 static void test_init_kmalloc(struct kunit *test) in test_init_kmalloc() 181 static void test_init_kzalloc(struct kunit *test) in test_init_kzalloc() 193 static void test_uninit_stack_var(struct kunit *test) in test_uninit_stack_var() 204 static void test_init_stack_var(struct kunit *test) in test_init_stack_var() 235 static void test_params(struct kunit *test) in test_params() 263 static void test_uninit_multiple_params(struct kunit *test) in test_uninit_multiple_params() 287 static void test_uninit_kmsan_check_memory(struct kunit *test) in test_uninit_kmsan_check_memory() 305 static void test_init_kmsan_vmap_vunmap(struct kunit *test) in test_init_kmsan_vmap_vunmap() 336 static void test_init_vmalloc(struct kunit *test) in test_init_vmalloc() [all …]
|
/openbmc/linux/drivers/gpu/drm/ttm/tests/ |
H A D | ttm_kunit_helpers.h | 28 struct ttm_buffer_object *ttm_bo_kunit_init(struct kunit *test, 32 struct ttm_test_devices *ttm_test_devices_basic(struct kunit *test); 33 struct ttm_test_devices *ttm_test_devices_all(struct kunit *test); 35 void ttm_test_devices_put(struct kunit *test, struct ttm_test_devices *devs); 38 int ttm_test_devices_init(struct kunit *test); 39 void ttm_test_devices_fini(struct kunit *test);
|
/openbmc/linux/include/drm/ |
H A D | drm_kunit_helpers.h | 13 struct kunit; 15 struct device *drm_kunit_helper_alloc_device(struct kunit *test); 16 void drm_kunit_helper_free_device(struct kunit *test, struct device *dev); 19 __drm_kunit_helper_alloc_drm_device_with_driver(struct kunit *test, 51 __drm_kunit_helper_alloc_drm_device(struct kunit *test, in __drm_kunit_helper_alloc_drm_device() 95 drm_kunit_helper_acquire_ctx_alloc(struct kunit *test); 98 drm_kunit_helper_atomic_state_alloc(struct kunit *test,
|
/openbmc/linux/security/apparmor/ |
H A D | policy_unpack_test.c | 55 struct kunit *test, size_t buf_size) in build_aa_ext_struct() 111 static int policy_unpack_test_init(struct kunit *test) in policy_unpack_test_init() 126 static void policy_unpack_test_inbounds_when_inbounds(struct kunit *test) in policy_unpack_test_inbounds_when_inbounds() 135 static void policy_unpack_test_inbounds_when_out_of_bounds(struct kunit *test) in policy_unpack_test_inbounds_when_out_of_bounds() 142 static void policy_unpack_test_unpack_array_with_null_name(struct kunit *test) in policy_unpack_test_unpack_array_with_null_name() 155 static void policy_unpack_test_unpack_array_with_name(struct kunit *test) in policy_unpack_test_unpack_array_with_name() 169 static void policy_unpack_test_unpack_array_out_of_bounds(struct kunit *test) in policy_unpack_test_unpack_array_out_of_bounds() 183 static void policy_unpack_test_unpack_blob_with_null_name(struct kunit *test) in policy_unpack_test_unpack_blob_with_null_name() 197 static void policy_unpack_test_unpack_blob_with_name(struct kunit *test) in policy_unpack_test_unpack_blob_with_name() 211 static void policy_unpack_test_unpack_blob_out_of_bounds(struct kunit *test) in policy_unpack_test_unpack_blob_out_of_bounds() [all …]
|
/openbmc/linux/drivers/clk/ |
H A D | clk-gate_test.c | 11 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 D | clk_test.c | 167 static int clk_test_init_with_ops(struct kunit *test, const struct clk_ops *ops) in clk_test_init_with_ops() 190 static int clk_test_init(struct kunit *test) in clk_test_init() 195 static int clk_maximize_test_init(struct kunit *test) in clk_maximize_test_init() 200 static int clk_minimize_test_init(struct kunit *test) in clk_minimize_test_init() 205 static void clk_test_exit(struct kunit *test) in clk_test_exit() 215 static void clk_test_get_rate(struct kunit *test) in clk_test_get_rate() 236 static void clk_test_set_get_rate(struct kunit *test) in clk_test_set_get_rate() 261 static void clk_test_set_set_get_rate(struct kunit *test) in clk_test_set_set_get_rate() 287 static void clk_test_round_set_get_rate(struct kunit *test) in clk_test_round_set_get_rate() 330 static int clk_uncached_test_init(struct kunit *test) in clk_uncached_test_init() [all …]
|
/openbmc/linux/kernel/events/ |
H A D | hw_breakpoint_test.c | 65 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 …]
|
/openbmc/linux/arch/s390/lib/ |
H A D | test_kprobes.c | 11 static void setup_kprobe(struct kunit *test, struct kprobe *kp, in setup_kprobe() 19 static void test_kprobe_offset(struct kunit *test, struct kprobe *kp, in test_kprobe_offset() 36 static void test_kprobe_odd(struct kunit *test) in test_kprobe_odd() 42 static void test_kprobe_in_insn4(struct kunit *test) in test_kprobe_in_insn4() 48 static void test_kprobe_in_insn6_lo(struct kunit *test) in test_kprobe_in_insn6_lo() 54 static void test_kprobe_in_insn6_hi(struct kunit *test) in test_kprobe_in_insn6_hi()
|
/openbmc/linux/drivers/gpu/drm/tests/ |
H A D | drm_format_test.c | 12 static void drm_test_format_block_width_invalid(struct kunit *test) in drm_test_format_block_width_invalid() 21 static void drm_test_format_block_width_one_plane(struct kunit *test) in drm_test_format_block_width_one_plane() 32 static void drm_test_format_block_width_two_plane(struct kunit *test) in drm_test_format_block_width_two_plane() 44 static void drm_test_format_block_width_three_plane(struct kunit *test) in drm_test_format_block_width_three_plane() 57 static void drm_test_format_block_width_tiled(struct kunit *test) in drm_test_format_block_width_tiled() 68 static void drm_test_format_block_height_invalid(struct kunit *test) in drm_test_format_block_height_invalid() 77 static void drm_test_format_block_height_one_plane(struct kunit *test) in drm_test_format_block_height_one_plane() 88 static void drm_test_format_block_height_two_plane(struct kunit *test) in drm_test_format_block_height_two_plane() 100 static void drm_test_format_block_height_three_plane(struct kunit *test) in drm_test_format_block_height_three_plane() 113 static void drm_test_format_block_height_tiled(struct kunit *test) in drm_test_format_block_height_tiled() [all …]
|
H A D | drm_damage_helper_test.c | 26 static int drm_damage_helper_init(struct kunit *test) in drm_damage_helper_init() 95 static void check_damage_clip(struct kunit *test, struct drm_rect *r, in check_damage_clip() 119 static void drm_test_damage_iter_no_damage(struct kunit *test) in drm_test_damage_iter_no_damage() 137 static void drm_test_damage_iter_no_damage_fractional_src(struct kunit *test) in drm_test_damage_iter_no_damage_fractional_src() 158 static void drm_test_damage_iter_no_damage_src_moved(struct kunit *test) in drm_test_damage_iter_no_damage_src_moved() 177 static void drm_test_damage_iter_no_damage_fractional_src_moved(struct kunit *test) in drm_test_damage_iter_no_damage_fractional_src_moved() 197 static void drm_test_damage_iter_no_damage_not_visible(struct kunit *test) in drm_test_damage_iter_no_damage_not_visible() 215 static void drm_test_damage_iter_no_damage_no_crtc(struct kunit *test) in drm_test_damage_iter_no_damage_no_crtc() 233 static void drm_test_damage_iter_no_damage_no_fb(struct kunit *test) in drm_test_damage_iter_no_damage_no_fb() 251 static void drm_test_damage_iter_simple_damage(struct kunit *test) in drm_test_damage_iter_simple_damage() [all …]
|