LINUX.ORG.RU

KUnit тестирование

 , ,


0

1

Экспериментирую с KUnit. Скачал ядро отсюда. Пытаюсь сделать тестирование с помощью KUnit по этой инструкции. Пункт с выполнением ./tools/testing/kunit/kunit.py run отрабатывает, вроде бы, хорошо. Выхлоп:

charlzk@Scarlett ~/Projects/linux-5.16 $ ./tools/testing/kunit/kunit.py run
[07:50:59] Configuring KUnit Kernel ...
[07:50:59] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um olddefconfig O=.kunit
Building with:
$ make ARCH=um --jobs=8 O=.kunit
../arch/x86/um/Makefile:44: FORCE prerequisite is missing
../arch/x86/um/Makefile:44: FORCE prerequisite is missing

[07:51:06] Starting KUnit Kernel (1/1)...
[07:51:06] ============================================================
[07:51:08] =============== time_test_cases (1 subtest) ================
[07:51:12] [PASSED] time64_to_tm_test_date_range
[07:51:12] ================= [PASSED] time_test_cases =================
[07:51:12] ================ sysctl_test (10 subtests) =================
[07:51:12] [PASSED] sysctl_test_api_dointvec_null_tbl_data
[07:51:12] [PASSED] sysctl_test_api_dointvec_table_maxlen_unset
[07:51:12] [PASSED] sysctl_test_api_dointvec_table_len_is_zero
[07:51:12] [PASSED] sysctl_test_api_dointvec_table_read_but_position_set
[07:51:12] [PASSED] sysctl_test_dointvec_read_happy_single_positive
[07:51:12] [PASSED] sysctl_test_dointvec_read_happy_single_negative
[07:51:12] [PASSED] sysctl_test_dointvec_write_happy_single_positive
[07:51:12] [PASSED] sysctl_test_dointvec_write_happy_single_negative
[07:51:12] [PASSED] sysctl_test_api_dointvec_write_single_less_int_min
[07:51:12] [PASSED] sysctl_test_api_dointvec_write_single_greater_int_max
[07:51:12] =================== [PASSED] sysctl_test ===================
[07:51:12] ================== list_sort (1 subtest) ===================
[07:51:12] [PASSED] list_sort_test
[07:51:12] ==================== [PASSED] list_sort ====================
[07:51:12] =================== lib_sort (1 subtest) ===================
[07:51:12] [PASSED] test_sort
[07:51:12] ==================== [PASSED] lib_sort =====================
[07:51:12] ============= kunit_executor_test (5 subtests) =============
[07:51:12] [PASSED] parse_filter_test
[07:51:12] [PASSED] filter_subsuite_test
[07:51:12] [PASSED] filter_subsuite_test_glob_test
[07:51:12] [PASSED] filter_subsuite_to_empty_test
[07:51:12] [PASSED] filter_suites_test
[07:51:12] =============== [PASSED] kunit_executor_test ===============
[07:51:12] ============ kunit-try-catch-test (2 subtests) =============
[07:51:12] [PASSED] kunit_test_try_catch_successful_try_no_catch
[07:51:12] [PASSED] kunit_test_try_catch_unsuccessful_try_does_catch
[07:51:12] ============== [PASSED] kunit-try-catch-test ===============
[07:51:12] ============= kunit-resource-test (7 subtests) =============
[07:51:12] [PASSED] kunit_resource_test_init_resources
[07:51:12] [PASSED] kunit_resource_test_alloc_resource
[07:51:12] [PASSED] kunit_resource_test_destroy_resource
[07:51:12] [PASSED] kunit_resource_test_cleanup_resources
[07:51:12] [PASSED] kunit_resource_test_proper_free_ordering
[07:51:12] [PASSED] kunit_resource_test_static
[07:51:12] [PASSED] kunit_resource_test_named
[07:51:12] =============== [PASSED] kunit-resource-test ===============
[07:51:12] ================ kunit-log-test (1 subtest) ================
[07:51:12] [PASSED] kunit_log_test
[07:51:12] ================= [PASSED] kunit-log-test ==================
[07:51:12] ================ kunit_status (2 subtests) =================
[07:51:12] [PASSED] kunit_status_set_failure_test
[07:51:12] [PASSED] kunit_status_mark_skipped_test
[07:51:12] ================== [PASSED] kunit_status ===================
[07:51:12] ============= string-stream-test (3 subtests) ==============
[07:51:12] [PASSED] string_stream_test_empty_on_creation
[07:51:12] [PASSED] string_stream_test_not_empty_after_add
[07:51:12] [PASSED] string_stream_test_get_string
[07:51:12] =============== [PASSED] string-stream-test ================
[07:51:12] =================== example (3 subtests) ===================
[07:51:12] [PASSED] example_simple_test
[07:51:12] [SKIPPED] example_skip_test
[07:51:12] [SKIPPED] example_mark_skipped_test
[07:51:12] ===================== [PASSED] example =====================
[07:51:12] ============== list-kunit-test (36 subtests) ===============
[07:51:12] [PASSED] list_test_list_init
[07:51:12] [PASSED] list_test_list_add
[07:51:12] [PASSED] list_test_list_add_tail
[07:51:12] [PASSED] list_test_list_del
[07:51:12] [PASSED] list_test_list_replace
[07:51:12] [PASSED] list_test_list_replace_init
[07:51:12] [PASSED] list_test_list_swap
[07:51:12] [PASSED] list_test_list_del_init
[07:51:12] [PASSED] list_test_list_move
[07:51:12] [PASSED] list_test_list_move_tail
[07:51:12] [PASSED] list_test_list_bulk_move_tail
[07:51:12] [PASSED] list_test_list_is_first
[07:51:12] [PASSED] list_test_list_is_last
[07:51:12] [PASSED] list_test_list_empty
[07:51:12] [PASSED] list_test_list_empty_careful
[07:51:12] [PASSED] list_test_list_rotate_left
[07:51:12] [PASSED] list_test_list_rotate_to_front
[07:51:12] [PASSED] list_test_list_is_singular
[07:51:12] [PASSED] list_test_list_cut_position
[07:51:12] [PASSED] list_test_list_cut_before
[07:51:12] [PASSED] list_test_list_splice
[07:51:12] [PASSED] list_test_list_splice_tail
[07:51:12] [PASSED] list_test_list_splice_init
[07:51:12] [PASSED] list_test_list_splice_tail_init
[07:51:12] [PASSED] list_test_list_entry
[07:51:12] [PASSED] list_test_list_first_entry
[07:51:12] [PASSED] list_test_list_last_entry
[07:51:12] [PASSED] list_test_list_first_entry_or_null
[07:51:12] [PASSED] list_test_list_next_entry
[07:51:12] [PASSED] list_test_list_prev_entry
[07:51:12] [PASSED] list_test_list_for_each
[07:51:12] [PASSED] list_test_list_for_each_prev
[07:51:12] [PASSED] list_test_list_for_each_safe
[07:51:12] [PASSED] list_test_list_for_each_prev_safe
[07:51:12] [PASSED] list_test_list_for_each_entry
[07:51:12] [PASSED] list_test_list_for_each_entry_reverse
[07:51:12] ================= [PASSED] list-kunit-test =================
[07:51:12] ================== slub_test (5 subtests) ==================
[07:51:12] [PASSED] test_clobber_zone
[07:51:12] [PASSED] test_next_pointer
[07:51:12] [PASSED] test_first_word
[07:51:12] [PASSED] test_clobber_50th_byte
[07:51:12] [PASSED] test_clobber_redzone_free
[07:51:12] ==================== [PASSED] slub_test ====================
[07:51:12] =================== memcpy (3 subtests) ====================
[07:51:12] [PASSED] memset_test
[07:51:12] [PASSED] memcpy_test
[07:51:12] [PASSED] memmove_test
[07:51:12] ===================== [PASSED] memcpy ======================
[07:51:12] =============== qos-kunit-test (3 subtests) ================
[07:51:12] [PASSED] freq_qos_test_min
[07:51:12] [PASSED] freq_qos_test_maxdef
[07:51:12] [PASSED] freq_qos_test_readd
[07:51:12] ================= [PASSED] qos-kunit-test ==================
[07:51:12] =============== property-entry (7 subtests) ================
[07:51:12] [PASSED] pe_test_uints
[07:51:12] [PASSED] pe_test_uint_arrays
[07:51:12] [PASSED] pe_test_strings
[07:51:12] [PASSED] pe_test_bool
[07:51:12] [PASSED] pe_test_move_inline_u8
[07:51:12] [PASSED] pe_test_move_inline_str
[07:51:12] [PASSED] pe_test_reference
[07:51:12] ================= [PASSED] property-entry ==================
[07:51:12] ============================================================
[07:51:12] Testing complete. Passed: 88, Failed: 0, Crashed: 0, Skipped: 2, Errors: 0
[07:51:12] Elapsed time: 12.905s total, 0.008s configuring, 6.400s building, 6.467s running

Теперь пытаюсь сделать пункт «Creating a .kunitconfig». Создаю .kunitconfig:

charlzk@Scarlett ~/Projects/linux-5.16 $ cp tools/testing/kunit/configs/default.config .kunitconfig
charlzk@Scarlett ~/Projects/linux-5.16 $ cat .kunitconfig
CONFIG_KUNIT=y
CONFIG_KUNIT_EXAMPLE_TEST=y
CONFIG_KUNIT_ALL_TESTS=y

Добавляю CONFIG_LIST_KUNIT_TEST=y в .kunitconfig:

charlzk@Scarlett ~/Projects/linux-5.16 $ cat .kunitconfig
CONFIG_KUNIT=y
CONFIG_KUNIT_EXAMPLE_TEST=y
CONFIG_KUNIT_ALL_TESTS=y
CONFIG_LIST_KUNIT_TEST=y

Теперь запускаю тестирование:

charlzk@Scarlett ~/Projects/linux-5.16 $ ./tools/testing/kunit/kunit.py run
[07:57:59] Configuring KUnit Kernel ...
[07:57:59] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um olddefconfig O=.kunit
Building with:
$ make ARCH=um --jobs=8 O=.kunit
../arch/x86/um/Makefile:44: FORCE prerequisite is missing
../arch/x86/um/Makefile:44: FORCE prerequisite is missing

[07:58:05] Starting KUnit Kernel (1/1)...
[07:58:05] ============================================================
[07:58:08] =============== time_test_cases (1 subtest) ================
[07:58:11] [PASSED] time64_to_tm_test_date_range
[07:58:11] ================= [PASSED] time_test_cases =================
[07:58:11] ================ sysctl_test (10 subtests) =================
[07:58:11] [PASSED] sysctl_test_api_dointvec_null_tbl_data
[07:58:11] [PASSED] sysctl_test_api_dointvec_table_maxlen_unset
[07:58:11] [PASSED] sysctl_test_api_dointvec_table_len_is_zero
[07:58:11] [PASSED] sysctl_test_api_dointvec_table_read_but_position_set
[07:58:11] [PASSED] sysctl_test_dointvec_read_happy_single_positive
[07:58:11] [PASSED] sysctl_test_dointvec_read_happy_single_negative
[07:58:11] [PASSED] sysctl_test_dointvec_write_happy_single_positive
[07:58:11] [PASSED] sysctl_test_dointvec_write_happy_single_negative
[07:58:11] [PASSED] sysctl_test_api_dointvec_write_single_less_int_min
[07:58:11] [PASSED] sysctl_test_api_dointvec_write_single_greater_int_max
[07:58:11] =================== [PASSED] sysctl_test ===================
[07:58:11] ================== list_sort (1 subtest) ===================
[07:58:11] [PASSED] list_sort_test
[07:58:11] ==================== [PASSED] list_sort ====================
[07:58:11] =================== lib_sort (1 subtest) ===================
[07:58:11] [PASSED] test_sort
[07:58:11] ==================== [PASSED] lib_sort =====================
[07:58:11] ============= kunit_executor_test (5 subtests) =============
[07:58:11] [PASSED] parse_filter_test
[07:58:11] [PASSED] filter_subsuite_test
[07:58:11] [PASSED] filter_subsuite_test_glob_test
[07:58:11] [PASSED] filter_subsuite_to_empty_test
[07:58:11] [PASSED] filter_suites_test
[07:58:11] =============== [PASSED] kunit_executor_test ===============
[07:58:11] ============ kunit-try-catch-test (2 subtests) =============
[07:58:11] [PASSED] kunit_test_try_catch_successful_try_no_catch
[07:58:11] [PASSED] kunit_test_try_catch_unsuccessful_try_does_catch
[07:58:11] ============== [PASSED] kunit-try-catch-test ===============
[07:58:11] ============= kunit-resource-test (7 subtests) =============
[07:58:11] [PASSED] kunit_resource_test_init_resources
[07:58:11] [PASSED] kunit_resource_test_alloc_resource
[07:58:11] [PASSED] kunit_resource_test_destroy_resource
[07:58:11] [PASSED] kunit_resource_test_cleanup_resources
[07:58:11] [PASSED] kunit_resource_test_proper_free_ordering
[07:58:11] [PASSED] kunit_resource_test_static
[07:58:11] [PASSED] kunit_resource_test_named
[07:58:11] =============== [PASSED] kunit-resource-test ===============
[07:58:11] ================ kunit-log-test (1 subtest) ================
[07:58:11] [PASSED] kunit_log_test
[07:58:11] ================= [PASSED] kunit-log-test ==================
[07:58:11] ================ kunit_status (2 subtests) =================
[07:58:11] [PASSED] kunit_status_set_failure_test
[07:58:11] [PASSED] kunit_status_mark_skipped_test
[07:58:11] ================== [PASSED] kunit_status ===================
[07:58:11] ============= string-stream-test (3 subtests) ==============
[07:58:11] [PASSED] string_stream_test_empty_on_creation
[07:58:11] [PASSED] string_stream_test_not_empty_after_add
[07:58:11] [PASSED] string_stream_test_get_string
[07:58:11] =============== [PASSED] string-stream-test ================
[07:58:11] =================== example (3 subtests) ===================
[07:58:11] [PASSED] example_simple_test
[07:58:11] [SKIPPED] example_skip_test
[07:58:11] [SKIPPED] example_mark_skipped_test
[07:58:11] ===================== [PASSED] example =====================
[07:58:11] ============== list-kunit-test (36 subtests) ===============
[07:58:11] [PASSED] list_test_list_init
[07:58:11] [PASSED] list_test_list_add
[07:58:11] [PASSED] list_test_list_add_tail
[07:58:11] [PASSED] list_test_list_del
[07:58:11] [PASSED] list_test_list_replace
[07:58:11] [PASSED] list_test_list_replace_init
[07:58:11] [PASSED] list_test_list_swap
[07:58:11] [PASSED] list_test_list_del_init
[07:58:11] [PASSED] list_test_list_move
[07:58:11] [PASSED] list_test_list_move_tail
[07:58:11] [PASSED] list_test_list_bulk_move_tail
[07:58:11] [PASSED] list_test_list_is_first
[07:58:11] [PASSED] list_test_list_is_last
[07:58:11] [PASSED] list_test_list_empty
[07:58:11] [PASSED] list_test_list_empty_careful
[07:58:11] [PASSED] list_test_list_rotate_left
[07:58:11] [PASSED] list_test_list_rotate_to_front
[07:58:11] [PASSED] list_test_list_is_singular
[07:58:11] [PASSED] list_test_list_cut_position
[07:58:11] [PASSED] list_test_list_cut_before
[07:58:11] [PASSED] list_test_list_splice
[07:58:11] [PASSED] list_test_list_splice_tail
[07:58:11] [PASSED] list_test_list_splice_init
[07:58:11] [PASSED] list_test_list_splice_tail_init
[07:58:11] [PASSED] list_test_list_entry
[07:58:11] [PASSED] list_test_list_first_entry
[07:58:11] [PASSED] list_test_list_last_entry
[07:58:11] [PASSED] list_test_list_first_entry_or_null
[07:58:11] [PASSED] list_test_list_next_entry
[07:58:11] [PASSED] list_test_list_prev_entry
[07:58:11] [PASSED] list_test_list_for_each
[07:58:11] [PASSED] list_test_list_for_each_prev
[07:58:11] [PASSED] list_test_list_for_each_safe
[07:58:11] [PASSED] list_test_list_for_each_prev_safe
[07:58:11] [PASSED] list_test_list_for_each_entry
[07:58:11] [PASSED] list_test_list_for_each_entry_reverse
[07:58:11] ================= [PASSED] list-kunit-test =================
[07:58:11] ================== slub_test (5 subtests) ==================
[07:58:11] [PASSED] test_clobber_zone
[07:58:11] [PASSED] test_next_pointer
[07:58:11] [PASSED] test_first_word
[07:58:11] [PASSED] test_clobber_50th_byte
[07:58:11] [PASSED] test_clobber_redzone_free
[07:58:11] ==================== [PASSED] slub_test ====================
[07:58:11] =================== memcpy (3 subtests) ====================
[07:58:11] [PASSED] memset_test
[07:58:11] [PASSED] memcpy_test
[07:58:11] [PASSED] memmove_test
[07:58:11] ===================== [PASSED] memcpy ======================
[07:58:11] =============== qos-kunit-test (3 subtests) ================
[07:58:11] [PASSED] freq_qos_test_min
[07:58:11] [PASSED] freq_qos_test_maxdef
[07:58:11] [PASSED] freq_qos_test_readd
[07:58:11] ================= [PASSED] qos-kunit-test ==================
[07:58:11] =============== property-entry (7 subtests) ================
[07:58:11] [PASSED] pe_test_uints
[07:58:11] [PASSED] pe_test_uint_arrays
[07:58:11] [PASSED] pe_test_strings
[07:58:11] [PASSED] pe_test_bool
[07:58:11] [PASSED] pe_test_move_inline_u8
[07:58:11] [PASSED] pe_test_move_inline_str
[07:58:11] [PASSED] pe_test_reference
[07:58:11] ================= [PASSED] property-entry ==================
[07:58:11] ============================================================
[07:58:11] Testing complete. Passed: 88, Failed: 0, Crashed: 0, Skipped: 2, Errors: 0
[07:58:11] Elapsed time: 12.906s total, 0.009s configuring, 6.355s building, 6.503s running

Согласно инструкции, сперва должен сгенерироваться .config, но конфиг не генерируется. Я подозреваю, что .kunitconfig вообще не играет никакой роли. Я даже попробовал закомментировать всё содержимое .kunitconfig:

charlzk@Scarlett ~/Projects/linux-5.16 $ cat .kunitconfig
#CONFIG_KUNIT=y
#CONFIG_KUNIT_EXAMPLE_TEST=y
#CONFIG_KUNIT_ALL_TESTS=y
#CONFIG_LIST_KUNIT_TEST=y

И запустить тестирование, но результат неизменный:

charlzk@Scarlett ~/Projects/linux-5.16 $ ./tools/testing/kunit/kunit.py run
[08:05:25] Configuring KUnit Kernel ...
[08:05:25] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um olddefconfig O=.kunit
Building with:
$ make ARCH=um --jobs=8 O=.kunit
../arch/x86/um/Makefile:44: FORCE prerequisite is missing
../arch/x86/um/Makefile:44: FORCE prerequisite is missing

[08:05:31] Starting KUnit Kernel (1/1)...
[08:05:31] ============================================================
[08:05:34] =============== time_test_cases (1 subtest) ================
[08:05:38] [PASSED] time64_to_tm_test_date_range
[08:05:38] ================= [PASSED] time_test_cases =================
[08:05:38] ================ sysctl_test (10 subtests) =================
[08:05:38] [PASSED] sysctl_test_api_dointvec_null_tbl_data
[08:05:38] [PASSED] sysctl_test_api_dointvec_table_maxlen_unset
[08:05:38] [PASSED] sysctl_test_api_dointvec_table_len_is_zero
[08:05:38] [PASSED] sysctl_test_api_dointvec_table_read_but_position_set
[08:05:38] [PASSED] sysctl_test_dointvec_read_happy_single_positive
[08:05:38] [PASSED] sysctl_test_dointvec_read_happy_single_negative
[08:05:38] [PASSED] sysctl_test_dointvec_write_happy_single_positive
[08:05:38] [PASSED] sysctl_test_dointvec_write_happy_single_negative
[08:05:38] [PASSED] sysctl_test_api_dointvec_write_single_less_int_min
[08:05:38] [PASSED] sysctl_test_api_dointvec_write_single_greater_int_max
[08:05:38] =================== [PASSED] sysctl_test ===================
[08:05:38] ================== list_sort (1 subtest) ===================
[08:05:38] [PASSED] list_sort_test
[08:05:38] ==================== [PASSED] list_sort ====================
[08:05:38] =================== lib_sort (1 subtest) ===================
[08:05:38] [PASSED] test_sort
[08:05:38] ==================== [PASSED] lib_sort =====================
[08:05:38] ============= kunit_executor_test (5 subtests) =============
[08:05:38] [PASSED] parse_filter_test
[08:05:38] [PASSED] filter_subsuite_test
[08:05:38] [PASSED] filter_subsuite_test_glob_test
[08:05:38] [PASSED] filter_subsuite_to_empty_test
[08:05:38] [PASSED] filter_suites_test
[08:05:38] =============== [PASSED] kunit_executor_test ===============
[08:05:38] ============ kunit-try-catch-test (2 subtests) =============
[08:05:38] [PASSED] kunit_test_try_catch_successful_try_no_catch
[08:05:38] [PASSED] kunit_test_try_catch_unsuccessful_try_does_catch
[08:05:38] ============== [PASSED] kunit-try-catch-test ===============
[08:05:38] ============= kunit-resource-test (7 subtests) =============
[08:05:38] [PASSED] kunit_resource_test_init_resources
[08:05:38] [PASSED] kunit_resource_test_alloc_resource
[08:05:38] [PASSED] kunit_resource_test_destroy_resource
[08:05:38] [PASSED] kunit_resource_test_cleanup_resources
[08:05:38] [PASSED] kunit_resource_test_proper_free_ordering
[08:05:38] [PASSED] kunit_resource_test_static
[08:05:38] [PASSED] kunit_resource_test_named
[08:05:38] =============== [PASSED] kunit-resource-test ===============
[08:05:38] ================ kunit-log-test (1 subtest) ================
[08:05:38] [PASSED] kunit_log_test
[08:05:38] ================= [PASSED] kunit-log-test ==================
[08:05:38] ================ kunit_status (2 subtests) =================
[08:05:38] [PASSED] kunit_status_set_failure_test
[08:05:38] [PASSED] kunit_status_mark_skipped_test
[08:05:38] ================== [PASSED] kunit_status ===================
[08:05:38] ============= string-stream-test (3 subtests) ==============
[08:05:38] [PASSED] string_stream_test_empty_on_creation
[08:05:38] [PASSED] string_stream_test_not_empty_after_add
[08:05:38] [PASSED] string_stream_test_get_string
[08:05:38] =============== [PASSED] string-stream-test ================
[08:05:38] =================== example (3 subtests) ===================
[08:05:38] [PASSED] example_simple_test
[08:05:38] [SKIPPED] example_skip_test
[08:05:38] [SKIPPED] example_mark_skipped_test
[08:05:38] ===================== [PASSED] example =====================
[08:05:38] ============== list-kunit-test (36 subtests) ===============
[08:05:38] [PASSED] list_test_list_init
[08:05:38] [PASSED] list_test_list_add
[08:05:38] [PASSED] list_test_list_add_tail
[08:05:38] [PASSED] list_test_list_del
[08:05:38] [PASSED] list_test_list_replace
[08:05:38] [PASSED] list_test_list_replace_init
[08:05:38] [PASSED] list_test_list_swap
[08:05:38] [PASSED] list_test_list_del_init
[08:05:38] [PASSED] list_test_list_move
[08:05:38] [PASSED] list_test_list_move_tail
[08:05:38] [PASSED] list_test_list_bulk_move_tail
[08:05:38] [PASSED] list_test_list_is_first
[08:05:38] [PASSED] list_test_list_is_last
[08:05:38] [PASSED] list_test_list_empty
[08:05:38] [PASSED] list_test_list_empty_careful
[08:05:38] [PASSED] list_test_list_rotate_left
[08:05:38] [PASSED] list_test_list_rotate_to_front
[08:05:38] [PASSED] list_test_list_is_singular
[08:05:38] [PASSED] list_test_list_cut_position
[08:05:38] [PASSED] list_test_list_cut_before
[08:05:38] [PASSED] list_test_list_splice
[08:05:38] [PASSED] list_test_list_splice_tail
[08:05:38] [PASSED] list_test_list_splice_init
[08:05:38] [PASSED] list_test_list_splice_tail_init
[08:05:38] [PASSED] list_test_list_entry
[08:05:38] [PASSED] list_test_list_first_entry
[08:05:38] [PASSED] list_test_list_last_entry
[08:05:38] [PASSED] list_test_list_first_entry_or_null
[08:05:38] [PASSED] list_test_list_next_entry
[08:05:38] [PASSED] list_test_list_prev_entry
[08:05:38] [PASSED] list_test_list_for_each
[08:05:38] [PASSED] list_test_list_for_each_prev
[08:05:38] [PASSED] list_test_list_for_each_safe
[08:05:38] [PASSED] list_test_list_for_each_prev_safe
[08:05:38] [PASSED] list_test_list_for_each_entry
[08:05:38] [PASSED] list_test_list_for_each_entry_reverse
[08:05:38] ================= [PASSED] list-kunit-test =================
[08:05:38] ================== slub_test (5 subtests) ==================
[08:05:38] [PASSED] test_clobber_zone
[08:05:38] [PASSED] test_next_pointer
[08:05:38] [PASSED] test_first_word
[08:05:38] [PASSED] test_clobber_50th_byte
[08:05:38] [PASSED] test_clobber_redzone_free
[08:05:38] ==================== [PASSED] slub_test ====================
[08:05:38] =================== memcpy (3 subtests) ====================
[08:05:38] [PASSED] memset_test
[08:05:38] [PASSED] memcpy_test
[08:05:38] [PASSED] memmove_test
[08:05:38] ===================== [PASSED] memcpy ======================
[08:05:38] =============== qos-kunit-test (3 subtests) ================
[08:05:38] [PASSED] freq_qos_test_min
[08:05:38] [PASSED] freq_qos_test_maxdef
[08:05:38] [PASSED] freq_qos_test_readd
[08:05:38] ================= [PASSED] qos-kunit-test ==================
[08:05:38] =============== property-entry (7 subtests) ================
[08:05:38] [PASSED] pe_test_uints
[08:05:38] [PASSED] pe_test_uint_arrays
[08:05:38] [PASSED] pe_test_strings
[08:05:38] [PASSED] pe_test_bool
[08:05:38] [PASSED] pe_test_move_inline_u8
[08:05:38] [PASSED] pe_test_move_inline_str
[08:05:38] [PASSED] pe_test_reference
[08:05:38] ================= [PASSED] property-entry ==================
[08:05:38] ============================================================
[08:05:38] Testing complete. Passed: 88, Failed: 0, Crashed: 0, Skipped: 2, Errors: 0
[08:05:38] Elapsed time: 12.848s total, 0.008s configuring, 6.398s building, 6.417s running

Прошу подсказать как работать с KUnit.


Ответ на: комментарий от kto_tama

Спасибо за ответ! Но это не то.

czan
() автор топика

А помогло мне следующее:

  1. удалить директорию .kunit из корня, где находятся исходники ядра и

  2. указать явно конфиг .kunitconfig:

~/Projects/linux-5.16 $ ./tools/testing/kunit/kunit.py run --kunitconfig ~/Projects/linux-5.16/.kunitconfig

И тогда всё работает отлично. Правда, странно. По идее, kunit должен автоматически подцеплять .kunitconfig и без принудительного указания.

czan
() автор топика

Оказывается настройки .kunitconfig нужно было засунуть в директорию .kunit , и тогда можно не указывать путь.

czan
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.