/linux/drivers/gpu/drm/tests/ |
H A D | drm_cmdline_parser_test.c | 14 static void drm_test_cmdline_force_e_only(struct kunit *test) in drm_test_cmdline_force_e_only() argument 19 KUNIT_ASSERT_TRUE(test, drm_mode_parse_command_line_for_connector(cmdline, in drm_test_cmdline_force_e_only() 21 KUNIT_EXPECT_FALSE(test, mode.specified); in drm_test_cmdline_force_e_only() 22 KUNIT_EXPECT_FALSE(test, mode.refresh_specified); in drm_test_cmdline_force_e_only() 23 KUNIT_EXPECT_FALSE(test, mode.bpp_specified); in drm_test_cmdline_force_e_only() 25 KUNIT_EXPECT_FALSE(test, mode.rb); in drm_test_cmdline_force_e_only() 26 KUNIT_EXPECT_FALSE(test, mode.cvt); in drm_test_cmdline_force_e_only() 27 KUNIT_EXPECT_FALSE(test, mode.interlace); in drm_test_cmdline_force_e_only() 28 KUNIT_EXPECT_FALSE(test, mode.margins); in drm_test_cmdline_force_e_only() 29 KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_ON); in drm_test_cmdline_force_e_only() [all …]
|
H A D | drm_format_test.c | 12 static void drm_test_format_block_width_invalid(struct kunit *test) in drm_test_format_block_width_invalid() 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 D | drm_hdmi_state_helper_test.c | 58 static int light_up_connector(struct kunit *test, in light_up_connector() argument 70 state = drm_kunit_helper_atomic_state_alloc(test, drm, ctx); in light_up_connector() 71 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, state); in light_up_connector() 75 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state); in light_up_connector() 84 KUNIT_EXPECT_EQ(test, ret, 0); in light_up_connector() 87 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, crtc_state); in light_up_connector() 90 KUNIT_EXPECT_EQ(test, ret, 0); in light_up_connector() 96 KUNIT_ASSERT_EQ(test, ret, 0); in light_up_connector() 101 static int set_connector_edid(struct kunit *test, struct drm_connector *connector, in set_connector_edid() argument 186 drm_kunit_helper_connector_hdmi_init_funcs(struct kunit *test, in drm_kunit_helper_connector_hdmi_init_funcs() argument [all …]
|
H A D | drm_gem_shmem_test.c | 43 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 D | drm_connector_test.c | 60 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 …]
|
/linux/lib/kunit/ |
H A D | kunit-test.c | 25 struct kunit *test = data; in kunit_test_successful_try() local 26 struct kunit_try_catch_test_context *ctx = test->priv; in kunit_test_successful_try() 33 struct kunit *test = data; in kunit_test_no_catch() local 35 KUNIT_FAIL(test, "Catch should not be called\n"); in kunit_test_no_catch() 38 static void kunit_test_try_catch_successful_try_no_catch(struct kunit *test) in kunit_test_try_catch_successful_try_no_catch() argument 40 struct kunit_try_catch_test_context *ctx = test->priv; in kunit_test_try_catch_successful_try_no_catch() 44 test, in kunit_test_try_catch_successful_try_no_catch() 47 kunit_try_catch_run(try_catch, test); in kunit_test_try_catch_successful_try_no_catch() 49 KUNIT_EXPECT_TRUE(test, ctx->function_called); in kunit_test_try_catch_successful_try_no_catch() 54 struct kunit *test = data; in kunit_test_unsuccessful_try() local [all …]
|
H A D | kunit-example-test.c | 22 static void example_simple_test(struct kunit *test) in example_simple_test() argument 30 KUNIT_EXPECT_EQ(test, 1 + 1, 2); in example_simple_test() 37 static int example_test_init(struct kunit *test) in example_test_init() argument 39 kunit_info(test, "initializing\n"); in example_test_init() 48 static void example_test_exit(struct kunit *test) in example_test_exit() argument 50 kunit_info(test, "cleaning up\n"); in example_test_exit() 78 static void example_skip_test(struct kunit *test) in example_skip_test() argument 81 kunit_info(test, "You should not see a line below."); in example_skip_test() 84 kunit_skip(test, "this test should be skipped"); in example_skip_test() 87 KUNIT_FAIL(test, "You should not see this line."); in example_skip_test() [all …]
|
H A D | assert_test.c | 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() 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 D | executor_test.c | 12 static void free_suite_set_at_end(struct kunit *test, const void *to_free); 13 static struct kunit_suite *alloc_fake_suite(struct kunit *test, 17 static void dummy_test(struct kunit *test) {} in dummy_test() 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 …]
|
H A D | platform-test.c | 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() 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() 33 KUNIT_EXPECT_EQ(test, 0, kunit_platform_device_add(test, pdev)); in kunit_platform_device_add_test() 34 KUNIT_EXPECT_TRUE(test, dev_is_platform(&pdev->dev)); in kunit_platform_device_add_test() 35 KUNIT_EXPECT_STREQ(test, pdev->name, name); in kunit_platform_device_add_test() 36 KUNIT_EXPECT_EQ(test, pdev->id, id); in kunit_platform_device_add_test() [all …]
|
/linux/drivers/platform/chrome/ |
H A D | cros_ec_proto_test.c | 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() 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/lib/ |
H A D | string_kunit.c | 16 #define STRCMP_TEST_EXPECT_EQUAL(test, fn, ...) KUNIT_EXPECT_EQ(test, fn(__VA_ARGS__), 0) argument 17 #define STRCMP_TEST_EXPECT_LOWER(test, fn, ...) KUNIT_EXPECT_LT(test, fn(__VA_ARGS__), 0) argument 18 #define STRCMP_TEST_EXPECT_GREATER(test, fn, ...) KUNIT_EXPECT_GT(test, fn(__VA_ARGS__), 0) argument 20 static void string_test_memset16(struct kunit *test) in string_test_memset16() argument 25 p = kunit_kzalloc(test, 256 * 2 * 2, GFP_KERNEL); in string_test_memset16() 26 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, p); in string_test_memset16() 35 KUNIT_ASSERT_EQ_MSG(test, v, 0xa1a1, in string_test_memset16() 38 KUNIT_ASSERT_EQ_MSG(test, v, 0xb1b2, in string_test_memset16() 41 KUNIT_ASSERT_EQ_MSG(test, v, 0xa1a1, in string_test_memset16() 49 static void string_test_memset32(struct kunit *test) in string_test_memset32() argument [all …]
|
H A D | fortify_kunit.c | 84 static void fortify_test_known_sizes(struct kunit *test) in fortify_test_known_sizes() argument 86 KUNIT_EXPECT_EQ(test, __compiletime_strlen("88888888"), 8); in fortify_test_known_sizes() 87 KUNIT_EXPECT_EQ(test, __compiletime_strlen(array_of_10), 10); in fortify_test_known_sizes() 88 KUNIT_EXPECT_EQ(test, __compiletime_strlen(ptr_of_11), 11); in fortify_test_known_sizes() 90 KUNIT_EXPECT_EQ(test, __compiletime_strlen(array_unknown), SIZE_MAX); in fortify_test_known_sizes() 92 KUNIT_EXPECT_EQ(test, __compiletime_strlen(test->name), SIZE_MAX); in fortify_test_known_sizes() 117 static void fortify_test_control_flow_split(struct kunit *test) in fortify_test_control_flow_split() argument 119 KUNIT_EXPECT_EQ(test, want_minus_one(pick), SIZE_MAX); in fortify_test_control_flow_split() 122 #define KUNIT_EXPECT_BOS(test, p, expected, name) \ argument 123 KUNIT_EXPECT_EQ_MSG(test, __builtin_object_size(p, 1), \ [all …]
|
H A D | list-test.c | 18 static void list_test_list_init(struct kunit *test) in list_test_list_init() argument 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 56 KUNIT_EXPECT_PTR_EQ(test, list.next, &b); in list_test_list_add() 57 KUNIT_EXPECT_PTR_EQ(test, b.prev, &list); in list_test_list_add() 58 KUNIT_EXPECT_PTR_EQ(test, b.next, &a); in list_test_list_add() [all …]
|
/linux/mm/kasan/ |
H A D | kasan_test_c.c | 91 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() 118 #define KUNIT_EXPECT_KASAN_FAIL(test, expression) do { \ argument 122 KUNIT_EXPECT_FALSE(test, READ_ONCE(test_status.report_found)); \ 129 KUNIT_FAIL(test, KUNIT_SUBTEST_INDENT "KASAN failure " \ 144 #define KASAN_TEST_NEEDS_CONFIG_ON(test, config) do { \ argument 146 kunit_skip((test), "Test requires " #config "=y"); \ 149 #define KASAN_TEST_NEEDS_CONFIG_OFF(test, config) do { \ argument 151 kunit_skip((test), "Test requires " #config "=n"); \ 154 #define KASAN_TEST_NEEDS_CHECKED_MEMINTRINSICS(test) do { \ argument [all …]
|
/linux/drivers/base/test/ |
H A D | property-entry-test.c | 10 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/drivers/thunderbolt/ |
H A D | test.c | 9 #include <kunit/test.h> 31 static void kunit_ida_init(struct kunit *test, struct ida *ida) in kunit_ida_init() argument 33 kunit_alloc_resource(test, __ida_init, __ida_destroy, GFP_KERNEL, ida); in kunit_ida_init() 36 static struct tb_switch *alloc_switch(struct kunit *test, u64 route, in alloc_switch() argument 43 sw = kunit_kzalloc(test, sizeof(*sw), GFP_KERNEL); in alloc_switch() 55 sw->ports = kunit_kzalloc(test, size, GFP_KERNEL); in alloc_switch() 64 kunit_ida_init(test, &sw->ports[i].in_hopids); in alloc_switch() 65 kunit_ida_init(test, &sw->ports[i].out_hopids); in alloc_switch() 72 static struct tb_switch *alloc_host(struct kunit *test) in alloc_host() argument 76 sw = alloc_switch(test, in alloc_host() 154 alloc_host_usb4(struct kunit * test) alloc_host_usb4() argument 173 alloc_host_br(struct kunit * test) alloc_host_br() argument 190 alloc_dev_default(struct kunit * test,struct tb_switch * parent,u64 route,bool bonded) alloc_dev_default() argument 340 alloc_dev_with_dpin(struct kunit * test,struct tb_switch * parent,u64 route,bool bonded) alloc_dev_with_dpin() argument 361 alloc_dev_without_dp(struct kunit * test,struct tb_switch * parent,u64 route,bool bonded) alloc_dev_without_dp() argument 402 alloc_dev_usb4(struct kunit * test,struct tb_switch * parent,u64 route,bool bonded) alloc_dev_usb4() argument 423 tb_test_path_basic(struct kunit * test) tb_test_path_basic() argument 440 tb_test_path_not_connected_walk(struct kunit * test) tb_test_path_not_connected_walk() argument 479 tb_test_path_single_hop_walk(struct kunit * test) tb_test_path_single_hop_walk() argument 533 tb_test_path_daisy_chain_walk(struct kunit * test) tb_test_path_daisy_chain_walk() argument 592 tb_test_path_simple_tree_walk(struct kunit * test) tb_test_path_simple_tree_walk() argument 655 tb_test_path_complex_tree_walk(struct kunit * test) tb_test_path_complex_tree_walk() argument 739 tb_test_path_max_length_walk(struct kunit * test) tb_test_path_max_length_walk() argument 842 tb_test_path_not_connected(struct kunit * test) tb_test_path_not_connected() argument 870 tb_test_path_not_bonded_lane0(struct kunit * test) tb_test_path_not_bonded_lane0() argument 928 tb_test_path_not_bonded_lane1(struct kunit * test) tb_test_path_not_bonded_lane1() argument 990 tb_test_path_not_bonded_lane1_chain(struct kunit * test) tb_test_path_not_bonded_lane1_chain() argument 1070 tb_test_path_not_bonded_lane1_chain_reverse(struct kunit * test) tb_test_path_not_bonded_lane1_chain_reverse() argument 1150 tb_test_path_mixed_chain(struct kunit * test) tb_test_path_mixed_chain() argument 1242 tb_test_path_mixed_chain_reverse(struct kunit * test) tb_test_path_mixed_chain_reverse() argument 1334 tb_test_tunnel_pcie(struct kunit * test) tb_test_tunnel_pcie() argument 1389 tb_test_tunnel_dp(struct kunit * test) tb_test_tunnel_dp() argument 1427 tb_test_tunnel_dp_chain(struct kunit * test) tb_test_tunnel_dp_chain() argument 1473 tb_test_tunnel_dp_tree(struct kunit * test) tb_test_tunnel_dp_tree() argument 1523 tb_test_tunnel_dp_max_length(struct kunit * test) tb_test_tunnel_dp_max_length() argument 1603 tb_test_tunnel_3dp(struct kunit * test) tb_test_tunnel_3dp() argument 1668 tb_test_tunnel_usb3(struct kunit * test) tb_test_tunnel_usb3() argument 1723 tb_test_tunnel_port_on_path(struct kunit * test) tb_test_tunnel_port_on_path() argument 1789 tb_test_tunnel_dma(struct kunit * test) tb_test_tunnel_dma() argument 1832 tb_test_tunnel_dma_rx(struct kunit * test) tb_test_tunnel_dma_rx() argument 1869 tb_test_tunnel_dma_tx(struct kunit * test) tb_test_tunnel_dma_tx() argument 1906 tb_test_tunnel_dma_chain(struct kunit * test) tb_test_tunnel_dma_chain() argument 1972 tb_test_tunnel_dma_match(struct kunit * test) tb_test_tunnel_dma_match() argument 2023 tb_test_credit_alloc_legacy_not_bonded(struct kunit * test) tb_test_credit_alloc_legacy_not_bonded() argument 2056 tb_test_credit_alloc_legacy_bonded(struct kunit * test) tb_test_credit_alloc_legacy_bonded() argument 2089 tb_test_credit_alloc_pcie(struct kunit * test) tb_test_credit_alloc_pcie() argument 2122 tb_test_credit_alloc_without_dp(struct kunit * test) tb_test_credit_alloc_without_dp() argument 2172 tb_test_credit_alloc_dp(struct kunit * test) tb_test_credit_alloc_dp() argument 2216 tb_test_credit_alloc_usb3(struct kunit * test) tb_test_credit_alloc_usb3() argument 2249 tb_test_credit_alloc_dma(struct kunit * test) tb_test_credit_alloc_dma() argument 2285 tb_test_credit_alloc_dma_multiple(struct kunit * test) tb_test_credit_alloc_dma_multiple() argument 2382 TB_TEST_PCIE_TUNNEL(struct kunit * test,struct tb_switch * host,struct tb_switch * dev) TB_TEST_PCIE_TUNNEL() argument 2412 TB_TEST_DP_TUNNEL1(struct kunit * test,struct tb_switch * host,struct tb_switch * dev) TB_TEST_DP_TUNNEL1() argument 2449 TB_TEST_DP_TUNNEL2(struct kunit * test,struct tb_switch * host,struct tb_switch * dev) TB_TEST_DP_TUNNEL2() argument 2486 TB_TEST_USB3_TUNNEL(struct kunit * test,struct tb_switch * host,struct tb_switch * dev) TB_TEST_USB3_TUNNEL() argument 2516 TB_TEST_DMA_TUNNEL1(struct kunit * test,struct tb_switch * host,struct tb_switch * dev) TB_TEST_DMA_TUNNEL1() argument 2546 TB_TEST_DMA_TUNNEL2(struct kunit * test,struct tb_switch * host,struct tb_switch * dev) TB_TEST_DMA_TUNNEL2() argument 2576 tb_test_credit_alloc_all(struct kunit * test) tb_test_credit_alloc_all() argument 2666 tb_test_property_parse(struct kunit * test) tb_test_property_parse() argument 2726 tb_test_property_format(struct kunit * test) tb_test_property_format() argument 2753 compare_dirs(struct kunit * test,struct tb_property_dir * d1,struct tb_property_dir * d2) compare_dirs() argument 2823 tb_test_property_copy(struct kunit * test) tb_test_property_copy() argument [all...] |
/linux/drivers/gpu/drm/ttm/tests/ |
H A D | ttm_tt_test.c | 39 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 D | vcap_api_kunit.c | 246 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/drivers/clk/ |
H A D | clk_test.c | 178 static int clk_test_init_with_ops(struct kunit *test, const struct clk_ops *ops) in clk_test_init_with_ops() argument 184 ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL); in clk_test_init_with_ops() 188 test->priv = ctx; in clk_test_init_with_ops() 201 static int clk_test_init(struct kunit *test) in clk_test_init() argument 203 return clk_test_init_with_ops(test, &clk_dummy_rate_ops); in clk_test_init() 206 static int clk_maximize_test_init(struct kunit *test) in clk_maximize_test_init() argument 208 return clk_test_init_with_ops(test, &clk_dummy_maximize_rate_ops); in clk_maximize_test_init() 211 static int clk_minimize_test_init(struct kunit *test) in clk_minimize_test_init() argument 213 return clk_test_init_with_ops(test, &clk_dummy_minimize_rate_ops); in clk_minimize_test_init() 216 static void clk_test_exit(struct kunit *test) in clk_test_exit() argument [all …]
|
H A D | clk-gate_test.c | 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() 47 static void clk_gate_register_test_parent_data(struct kunit *test) in clk_gate_register_test_parent_data() argument [all …]
|
/linux/sound/soc/codecs/ |
H A D | cs-amp-lib-test.c | 37 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 39 struct cs_amp_lib_test_priv *priv = test->priv; in cs_amp_lib_test_init_dummy_cal_blob() 46 priv->cal_blob = kunit_kzalloc(test, blob_size, GFP_KERNEL); in cs_amp_lib_test_init_dummy_cal_blob() 47 KUNIT_ASSERT_NOT_NULL(test, priv->cal_blob); in cs_amp_lib_test_init_dummy_cal_blob() 63 static u64 cs_amp_lib_test_get_target_uid(struct kunit *test) in cs_amp_lib_test_get_target_uid() argument 65 struct cs_amp_lib_test_priv *priv = test->priv; in cs_amp_lib_test_get_target_uid() 66 const struct cs_amp_lib_test_param *param = test->param_value; in cs_amp_lib_test_get_target_uid() 91 static void cs_amp_lib_test_cal_data_too_short_test(struct kunit *test) in cs_amp_lib_test_cal_data_too_short_test() argument 93 struct cs_amp_lib_test_priv *priv = test->priv; in cs_amp_lib_test_cal_data_too_short_test() 98 kunit_activate_static_stub(test, in cs_amp_lib_test_cal_data_too_short_test() [all …]
|
/linux/drivers/gpu/drm/xe/tests/ |
H A D | xe_guc_relay_test.c | 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() 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 D | xe_guc_db_mgr_test.c | 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() 34 KUNIT_EXPECT_LT(test, xe_guc_db_mgr_reserve_range(dbm, 1, 0), 0); in test_empty() [all …]
|
/linux/drivers/firewire/ |
H A D | device-attribute-test.c | 82 static void device_attr_simple_avc(struct kunit *test) in device_attr_simple_avc() argument 101 char *buf = kunit_kzalloc(test, PAGE_SIZE, GFP_KERNEL); in device_attr_simple_avc() 102 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, buf); in device_attr_simple_avc() 107 KUNIT_ASSERT_TRUE(test, is_fw_device(node_dev)); in device_attr_simple_avc() 108 KUNIT_ASSERT_FALSE(test, is_fw_unit(node_dev)); in device_attr_simple_avc() 109 KUNIT_ASSERT_PTR_EQ(test, fw_device(node_dev), &node); in device_attr_simple_avc() 111 KUNIT_ASSERT_FALSE(test, is_fw_device(unit0_dev)); in device_attr_simple_avc() 112 KUNIT_ASSERT_TRUE(test, is_fw_unit(unit0_dev)); in device_attr_simple_avc() 113 KUNIT_ASSERT_PTR_EQ(test, fw_parent_device((&unit0)), &node); in device_attr_simple_avc() 114 KUNIT_ASSERT_PTR_EQ(test, fw_unit(unit0_dev), &unit0); in device_attr_simple_avc() [all …]
|