Home
last modified time | relevance | path

Searched full:test (Results 1 – 25 of 4483) sorted by relevance

12345678910>>...180

/linux/drivers/gpu/drm/tests/
H A Ddrm_cmdline_parser_test.c7 #include <kunit/test.h>
15 static void drm_test_cmdline_force_e_only(struct kunit *test) in drm_test_cmdline_force_e_only() argument
20 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_force_e_only()
22 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_force_e_only()
23 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_force_e_only()
24 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_force_e_only()
26 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_force_e_only()
27 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_force_e_only()
28 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_force_e_only()
29 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_force_e_only()
[all …]
H A Ddrm_format_test.c3 * Test cases for the drm_format functions
8 #include <kunit/test.h>
12 static void drm_test_format_block_width_invalid(struct kunit *test) in drm_test_format_block_width_invalid() argument
16 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 0), 0); in drm_test_format_block_width_invalid()
17 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, -1), 0); in drm_test_format_block_width_invalid()
18 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 1), 0); 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() argument
25 KUNIT_ASSERT_NOT_NULL(test, info); in drm_test_format_block_width_one_plane()
27 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 0), 1); in drm_test_format_block_width_one_plane()
28 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, 1), 0); in drm_test_format_block_width_one_plane()
[all …]
H A Ddrm_gem_shmem_test.c3 * KUnit test suite for GEM objects backed by shmem buffers
14 #include <kunit/test.h>
43 * Test creating a shmem GEM object backed by shmem buffer. The test
48 static void drm_gem_shmem_test_obj_create(struct kunit *test) in drm_gem_shmem_test_obj_create() argument
50 struct drm_device *drm_dev = test->priv; in drm_gem_shmem_test_obj_create()
54 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, shmem); in drm_gem_shmem_test_obj_create()
55 KUNIT_EXPECT_EQ(test, shmem->base.size, TEST_SIZE); in drm_gem_shmem_test_obj_create()
56 KUNIT_EXPECT_NOT_NULL(test, shmem->base.filp); in drm_gem_shmem_test_obj_create()
57 KUNIT_EXPECT_NOT_NULL(test, shmem->base.funcs); in drm_gem_shmem_test_obj_create()
63 * Test creating a shmem GEM object from a scatter/gather table exported
[all …]
H A Ddrm_modes_test.c3 * Kunit test for drm_modes functions
10 #include <kunit/test.h>
19 static int drm_test_modes_init(struct kunit *test) in drm_test_modes_init() argument
23 priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL); in drm_test_modes_init()
24 KUNIT_ASSERT_NOT_NULL(test, priv); in drm_test_modes_init()
26 priv->dev = drm_kunit_helper_alloc_device(test); in drm_test_modes_init()
27 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, priv->dev); in drm_test_modes_init()
29 priv->drm = __drm_kunit_helper_alloc_drm_device(test, priv->dev, in drm_test_modes_init()
32 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, priv->drm); in drm_test_modes_init()
34 test->priv = priv; in drm_test_modes_init()
[all …]
/linux/tools/testing/kunit/
H A Dkunit_parser.py3 # Parses KTAP test results from a kernel dmesg log and incrementally prints
4 # results with reader-friendly format. Stores and returns test results in a
5 # Test object.
22 class Test: class
24 A class to represent a test parsed from KTAP results. All KTAP
25 results within a test log are stored in a main Test object as
29 status : TestStatus - status of the test
30 name : str - name of the test
32 test cas
254 check_version(version_num: int, accepted_versions: List[int], version_type: str, test: Test, printer: Printer) global() argument
273 parse_ktap_header(lines: LineStream, test: Test, printer: Printer) global() argument
305 parse_test_header(lines: LineStream, test: Test) global() argument
329 parse_test_plan(lines: LineStream, test: Test) global() argument
359 peek_test_name_match(lines: LineStream, test: Test) global() argument
384 parse_test_result(lines: LineStream, test: Test, expected_num: int, printer: Printer) global() argument
492 print_test_header(test: Test, printer: Printer) global() argument
522 format_test_result(test: Test, printer: Printer) global() argument
549 print_test_result(test: Test, printer: Printer) global() argument
562 print_test_footer(test: Test, printer: Printer) global() argument
577 print_test(test: Test, failed_only: bool, printer: Printer) global() argument
604 _summarize_failed_tests(test: Test) global() argument
607 failed_names(test: Test, parent_name: str) global() argument
636 print_summary_line(test: Test, printer: Printer) global() argument
670 bubble_up_test_results(test: Test) global() argument
[all...]
/linux/lib/kunit/
H A Dkunit-test.c3 * KUnit test for core test infrastructure.
9 #include <kunit/test.h>
10 #include <kunit/test-bug.h>
26 struct kunit *test = data; in kunit_test_successful_try() local
27 struct kunit_try_catch_test_context *ctx = test->priv; in kunit_test_successful_try()
34 struct kunit *test = data; in kunit_test_no_catch() local
36 KUNIT_FAIL(test, "Catch should not be called\n"); 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() argument
41 struct kunit_try_catch_test_context *ctx = test->priv; in kunit_test_try_catch_successful_try_no_catch()
45 test, in kunit_test_try_catch_successful_try_no_catch()
[all …]
H A Dkunit-example-test.c3 * Example KUnit test to show how to use KUnit.
9 #include <kunit/test.h>
13 * This is the most fundamental element of KUnit, the test case. A test case
15 * any expectations or assertions are not met, the test fails; otherwise, the
16 * test passes.
18 * In KUnit, a test case is just a function with the signature
20 * information about the current test.
22 static void example_simple_test(struct kunit *test) in example_simple_test() argument
26 * to test in example_simple_test()
37 example_test_init(struct kunit * test) example_test_init() argument
48 example_test_exit(struct kunit * test) example_test_exit() argument
78 example_skip_test(struct kunit * test) example_skip_test() argument
93 example_mark_skipped_test(struct kunit * test) example_mark_skipped_test() argument
108 example_all_expect_macros_test(struct kunit * test) example_all_expect_macros_test() argument
184 example_static_stub_test(struct kunit * test) example_static_stub_test() argument
208 example_static_stub_using_fn_ptr_test(struct kunit * test) example_static_stub_using_fn_ptr_test() argument
243 example_params_test(struct kunit * test) example_params_test() argument
261 example_priv_test(struct kunit * test) example_priv_test() argument
275 example_slow_test(struct kunit * test) example_slow_test() argument
307 example_resource_alloc_match(struct kunit * test,struct kunit_resource * res,void * match_data) example_resource_alloc_match() argument
318 example_param_array_get_desc(struct kunit * test,const void * p,char * desc) example_param_array_get_desc() argument
332 example_param_init(struct kunit * test) example_param_init() argument
364 example_params_test_with_init(struct kunit * test) example_params_test_with_init() argument
399 make_fibonacci_params(struct kunit * test,size_t seq_size) make_fibonacci_params() argument
427 example_param_dynamic_arr_get_desc(struct kunit * test,const void * p,char * desc) example_param_dynamic_arr_get_desc() argument
438 example_param_init_dynamic_arr(struct kunit * test) example_param_init_dynamic_arr() argument
471 example_param_exit_dynamic_arr(struct kunit * test) example_param_exit_dynamic_arr() argument
480 example_params_test_with_init_dynamic_arr(struct kunit * test) example_params_test_with_init_dynamic_arr() argument
565 example_init_test(struct kunit * test) example_init_test() argument
[all...]
H A Dassert_test.c3 * KUnit test for the assertion formatting functions.
6 #include <kunit/test.h>
11 #define ASSERT_TEST_EXPECT_CONTAIN(test, str, substr) KUNIT_EXPECT_TRUE(test, strstr(str, substr)) argument
12 #define ASSERT_TEST_EXPECT_NCONTAIN(test, str, substr) KUNIT_EXPECT_FALSE(test, strstr(str, substr)) argument
14 static void kunit_test_is_literal(struct kunit *test) in kunit_test_is_literal() argument
16 KUNIT_EXPECT_TRUE(test, is_literal("5", 5)); in kunit_test_is_literal()
17 KUNIT_EXPECT_TRUE(test, is_literal("0", 0)); in kunit_test_is_literal()
18 KUNIT_EXPECT_TRUE(test, is_literal("1234567890", 1234567890)); in kunit_test_is_literal()
19 KUNIT_EXPECT_TRUE(test, is_literal("-1234567890", -1234567890)); in kunit_test_is_literal()
20 KUNIT_EXPECT_FALSE(test, is_literal("05", 5)); in kunit_test_is_literal()
[all …]
H A Dplatform-test.c3 * KUnit test for KUnit platform driver infrastructure.
9 #include <kunit/test.h>
12 * Test that kunit_platform_device_alloc() creates a platform device.
14 static void kunit_platform_device_alloc_test(struct kunit *test) in kunit_platform_device_alloc_test() argument
16 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, in kunit_platform_device_alloc_test()
17 kunit_platform_device_alloc(test, "kunit-platform", 1)); in kunit_platform_device_alloc_test()
21 * Test that kunit_platform_device_add() registers a platform device on the
24 static void kunit_platform_device_add_test(struct kunit *test) in kunit_platform_device_add_test() argument
30 pdev = kunit_platform_device_alloc(test, name, id); in kunit_platform_device_add_test()
31 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, pdev); in kunit_platform_device_add_test()
[all …]
H A Dexecutor_test.c3 * KUnit test for the KUnit executor.
9 #include <kunit/test.h>
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() argument
26 static void parse_filter_test(struct kunit *test) in parse_filter_test() argument
31 KUNIT_EXPECT_STREQ(test, filter.suite_glob, "suite"); in parse_filter_test()
32 KUNIT_EXPECT_FALSE(test, filter.test_glob); in parse_filter_test()
36 kunit_parse_glob_filter(&filter, "suite.test"); in parse_filter_test()
37 KUNIT_EXPECT_STREQ(test, filter.suite_glob, "suite"); in parse_filter_test()
[all …]
/linux/drivers/platform/chrome/
H A Dcros_ec_proto_test.c6 #include <kunit/test.h>
26 static void cros_ec_proto_test_prepare_tx_legacy_normal(struct kunit *test) in cros_ec_proto_test_prepare_tx_legacy_normal() argument
28 struct cros_ec_proto_test_priv *priv = test->priv; in cros_ec_proto_test_prepare_tx_legacy_normal()
45 KUNIT_EXPECT_EQ(test, ret, EC_MSG_TX_PROTO_BYTES + EC_PROTO2_MAX_PARAM_SIZE); in cros_ec_proto_test_prepare_tx_legacy_normal()
46 KUNIT_EXPECT_EQ(test, ec_dev->dout[0], EC_CMD_VERSION0); in cros_ec_proto_test_prepare_tx_legacy_normal()
47 KUNIT_EXPECT_EQ(test, ec_dev->dout[1], EC_CMD_HELLO); in cros_ec_proto_test_prepare_tx_legacy_normal()
48 KUNIT_EXPECT_EQ(test, ec_dev->dout[2], EC_PROTO2_MAX_PARAM_SIZE); in cros_ec_proto_test_prepare_tx_legacy_normal()
49 KUNIT_EXPECT_EQ(test, EC_MSG_TX_HEADER_BYTES, 3); in cros_ec_proto_test_prepare_tx_legacy_normal()
50 KUNIT_EXPECT_EQ(test, ec_dev->dout[EC_MSG_TX_HEADER_BYTES + 0], 0xde); in cros_ec_proto_test_prepare_tx_legacy_normal()
51 KUNIT_EXPECT_EQ(test, ec_dev->dout[EC_MSG_TX_HEADER_BYTES + 1], 0xad); in cros_ec_proto_test_prepare_tx_legacy_normal()
[all …]
/linux/drivers/base/power/
H A Druntime-test.c9 #include <kunit/test.h>
13 static void pm_runtime_depth_test(struct kunit *test) in pm_runtime_depth_test() argument
15 struct device *dev = kunit_device_register(test, DEVICE_NAME); in pm_runtime_depth_test()
17 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev); in pm_runtime_depth_test()
21 KUNIT_EXPECT_TRUE(test, pm_runtime_suspended(dev)); in pm_runtime_depth_test()
22 KUNIT_EXPECT_EQ(test, 0, pm_runtime_get_sync(dev)); in pm_runtime_depth_test()
23 KUNIT_EXPECT_TRUE(test, pm_runtime_active(dev)); in pm_runtime_depth_test()
24 KUNIT_EXPECT_EQ(test, 1, pm_runtime_get_sync(dev)); /* "already active" */ in pm_runtime_depth_test()
25 KUNIT_EXPECT_EQ(test, 0, pm_runtime_put_sync(dev)); in pm_runtime_depth_test()
26 KUNIT_EXPECT_EQ(test, 0, pm_runtime_put_sync(dev)); in pm_runtime_depth_test()
[all …]
/linux/tools/perf/tests/
H A DBuild3 perf-test-y += builtin-test.o
4 perf-test-y += tests-scripts.o
5 perf-test-y += parse-events.o
6 perf-test-y += uncore-event-sorting.o
7 perf-test-y += dso-data.o
8 perf-test-y += vmlinux-kallsyms.o
9 perf-test-y += openat-syscall.o
10 perf-test-y += openat-syscall-all-cpus.o
11 perf-test
[all...]
/linux/drivers/gpu/drm/vkms/tests/
H A Dvkms_config_test.c3 #include <kunit/test.h>
89 static void vkms_config_test_empty_config(struct kunit *test) in vkms_config_test_empty_config() argument
92 const char *dev_name = "test"; in vkms_config_test_empty_config()
95 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, config); in vkms_config_test_empty_config()
99 KUNIT_EXPECT_STREQ(test, vkms_config_get_device_name(config), "test"); in vkms_config_test_empty_config()
101 KUNIT_EXPECT_EQ(test, vkms_config_get_num_planes(config), 0); in vkms_config_test_empty_config()
102 KUNIT_EXPECT_EQ(test, vkms_config_get_num_crtcs(config), 0); in vkms_config_test_empty_config()
103 KUNIT_EXPECT_EQ(test, vkms_config_get_num_encoders(config), 0); in vkms_config_test_empty_config()
104 KUNIT_EXPECT_EQ(test, vkms_config_get_num_connectors(config), 0); in vkms_config_test_empty_config()
106 KUNIT_EXPECT_FALSE(test, vkms_config_is_valid(config)); in vkms_config_test_empty_config()
[all …]
/linux/tools/build/feature/
H A DMakefile7 test-all.bin \
8 test-backtrace.bin \
9 test-bionic.bin \
10 test-libdw.bin \
11 test-eventfd.bin \
12 test-fortify-source.bin \
13 test-glibc.bin \
14 test-gtk2.bin \
15 test-gtk2-infobar.bin \
16 test
[all...]
/linux/drivers/gpu/drm/ttm/tests/
H A Dttm_tt_test.c39 static void ttm_tt_init_basic(struct kunit *test) in ttm_tt_init_basic() argument
41 const struct ttm_tt_test_case *params = test->param_value; in ttm_tt_init_basic()
50 tt = kunit_kzalloc(test, sizeof(*tt), GFP_KERNEL); in ttm_tt_init_basic()
51 KUNIT_ASSERT_NOT_NULL(test, tt); in ttm_tt_init_basic()
53 bo = ttm_bo_kunit_init(test, test->priv, params->size, NULL); in ttm_tt_init_basic()
56 KUNIT_ASSERT_EQ(test, err, 0); in ttm_tt_init_basic()
58 KUNIT_ASSERT_EQ(test, tt->num_pages, num_pages + extra_pages); in ttm_tt_init_basic()
60 KUNIT_ASSERT_EQ(test, tt->page_flags, page_flags); in ttm_tt_init_basic()
61 KUNIT_ASSERT_EQ(test, tt->caching, caching); in ttm_tt_init_basic()
63 KUNIT_ASSERT_NULL(test, tt->dma_address); in ttm_tt_init_basic()
[all …]
H A Dttm_resource_test.c26 static int ttm_resource_test_init(struct kunit *test) in ttm_resource_test_init() argument
30 priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL); in ttm_resource_test_init()
31 KUNIT_ASSERT_NOT_NULL(test, priv); in ttm_resource_test_init()
33 priv->devs = ttm_test_devices_all(test); in ttm_resource_test_init()
34 KUNIT_ASSERT_NOT_NULL(test, priv->devs); in ttm_resource_test_init()
36 test->priv = priv; in ttm_resource_test_init()
41 static void ttm_resource_test_fini(struct kunit *test) in ttm_resource_test_fini() argument
43 struct ttm_resource_test_priv *priv = test->priv; in ttm_resource_test_fini()
45 ttm_test_devices_put(test, priv->devs); in ttm_resource_test_fini()
48 static void ttm_init_test_mocks(struct kunit *test, in ttm_init_test_mocks() argument
[all …]
/linux/sound/soc/codecs/
H A Dcs-amp-lib-test.c3 // KUnit test for the Cirrus common amplifier library.
9 #include <kunit/test.h>
10 #include <kunit/test-bug.h>
63 static struct cirrus_amp_efi_data *cs_amp_lib_test_cal_blob_dup(struct kunit *test) in cs_amp_lib_test_cal_blob_dup()
65 struct cs_amp_lib_test_priv *priv = test->priv; in cs_amp_lib_test_cal_blob_dup()
68 KUNIT_ASSERT_EQ(test, struct_size(priv->cal_blob, data, priv->cal_blob->count), in cs_amp_lib_test_cal_blob_dup()
70 temp = kunit_kmalloc(test, priv->cal_blob->size, GFP_KERNEL); in cs_amp_lib_test_cal_blob_dup()
71 KUNIT_ASSERT_NOT_NULL(test, temp); in cs_amp_lib_test_cal_blob_dup()
77 static void cs_amp_lib_test_init_dummy_cal_blob(struct kunit *test, int num_amps) in cs_amp_lib_test_init_dummy_cal_blob()
79 struct cs_amp_lib_test_priv *priv = test in cs_amp_lib_test_init_dummy_cal_blob()
61 cs_amp_lib_test_cal_blob_dup(struct kunit * test) cs_amp_lib_test_cal_blob_dup() argument
75 cs_amp_lib_test_init_dummy_cal_blob(struct kunit * test,int num_amps) cs_amp_lib_test_init_dummy_cal_blob() argument
106 cs_amp_lib_test_get_target_uid(struct kunit * test) cs_amp_lib_test_get_target_uid() argument
135 cs_amp_lib_test_cal_data_too_short_test(struct kunit * test) cs_amp_lib_test_cal_data_too_short_test() argument
157 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable_bad_count() local
175 cs_amp_lib_test_cal_count_too_big_test(struct kunit * test) cs_amp_lib_test_cal_count_too_big_test() argument
203 cs_amp_lib_test_no_cal_data_test(struct kunit * test) cs_amp_lib_test_no_cal_data_test() argument
227 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable() local
271 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable_all_zeros() local
312 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_hp_cal_efi_variable() local
342 cs_amp_lib_test_get_hp_efi_cal(struct kunit * test) cs_amp_lib_test_get_hp_efi_cal() argument
361 cs_amp_lib_test_get_efi_cal_by_uid_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_by_uid_test() argument
395 cs_amp_lib_test_get_efi_cal_by_index_unchecked_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_by_index_unchecked_test() argument
426 cs_amp_lib_test_get_efi_cal_by_index_checked_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_by_index_checked_test() argument
462 cs_amp_lib_test_get_efi_cal_by_index_uid_mismatch_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_by_index_uid_mismatch_test() argument
488 cs_amp_lib_test_get_efi_cal_by_index_fallback_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_by_index_fallback_test() argument
529 cs_amp_lib_test_get_efi_cal_uid_not_found_noindex_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_uid_not_found_noindex_test() argument
558 cs_amp_lib_test_get_efi_cal_uid_not_found_index_not_found_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_uid_not_found_index_not_found_test() argument
587 cs_amp_lib_test_get_efi_cal_no_uid_index_not_found_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_no_uid_index_not_found_test() argument
605 cs_amp_lib_test_get_efi_cal_no_uid_no_index_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_no_uid_no_index_test() argument
626 cs_amp_lib_test_get_efi_cal_zero_not_matched_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_zero_not_matched_test() argument
653 cs_amp_lib_test_get_efi_cal_empty_entry_test(struct kunit * test) cs_amp_lib_test_get_efi_cal_empty_entry_test() argument
703 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_write_cal_coeff() local
722 cs_amp_lib_test_write_cal_data_test(struct kunit * test) cs_amp_lib_test_write_cal_data_test() argument
770 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_read_cal_coeff() local
787 cs_amp_lib_test_read_cal_data_test(struct kunit * test) cs_amp_lib_test_read_cal_data_test() argument
811 cs_amp_lib_test_write_ambient_test(struct kunit * test) cs_amp_lib_test_write_ambient_test() argument
845 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_set_efi_variable() local
881 cs_amp_lib_test_create_new_cal_efi(struct kunit * test) cs_amp_lib_test_create_new_cal_efi() argument
942 cs_amp_lib_test_create_new_cal_efi_indexed(struct kunit * test) cs_amp_lib_test_create_new_cal_efi_indexed() argument
995 cs_amp_lib_test_create_new_cal_efi_indexed_no_max(struct kunit * test) cs_amp_lib_test_create_new_cal_efi_indexed_no_max() argument
1050 cs_amp_lib_test_grow_append_cal_efi(struct kunit * test) cs_amp_lib_test_grow_append_cal_efi() argument
1142 cs_amp_lib_test_grow_append_cal_efi_indexed(struct kunit * test) cs_amp_lib_test_grow_append_cal_efi_indexed() argument
1223 cs_amp_lib_test_cal_efi_all_zeros_add_first(struct kunit * test) cs_amp_lib_test_cal_efi_all_zeros_add_first() argument
1253 cs_amp_lib_test_cal_efi_all_zeros_add_first_no_shrink(struct kunit * test) cs_amp_lib_test_cal_efi_all_zeros_add_first_no_shrink() argument
1284 cs_amp_lib_test_cal_efi_all_zeros_add_first_indexed(struct kunit * test) cs_amp_lib_test_cal_efi_all_zeros_add_first_indexed() argument
1318 cs_amp_lib_test_cal_efi_all_zeros_add_first_indexed_no_shrink(struct kunit * test) cs_amp_lib_test_cal_efi_all_zeros_add_first_indexed_no_shrink() argument
1353 cs_amp_lib_test_grow_append_cal_efi_indexed_no_max(struct kunit * test) cs_amp_lib_test_grow_append_cal_efi_indexed_no_max() argument
1459 cs_amp_lib_test_grow_cal_efi_replace_indexed(struct kunit * test) cs_amp_lib_test_grow_cal_efi_replace_indexed() argument
1554 cs_amp_lib_test_grow_cal_efi_replace_by_uid(struct kunit * test) cs_amp_lib_test_grow_cal_efi_replace_by_uid() argument
1649 cs_amp_lib_test_cal_efi_replace_by_uid(struct kunit * test) cs_amp_lib_test_cal_efi_replace_by_uid() argument
1723 cs_amp_lib_test_cal_efi_replace_by_index(struct kunit * test) cs_amp_lib_test_cal_efi_replace_by_index() argument
1801 cs_amp_lib_test_cal_efi_deduplicate(struct kunit * test) cs_amp_lib_test_cal_efi_deduplicate() argument
1892 cs_amp_lib_test_cal_efi_find_free(struct kunit * test) cs_amp_lib_test_cal_efi_find_free() argument
1973 cs_amp_lib_test_cal_efi_bad_cal_target(struct kunit * test) cs_amp_lib_test_cal_efi_bad_cal_target() argument
1996 cs_amp_lib_test_cal_efi_write_denied(struct kunit * test) cs_amp_lib_test_cal_efi_write_denied() argument
2032 cs_amp_lib_test_cal_efi_attr_preserved(struct kunit * test) cs_amp_lib_test_cal_efi_attr_preserved() argument
2066 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_set_hp_efi_cal_variable() local
2091 cs_amp_lib_test_cal_efi_update_hp(struct kunit * test) cs_amp_lib_test_cal_efi_update_hp() argument
2123 cs_amp_lib_test_spkid_lenovo_not_present(struct kunit * test) cs_amp_lib_test_spkid_lenovo_not_present() argument
2141 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable_lenovo_d0() local
2160 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable_lenovo_d1() local
2179 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable_lenovo_00() local
2189 cs_amp_lib_test_spkid_lenovo_d0(struct kunit * test) cs_amp_lib_test_spkid_lenovo_d0() argument
2201 cs_amp_lib_test_spkid_lenovo_d1(struct kunit * test) cs_amp_lib_test_spkid_lenovo_d1() argument
2213 cs_amp_lib_test_spkid_lenovo_illegal(struct kunit * test) cs_amp_lib_test_spkid_lenovo_illegal() argument
2234 cs_amp_lib_test_spkid_lenovo_oversize(struct kunit * test) cs_amp_lib_test_spkid_lenovo_oversize() argument
2252 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable_hp_30() local
2271 struct kunit *test = kunit_get_current_test(); cs_amp_lib_test_get_efi_variable_hp_31() local
2284 cs_amp_lib_test_spkid_hp_30(struct kunit * test) cs_amp_lib_test_spkid_hp_30() argument
2296 cs_amp_lib_test_spkid_hp_31(struct kunit * test) cs_amp_lib_test_spkid_hp_31() argument
2308 cs_amp_lib_test_case_init(struct kunit * test) cs_amp_lib_test_case_init() argument
[all...]
/linux/drivers/gpu/drm/xe/tests/
H A Dxe_guc_relay_test.c7 #include <kunit/test.h>
8 #include <kunit/test-bug.h>
25 static int relay_test_init(struct kunit *test) in relay_test_init() argument
35 test->priv = &fake; in relay_test_init()
36 xe_kunit_helper_xe_device_test_init(test); in relay_test_init()
38 xe = test->priv; in relay_test_init()
39 KUNIT_ASSERT_EQ(test, xe_sriov_init(xe), 0); in relay_test_init()
42 kunit_activate_static_stub(test, relay_get_totalvfs, in relay_test_init()
45 KUNIT_ASSERT_EQ(test, xe_guc_relay_init(relay), 0); in relay_test_init()
46 KUNIT_EXPECT_TRUE(test, relay_is_ready(relay)); in relay_test_init()
[all …]
H A Dxe_guc_db_mgr_test.c6 #include <kunit/test.h>
11 static int guc_dbm_test_init(struct kunit *test) in guc_dbm_test_init() argument
15 xe_kunit_helper_xe_device_test_init(test); in guc_dbm_test_init()
16 dbm = &xe_device_get_gt(test->priv, 0)->uc.guc.dbm; in guc_dbm_test_init()
19 test->priv = dbm; in guc_dbm_test_init()
23 static void test_empty(struct kunit *test) in test_empty() argument
25 struct xe_guc_db_mgr *dbm = test->priv; in test_empty()
27 KUNIT_ASSERT_EQ(test, xe_guc_db_mgr_init(dbm, 0), 0); in test_empty()
28 KUNIT_ASSERT_EQ(test, dbm->count, 0); in test_empty()
31 KUNIT_EXPECT_LT(test, xe_guc_db_mgr_reserve_id_locked(dbm), 0); in test_empty()
[all …]
/linux/drivers/clk/
H A Dclk-fixed-rate_test.c3 * KUnit test for clk fixed rate basic type
15 #include <kunit/test.h>
77 * clk_hw_register_fixed_rate_kunit() - Test managed __clk_hw_register_fixed_rate()
78 * @test: The test context
84 clk_hw_register_fixed_rate_kunit(struct kunit *test, in clk_hw_register_fixed_rate_kunit() argument
89 hw = kunit_alloc_resource(test, in clk_hw_register_fixed_rate_kunit()
100 * clk_hw_unregister_fixed_rate_kunit() - Test managed clk_hw_unregister_fixed_rate()
101 * @test: The test context
102 * @hw: fixed rate clk to unregister upon test completion
104 * Automatically unregister @hw when @test is complete via
[all …]
H A Dclk-gate_test.c9 #include <kunit/test.h>
11 static void clk_gate_register_test_dev(struct kunit *test) in clk_gate_register_test_dev() argument
17 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, pdev); in clk_gate_register_test_dev()
21 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ret); in clk_gate_register_test_dev()
22 KUNIT_EXPECT_STREQ(test, "test_gate", clk_hw_get_name(ret)); in clk_gate_register_test_dev()
23 KUNIT_EXPECT_EQ(test, 0UL, clk_hw_get_flags(ret)); 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() argument
36 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, parent); in clk_gate_register_test_parent_names()
40 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, ret); in clk_gate_register_test_parent_names()
41 KUNIT_EXPECT_PTR_EQ(test, parent, clk_hw_get_parent(ret)); in clk_gate_register_test_parent_names()
[all …]
/linux/lib/tests/
H A Dstring_kunit.c3 * Test cases for string functions.
8 #include <kunit/test.h>
24 #define STRCMP_TEST_EXPECT_EQUAL(test, fn, ...) KUNIT_EXPECT_EQ(test, fn(__VA_ARGS__), 0) argument
25 #define STRCMP_TEST_EXPECT_LOWER(test, fn, ...) KUNIT_EXPECT_LT(test, fn(__VA_ARGS__), 0) argument
26 #define STRCMP_TEST_EXPECT_GREATER(test, fn, ...) KUNIT_EXPECT_GT(test, fn(__VA_ARGS__), 0) argument
34 static void string_test_memset16(struct kunit *test) in string_test_memset16() argument
39 p = kunit_kzalloc(test, 256 * 2 * 2, GFP_KERNEL); in string_test_memset16()
40 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, p); in string_test_memset16()
49 KUNIT_ASSERT_EQ_MSG(test, v, 0xa1a1, in string_test_memset16()
52 KUNIT_ASSERT_EQ_MSG(test, v, 0xb1b2, in string_test_memset16()
[all …]
H A Dlist-test.c3 * KUnit test for the Kernel Linked-list structures.
8 #include <kunit/test.h>
18 static void list_test_list_init(struct kunit *test) in list_test_list_init() argument
20 /* Test the different ways of initialising a list. */ in list_test_list_init()
37 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list1)); in list_test_list_init()
38 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list2)); in list_test_list_init()
39 KUNIT_EXPECT_TRUE(test, list_empty_careful(&list3)); in list_test_list_init()
40 KUNIT_EXPECT_TRUE(test, list_empty_careful(list4)); in list_test_list_init()
41 KUNIT_EXPECT_TRUE(test, list_empty_careful(list5)); in list_test_list_init()
47 static void list_test_list_add(struct kunit *test) in list_test_list_add() argument
[all …]
/linux/security/apparmor/
H A Dpolicy_unpack_test.c6 #include <kunit/test.h>
57 struct kunit *test, size_t buf_size) in build_aa_ext_struct() argument
62 buf = kunit_kzalloc(test, buf_size, GFP_USER); in build_aa_ext_struct()
63 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, buf); in build_aa_ext_struct()
65 e = kunit_kmalloc(test, sizeof(*e), GFP_USER); in build_aa_ext_struct()
66 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, e); in build_aa_ext_struct()
113 static int policy_unpack_test_init(struct kunit *test) in policy_unpack_test_init() argument
118 puf = kunit_kmalloc(test, sizeof(*puf), GFP_USER); in policy_unpack_test_init()
119 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, puf); in policy_unpack_test_init()
122 puf->e = build_aa_ext_struct(puf, test, e_size); in policy_unpack_test_init()
[all …]

12345678910>>...180