Home
last modified time | relevance | path

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

12345

/linux-5.19.10/Documentation/dev-tools/kunit/
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 …]
Dkunit-tool.rst10 kunit_tool is a script (``tools/testing/kunit/kunit.py``) that aids in building
26 (``.kunit`` by default). kunit_tool uses it to generate a .config as you might
43 ./tools/testing/kunit/kunit.py run
49 ./tools/testing/kunit/kunit.py run --timeout=30 --jobs=`nproc --all`
63 ./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig
69 ./tools/testing/kunit/kunit.py run --help
82 ./tools/testing/kunit/kunit.py config
89 ./tools/testing/kunit/kunit.py build
96 ./tools/testing/kunit/kunit.py exec
115 ./tools/testing/kunit/kunit.py run --raw_output
[all …]
Dstart.rst20 ./tools/testing/kunit/kunit.py run
23 Documentation/dev-tools/kunit/run_wrapper.rst.
50 tools/testing/kunit/kunit.py config
51 cat .kunit/.kunitconfig
54 ``.kunitconfig`` lives in the ``--build_dir`` used by kunit.py, which is
55 ``.kunit`` by default.
72 If you change the ``.kunitconfig``, kunit.py will trigger a rebuild of the
74 tools like ``make menuconfig O=.kunit``. As long as its a superset of
75 ``.kunitconfig``, kunit.py won't overwrite your changes.
84 ./tools/testing/kunit/kunit.py run
[all …]
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 …]
Dindex.rst16 kunit-tool
48 In addition, KUnit has kunit_tool, a script (``tools/testing/kunit/kunit.py``)
101 * Documentation/dev-tools/kunit/start.rst - for KUnit new users.
102 * Documentation/dev-tools/kunit/architecture.rst - KUnit architecture.
103 * Documentation/dev-tools/kunit/run_wrapper.rst - run kunit_tool.
104 * Documentation/dev-tools/kunit/run_manual.rst - run tests without kunit_tool.
105 * Documentation/dev-tools/kunit/usage.rst - write tests.
106 * Documentation/dev-tools/kunit/tips.rst - best practices with
108 * Documentation/dev-tools/kunit/api/index.rst - KUnit APIs
110 * Documentation/dev-tools/kunit/kunit-tool.rst - kunit_tool helper
[all …]
Dfaq.rst34 (``tools/testing/kunit/kunit.py``) that does not support other architectures.
39 For more information, see :ref:`kunit-on-non-uml`.
70 1. Run ``./tools/testing/kunit/kunit.py run`` with the ``--raw_output``
73 2. Instead of running ``kunit.py run``, try running ``kunit.py config``,
74 ``kunit.py build``, and ``kunit.py exec`` independently. This can help track
76 can run it manually against ``stdin`` or a file with ``kunit.py parse``.)
79 after building the UML kernel (for example, by using ``kunit.py build``).
86 around, so you can see what config was used after running ``kunit.py run``.
90 5. Try to run ``make ARCH=um defconfig`` before running ``kunit.py run``. This
97 can be collected from ``/sys/kernel/debug/kunit/<test suite>/results``, and
[all …]
/linux-5.19.10/sound/soc/
Dsoc-topology-test.c28 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()
232 KUNIT_EXPECT_EQ_MSG(kunit_comp->kunit, kunit_comp->expect, ret, in d_probe_null_comp()
244 static void snd_soc_tplg_test_load_with_null_comp(struct kunit *test) in snd_soc_tplg_test_load_with_null_comp()
252 kunit_comp->kunit = test; in snd_soc_tplg_test_load_with_null_comp()
288 static void snd_soc_tplg_test_load_with_null_ops(struct kunit *test) in snd_soc_tplg_test_load_with_null_ops()
296 kunit_comp->kunit = test; in snd_soc_tplg_test_load_with_null_ops()
[all …]
/linux-5.19.10/include/kunit/
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,
312 static inline bool kunit_resource_instance_match(struct kunit *test, in kunit_resource_instance_match()
325 static inline bool kunit_resource_name_match(struct kunit *test, in kunit_resource_name_match()
339 kunit_find_resource(struct kunit *test, in kunit_find_resource()
[all …]
/linux-5.19.10/lib/
Dtest_kasan.c49 static int kasan_test_init(struct kunit *test) in kasan_test_init()
64 static void kasan_test_exit(struct kunit *test) in kasan_test_exit()
126 static void kmalloc_oob_right(struct kunit *test) in kmalloc_oob_right()
155 static void kmalloc_oob_left(struct kunit *test) in kmalloc_oob_left()
168 static void kmalloc_node_oob_right(struct kunit *test) in kmalloc_node_oob_right()
187 static void kmalloc_pagealloc_oob_right(struct kunit *test) in kmalloc_pagealloc_oob_right()
203 static void kmalloc_pagealloc_uaf(struct kunit *test) in kmalloc_pagealloc_uaf()
217 static void kmalloc_pagealloc_invalid_free(struct kunit *test) in kmalloc_pagealloc_invalid_free()
230 static void pagealloc_oob_right(struct kunit *test) in pagealloc_oob_right()
252 static void pagealloc_uaf(struct kunit *test) in pagealloc_uaf()
[all …]
Dlist-test.c17 static void list_test_list_init(struct kunit *test) in list_test_list_init()
46 static void list_test_list_add(struct kunit *test) in list_test_list_add()
60 static void list_test_list_add_tail(struct kunit *test) in list_test_list_add_tail()
74 static void list_test_list_del(struct kunit *test) in list_test_list_del()
90 static void list_test_list_replace(struct kunit *test) in list_test_list_replace()
106 static void list_test_list_replace_init(struct kunit *test) in list_test_list_replace_init()
125 static void list_test_list_swap(struct kunit *test) in list_test_list_swap()
147 static void list_test_list_del_init(struct kunit *test) in list_test_list_del_init()
164 static void list_test_list_del_init_careful(struct kunit *test) in list_test_list_del_init_careful()
184 static void list_test_list_move(struct kunit *test) in list_test_list_move()
[all …]
Dslub_kunit.c12 static void test_clobber_zone(struct kunit *test) in test_clobber_zone()
30 static void test_next_pointer(struct kunit *test) in test_next_pointer()
75 static void test_first_word(struct kunit *test) in test_first_word()
90 static void test_clobber_50th_byte(struct kunit *test) in test_clobber_50th_byte()
106 static void test_clobber_redzone_free(struct kunit *test) in test_clobber_redzone_free()
123 static int test_init(struct kunit *test) in test_init()
/linux-5.19.10/lib/kunit/
Dkunit-test.c19 struct kunit *test = data; in kunit_test_successful_try()
27 struct kunit *test = data; in kunit_test_no_catch()
32 static void kunit_test_try_catch_successful_try_no_catch(struct kunit *test) in kunit_test_try_catch_successful_try_no_catch()
48 struct kunit *test = data; in kunit_test_unsuccessful_try()
58 struct kunit *test = data; in kunit_test_catch()
64 static void kunit_test_try_catch_unsuccessful_try_does_catch(struct kunit *test) in kunit_test_try_catch_unsuccessful_try_does_catch()
78 static int kunit_try_catch_test_init(struct kunit *test) in kunit_try_catch_test_init()
111 struct kunit test;
133 static void kunit_resource_test_init_resources(struct kunit *test) in kunit_resource_test_init_resources()
142 static void kunit_resource_test_alloc_resource(struct kunit *test) in kunit_resource_test_alloc_resource()
[all …]
Dexecutor_test.c11 static void kfree_at_end(struct kunit *test, const void *to_free);
12 static void free_subsuite_at_end(struct kunit *test,
14 static struct kunit_suite *alloc_fake_suite(struct kunit *test,
18 static void dummy_test(struct kunit *test) {} in dummy_test()
27 static void parse_filter_test(struct kunit *test) in parse_filter_test()
44 static void filter_subsuite_test(struct kunit *test) in filter_subsuite_test()
67 static void filter_subsuite_test_glob_test(struct kunit *test) in filter_subsuite_test_glob_test()
95 static void filter_subsuite_to_empty_test(struct kunit *test) in filter_subsuite_to_empty_test()
114 static void kfree_subsuites_at_end(struct kunit *test, struct suite_set *suite_set) in kfree_subsuites_at_end()
123 static void filter_suites_test(struct kunit *test) in filter_suites_test()
[all …]
DMakefile1 obj-$(CONFIG_KUNIT) += kunit.o
3 kunit-objs += test.o \
11 kunit-objs += debugfs.o
14 obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
21 obj-$(CONFIG_KUNIT_EXAMPLE_TEST) += kunit-example-test.o
Dkunit-example-test.c21 static void example_simple_test(struct kunit *test) in example_simple_test()
36 static int example_test_init(struct kunit *test) in example_test_init()
57 static void example_skip_test(struct kunit *test) in example_skip_test()
72 static void example_mark_skipped_test(struct kunit *test) in example_mark_skipped_test()
87 static void example_all_expect_macros_test(struct kunit *test) in example_all_expect_macros_test()
Dtest.c84 static void kunit_print_test_stats(struct kunit *test, in kunit_print_test_stats()
153 struct kunit *test = is_test ? test_or_suite : NULL; in kunit_print_ok_not_ok()
223 static void kunit_print_string_stream(struct kunit *test, in kunit_print_string_stream()
246 static void kunit_fail(struct kunit *test, const struct kunit_loc *loc, in kunit_fail()
271 static void __noreturn kunit_abort(struct kunit *test) in kunit_abort()
284 void kunit_do_failed_assertion(struct kunit *test, in kunit_do_failed_assertion()
306 void kunit_init_test(struct kunit *test, const char *name, char *log) in kunit_init_test()
322 static void kunit_run_case_internal(struct kunit *test, in kunit_run_case_internal()
340 static void kunit_case_internal_cleanup(struct kunit *test) in kunit_case_internal_cleanup()
349 static void kunit_run_case_cleanup(struct kunit *test, in kunit_run_case_cleanup()
[all …]
/linux-5.19.10/security/apparmor/
Dpolicy_unpack_test.c52 struct kunit *test, size_t buf_size) in build_aa_ext_struct()
109 static int policy_unpack_test_init(struct kunit *test) in policy_unpack_test_init()
124 static void policy_unpack_test_inbounds_when_inbounds(struct kunit *test) in policy_unpack_test_inbounds_when_inbounds()
133 static void policy_unpack_test_inbounds_when_out_of_bounds(struct kunit *test) in policy_unpack_test_inbounds_when_out_of_bounds()
140 static void policy_unpack_test_unpack_array_with_null_name(struct kunit *test) in policy_unpack_test_unpack_array_with_null_name()
154 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()
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-5.19.10/drivers/clk/
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 …]
Dclk_test.c111 static int clk_test_init_with_ops(struct kunit *test, const struct clk_ops *ops) in clk_test_init_with_ops()
134 static int clk_test_init(struct kunit *test) in clk_test_init()
139 static int clk_maximize_test_init(struct kunit *test) in clk_maximize_test_init()
144 static int clk_minimize_test_init(struct kunit *test) in clk_minimize_test_init()
149 static void clk_test_exit(struct kunit *test) in clk_test_exit()
159 static void clk_test_get_rate(struct kunit *test) in clk_test_get_rate()
178 static void clk_test_set_get_rate(struct kunit *test) in clk_test_set_get_rate()
201 static void clk_test_set_set_get_rate(struct kunit *test) in clk_test_set_set_get_rate()
225 static void clk_test_round_set_get_rate(struct kunit *test) in clk_test_round_set_get_rate()
265 static int clk_orphan_transparent_single_parent_mux_test_init(struct kunit *test) in clk_orphan_transparent_single_parent_mux_test_init()
[all …]
/linux-5.19.10/arch/s390/lib/
Dtest_kprobes.c11 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()
/linux-5.19.10/net/mptcp/
Dtoken_test.c6 static struct mptcp_subflow_request_sock *build_req_sock(struct kunit *test) in build_req_sock()
18 static void mptcp_token_test_req_basic(struct kunit *test) in mptcp_token_test_req_basic()
32 static struct inet_connection_sock *build_icsk(struct kunit *test) in build_icsk()
42 static struct mptcp_subflow_context *build_ctx(struct kunit *test) in build_ctx()
52 static struct mptcp_sock *build_msk(struct kunit *test) in build_msk()
63 static void mptcp_token_test_msk_basic(struct kunit *test) in mptcp_token_test_msk_basic()
86 static void mptcp_token_test_accept(struct kunit *test) in mptcp_token_test_accept()
105 static void mptcp_token_test_destroyed(struct kunit *test) in mptcp_token_test_destroyed()
/linux-5.19.10/tools/testing/kunit/
Dkunit_tool_test.py25 import kunit
512 kunit.main(['config', '--build_dir=.kunit'], self.linux_source_mock)
517 kunit.main(['build'], self.linux_source_mock)
519 …self.linux_source_mock.build_kernel.assert_called_once_with(False, kunit.get_default_jobs(), '.kun…
523 kunit.main(['exec'], self.linux_source_mock)
531 kunit.main(['run'], self.linux_source_mock)
541 kunit.main(['exec'], self.linux_source_mock)
547 kunit.main(['run'], self.linux_source_mock)
556 kunit.main(['run'], self.linux_source_mock)
564 kunit.main(['exec', '--raw_output'], self.linux_source_mock)
[all …]
/linux-5.19.10/tools/testing/kunit/test_data/
Dtest_output_with_prefix_isolated_correctly.log4 [ 0.060000] # Subtest: kunit-resource-test
12 [ 0.060000] ok 1 - kunit-resource-test
13 [ 0.060000] foo bar # non-kunit output
14 [ 0.060000] # Subtest: kunit-try-catch-test
18 [ 0.060000] ok 2 - kunit-try-catch-test
Dtest_pound_no_prefix.log5 # Subtest: kunit-resource-test
13 ok 1 - kunit-resource-test
14 foo bar # non-kunit output
15 # Subtest: kunit-try-catch-test
19 ok 2 - kunit-try-catch-test
Dtest_pound_sign.log5 [ 0.060000] # Subtest: kunit-resource-test
13 [ 0.060000] ok 1 - kunit-resource-test
14 [ 0.060000] foo bar # non-kunit output
15 [ 0.060000] # Subtest: kunit-try-catch-test
19 [ 0.060000] ok 2 - kunit-try-catch-test

12345