Home
last modified time | relevance | path

Searched refs:test (Results 1 – 25 of 1321) sorted by relevance

12345678910>>...53

/linux/drivers/gpu/drm/tests/
H A Ddrm_cmdline_parser_test.c15 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()
30 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_force_e_only()
[all …]
H A Ddrm_format_test.c12 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()
29 KUNIT_EXPECT_EQ(test, drm_format_info_block_width(info, -1), 0); 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() argument
[all …]
H A Ddrm_gem_shmem_test.c43 static void drm_gem_shmem_test_obj_create(struct kunit *test) in drm_gem_shmem_test_obj_create() argument
45 struct drm_device *drm_dev = test->priv; in drm_gem_shmem_test_obj_create()
49 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, shmem); in drm_gem_shmem_test_obj_create()
50 KUNIT_EXPECT_EQ(test, shmem->base.size, TEST_SIZE); in drm_gem_shmem_test_obj_create()
51 KUNIT_EXPECT_NOT_NULL(test, shmem->base.filp); in drm_gem_shmem_test_obj_create()
52 KUNIT_EXPECT_NOT_NULL(test, shmem->base.funcs); in drm_gem_shmem_test_obj_create()
63 static void drm_gem_shmem_test_obj_create_private(struct kunit *test) in drm_gem_shmem_test_obj_create_private() argument
65 struct drm_device *drm_dev = test->priv; in drm_gem_shmem_test_obj_create_private()
75 buf = kunit_kzalloc(test, TEST_SIZE, GFP_KERNEL); in drm_gem_shmem_test_obj_create_private()
76 KUNIT_ASSERT_NOT_NULL(test, buf); in drm_gem_shmem_test_obj_create_private()
[all …]
H A Ddrm_connector_test.c60 static int drm_test_connector_init(struct kunit *test) in drm_test_connector_init() argument
66 dev = drm_kunit_helper_alloc_device(test); in drm_test_connector_init()
67 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, dev); in drm_test_connector_init()
69 priv = drm_kunit_helper_alloc_drm_device(test, dev, in drm_test_connector_init()
72 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, priv); in drm_test_connector_init()
80 KUNIT_ASSERT_EQ(test, ret, 0); in drm_test_connector_init()
82 ret = kunit_add_action_or_reset(test, i2c_del_adapter_wrapper, &priv->ddc); in drm_test_connector_init()
83 KUNIT_ASSERT_EQ(test, ret, 0); in drm_test_connector_init()
85 test->priv = priv; in drm_test_connector_init()
93 static void drm_test_drmm_connector_init(struct kunit *test) in drm_test_drmm_connector_init() argument
[all …]
H A Ddrm_modes_test.c19 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()
39 static void drm_test_modes_analog_tv_ntsc_480i(struct kunit *test) in drm_test_modes_analog_tv_ntsc_480i() argument
41 struct drm_test_modes_priv *priv = test->priv; in drm_test_modes_analog_tv_ntsc_480i()
[all …]
/linux/lib/kunit/
H A Dkunit-test.c26 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()
49 kunit_try_catch_run(try_catch, test); in kunit_test_try_catch_successful_try_no_catch()
51 KUNIT_EXPECT_TRUE(test, ctx->function_called); in kunit_test_try_catch_successful_try_no_catch()
56 struct kunit *test = data; in kunit_test_unsuccessful_try() local
[all …]
H A Dassert_test.c11 #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()
21 KUNIT_EXPECT_FALSE(test, is_literal("", 0)); in kunit_test_is_literal()
22 KUNIT_EXPECT_FALSE(test, is_literal("-0", 0)); in kunit_test_is_literal()
[all …]
H A Dexecutor_test.c12 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()
37 KUNIT_EXPECT_STREQ(test, filter.suite_glob, "suite"); in parse_filter_test()
38 KUNIT_EXPECT_STREQ(test, filter.test_glob, "test"); in parse_filter_test()
43 static void filter_suites_test(struct kunit *test) in filter_suites_test() argument
52 subsuite[0] = alloc_fake_suite(test, "suite1", dummy_test_cases); in filter_suites_test()
[all …]
/linux/drivers/platform/chrome/
H A Dcros_ec_proto_test.c26 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()
52 KUNIT_EXPECT_EQ(test, ec_dev->dout[EC_MSG_TX_HEADER_BYTES + 2], 0xbe); in cros_ec_proto_test_prepare_tx_legacy_normal()
[all …]
/linux/drivers/base/power/
H A Druntime-test.c13 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()
27 KUNIT_EXPECT_TRUE(test, pm_runtime_suspended(dev)); in pm_runtime_depth_test()
[all …]
/linux/mm/kasan/
H A Dkasan_test_c.c91 static void kasan_test_exit(struct kunit *test) in kasan_test_exit() argument
93 KUNIT_EXPECT_FALSE(test, READ_ONCE(test_status.report_found)); in kasan_test_exit()
121 #define KUNIT_EXPECT_KASAN_RESULT(test, expr, expr_str, fail) \ argument
126 KUNIT_EXPECT_FALSE(test, READ_ONCE(test_status.report_found)); \
133 KUNIT_FAIL(test, KUNIT_SUBTEST_INDENT "KASAN failure" \
158 #define KUNIT_EXPECT_KASAN_FAIL(test, expr) \ argument
159 KUNIT_EXPECT_KASAN_RESULT(test, expr, #expr, true)
175 #define KUNIT_EXPECT_KASAN_FAIL_READ(test, expr) \ argument
176 KUNIT_EXPECT_KASAN_RESULT(test, expr, #expr, \
179 #define KASAN_TEST_NEEDS_CONFIG_ON(test, config) do { \ argument
[all …]
/linux/sound/soc/codecs/
H A Dcs-amp-lib-test.c61 static struct cirrus_amp_efi_data *cs_amp_lib_test_cal_blob_dup(struct kunit *test) in cs_amp_lib_test_cal_blob_dup() argument
63 struct cs_amp_lib_test_priv *priv = test->priv; in cs_amp_lib_test_cal_blob_dup()
66 KUNIT_ASSERT_EQ(test, struct_size(priv->cal_blob, data, priv->cal_blob->count), in cs_amp_lib_test_cal_blob_dup()
68 temp = kunit_kmalloc(test, priv->cal_blob->size, GFP_KERNEL); in cs_amp_lib_test_cal_blob_dup()
69 KUNIT_ASSERT_NOT_NULL(test, temp); in cs_amp_lib_test_cal_blob_dup()
75 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() argument
77 struct cs_amp_lib_test_priv *priv = test->priv; in cs_amp_lib_test_init_dummy_cal_blob()
83 priv->cal_blob = kunit_kzalloc(test, blob_size, GFP_KERNEL); in cs_amp_lib_test_init_dummy_cal_blob()
84 KUNIT_ASSERT_NOT_NULL(test, priv->cal_blob); in cs_amp_lib_test_init_dummy_cal_blob()
106 static u64 cs_amp_lib_test_get_target_uid(struct kunit *test) in cs_amp_lib_test_get_target_uid() argument
[all …]
/linux/drivers/base/test/
H A Dproperty-entry-test.c10 static void pe_test_uints(struct kunit *test) in pe_test_uints() argument
28 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, node); in pe_test_uints()
31 KUNIT_EXPECT_EQ(test, error, 1); in pe_test_uints()
34 KUNIT_EXPECT_EQ(test, error, 0); in pe_test_uints()
35 KUNIT_EXPECT_EQ(test, val_u8, 8); in pe_test_uints()
38 KUNIT_EXPECT_EQ(test, error, 0); in pe_test_uints()
39 KUNIT_EXPECT_EQ(test, array_u8[0], 8); in pe_test_uints()
42 KUNIT_EXPECT_NE(test, error, 0); in pe_test_uints()
45 KUNIT_EXPECT_NE(test, error, 0); in pe_test_uints()
48 KUNIT_EXPECT_NE(test, error, 0); in pe_test_uints()
[all …]
/linux/lib/tests/
H A Dfortify_kunit.c85 static void fortify_test_known_sizes(struct kunit *test) in fortify_test_known_sizes() argument
89 KUNIT_EXPECT_FALSE(test, __is_constexpr(__builtin_strlen(stack))); in fortify_test_known_sizes()
90 KUNIT_EXPECT_EQ(test, __compiletime_strlen(stack), 5); in fortify_test_known_sizes()
92 KUNIT_EXPECT_TRUE(test, __is_constexpr(__builtin_strlen("88888888"))); in fortify_test_known_sizes()
93 KUNIT_EXPECT_EQ(test, __compiletime_strlen("88888888"), 8); in fortify_test_known_sizes()
95 KUNIT_EXPECT_TRUE(test, __is_constexpr(__builtin_strlen(array_of_10))); in fortify_test_known_sizes()
96 KUNIT_EXPECT_EQ(test, __compiletime_strlen(array_of_10), 10); in fortify_test_known_sizes()
98 KUNIT_EXPECT_FALSE(test, __is_constexpr(__builtin_strlen(ptr_of_11))); in fortify_test_known_sizes()
99 KUNIT_EXPECT_EQ(test, __compiletime_strlen(ptr_of_11), 11); in fortify_test_known_sizes()
101 KUNIT_EXPECT_TRUE(test, __is_constexpr(__builtin_strlen(unchanging_12))); in fortify_test_known_sizes()
[all …]
H A Dseq_buf_kunit.c11 static void seq_buf_init_test(struct kunit *test) in seq_buf_init_test() argument
18 KUNIT_EXPECT_EQ(test, s.size, 32); in seq_buf_init_test()
19 KUNIT_EXPECT_EQ(test, s.len, 0); in seq_buf_init_test()
20 KUNIT_EXPECT_FALSE(test, seq_buf_has_overflowed(&s)); in seq_buf_init_test()
21 KUNIT_EXPECT_EQ(test, seq_buf_buffer_left(&s), 32); in seq_buf_init_test()
22 KUNIT_EXPECT_EQ(test, seq_buf_used(&s), 0); in seq_buf_init_test()
23 KUNIT_EXPECT_STREQ(test, seq_buf_str(&s), ""); in seq_buf_init_test()
26 static void seq_buf_declare_test(struct kunit *test) in seq_buf_declare_test() argument
30 KUNIT_EXPECT_EQ(test, s.size, 24); in seq_buf_declare_test()
31 KUNIT_EXPECT_EQ(test, s.len, 0); in seq_buf_declare_test()
[all …]
H A Dbase64_kunit.c38 static void run_perf_and_check(struct kunit *test, const char *label, int size, in run_perf_and_check() argument
47 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, in); in run_perf_and_check()
48 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, enc); in run_perf_and_check()
49 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, decoded); in run_perf_and_check()
56 KUNIT_EXPECT_EQ(test, dec_len, size); in run_perf_and_check()
57 KUNIT_EXPECT_MEMEQ(test, decoded, in, size); in run_perf_and_check()
63 kunit_info(test, "[%s] encode run : %lluns", label, t1); in run_perf_and_check()
67 kunit_info(test, "[%s] decode run : %lluns", label, t2); in run_perf_and_check()
74 static void base64_performance_tests(struct kunit *test) in base64_performance_tests() argument
77 run_perf_and_check(test, "64B", 64, BASE64_STD); in base64_performance_tests()
[all …]
/linux/drivers/gpu/drm/vkms/tests/
H A Dvkms_config_test.c89 static void vkms_config_test_empty_config(struct kunit *test) in vkms_config_test_empty_config() argument
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()
132 static void vkms_config_test_default_config(struct kunit *test) in vkms_config_test_default_config() argument
134 const struct default_config_case *params = test->param_value; in vkms_config_test_default_config()
[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 …]
/linux/drivers/net/ethernet/microchip/vcap/
H A Dvcap_api_kunit.c246 static void test_vcap_xn_rule_creator(struct kunit *test, int cid, in test_vcap_xn_rule_creator() argument
285 KUNIT_ASSERT_NE(test, VCAP_KFS_NO_VALUE, keyset); in test_vcap_xn_rule_creator()
290 KUNIT_EXPECT_PTR_NE(test, NULL, rule); in test_vcap_xn_rule_creator()
304 KUNIT_EXPECT_EQ(test, 0, ret); in test_vcap_xn_rule_creator()
305 KUNIT_EXPECT_EQ(test, keyset, rule->keyset); in test_vcap_xn_rule_creator()
306 KUNIT_EXPECT_EQ(test, actionset, rule->actionset); in test_vcap_xn_rule_creator()
307 KUNIT_EXPECT_EQ(test, size, ri->size); in test_vcap_xn_rule_creator()
311 KUNIT_EXPECT_EQ(test, 0, ret); in test_vcap_xn_rule_creator()
312 KUNIT_EXPECT_EQ(test, expected_addr, ri->addr); in test_vcap_xn_rule_creator()
328 static void vcap_api_set_bit_1_test(struct kunit *test) in vcap_api_set_bit_1_test() argument
[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 += dso-data.o
7 perf-test-y += vmlinux-kallsyms.o
8 perf-test-y += openat-syscall.o
9 perf-test-y += openat-syscall-all-cpus.o
10 perf-test-$(CONFIG_LIBTRACEEVENT) += openat-syscall-tp-fields.o
11 perf-test-y += mmap-basic.o
12 perf-test-y += perf-record.o
[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() 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()
47 static void clk_gate_register_test_parent_data(struct kunit *test) in clk_gate_register_test_parent_data() argument
[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() 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()
49 test->priv = relay; in relay_test_init()
65 struct kunit *test = kunit_get_current_test(); in replacement_xe_guc_ct_send_recv_always_fails() local
[all …]
H A Dxe_guc_db_mgr_test.c11 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()
34 KUNIT_EXPECT_LT(test, xe_guc_db_mgr_reserve_range(dbm, 1, 0), 0); in test_empty()
[all …]
H A Dxe_guc_buf_kunit.c23 struct kunit *test = kunit_get_current_test(); in replacement_xe_managed_bo_create_pin_map() local
28 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, bo); in replacement_xe_managed_bo_create_pin_map()
31 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); in replacement_xe_managed_bo_create_pin_map()
42 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, bo->ggtt_node[tile->id]); in replacement_xe_managed_bo_create_pin_map()
44 KUNIT_ASSERT_EQ(test, 0, in replacement_xe_managed_bo_create_pin_map()
52 static int guc_buf_test_init(struct kunit *test) in guc_buf_test_init() argument
62 test->priv = &fake; in guc_buf_test_init()
63 xe_kunit_helper_xe_device_test_init(test); in guc_buf_test_init()
65 ggtt = xe_device_get_root_tile(test->priv)->mem.ggtt; in guc_buf_test_init()
66 guc = &xe_device_get_gt(test->priv, 0)->uc.guc; in guc_buf_test_init()
[all …]
/linux/mm/damon/tests/
H A Dcore-kunit.h17 static void damon_test_regions(struct kunit *test) in damon_test_regions() argument
24 kunit_skip(test, "region alloc fail"); in damon_test_regions()
25 KUNIT_EXPECT_EQ(test, 1ul, r->ar.start); in damon_test_regions()
26 KUNIT_EXPECT_EQ(test, 2ul, r->ar.end); in damon_test_regions()
27 KUNIT_EXPECT_EQ(test, 0u, r->nr_accesses); in damon_test_regions()
32 kunit_skip(test, "target alloc fail"); in damon_test_regions()
34 KUNIT_EXPECT_EQ(test, 0u, damon_nr_regions(t)); in damon_test_regions()
37 KUNIT_EXPECT_EQ(test, 1u, damon_nr_regions(t)); in damon_test_regions()
40 KUNIT_EXPECT_EQ(test, 0u, damon_nr_regions(t)); in damon_test_regions()
56 static void damon_test_target(struct kunit *test) in damon_test_target() argument
[all …]

12345678910>>...53