/linux-6.3-rc2/drivers/gpu/drm/tests/ |
A D | drm_damage_helper_test.c | 30 mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); in drm_damage_helper_init() 37 mock->state.fb = &mock->fb; in drm_damage_helper_init() 40 mock->old_state.plane = &mock->plane; in drm_damage_helper_init() 41 mock->state.plane = &mock->plane; in drm_damage_helper_init() 44 mock->device.driver = &mock->driver; in drm_damage_helper_init() 45 mock->device.mode_config.prop_fb_damage_clips = &mock->prop; in drm_damage_helper_init() 46 mock->plane.dev = &mock->device; in drm_damage_helper_init() 48 mock->plane.base.properties = &mock->obj_props; in drm_damage_helper_init() 50 mock->prop.dev = &mock->device; in drm_damage_helper_init() 127 set_plane_src(&mock->old_state, 0, 0, mock->fb.width << 16, mock->fb.height << 16); in drm_test_damage_iter_no_damage() [all …]
|
A D | drm_plane_helper_test.c | 52 struct drm_plane_state *mock; in drm_plane_helper_init() local 62 mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); in drm_plane_helper_init() 64 mock->plane = plane; in drm_plane_helper_init() 65 mock->crtc = ZERO_SIZE_PTR; in drm_plane_helper_init() 66 mock->fb = fb; in drm_plane_helper_init() 68 mock->src_x = params->src.x; in drm_plane_helper_init() 69 mock->src_y = params->src.y; in drm_plane_helper_init() 70 mock->src_w = params->src.w; in drm_plane_helper_init() 71 mock->src_h = params->src.h; in drm_plane_helper_init() 72 mock->crtc_x = params->crtc.x; in drm_plane_helper_init() [all …]
|
A D | drm_framebuffer_test.c | 335 struct drm_device *mock; in drm_framebuffer_test_init() local 337 mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); in drm_framebuffer_test_init() 338 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, mock); in drm_framebuffer_test_init() 340 mock->mode_config.min_width = MIN_WIDTH; in drm_framebuffer_test_init() 341 mock->mode_config.max_width = MAX_WIDTH; in drm_framebuffer_test_init() 342 mock->mode_config.min_height = MIN_HEIGHT; in drm_framebuffer_test_init() 343 mock->mode_config.max_height = MAX_HEIGHT; in drm_framebuffer_test_init() 344 mock->mode_config.funcs = &mock_config_funcs; in drm_framebuffer_test_init() 346 test->priv = mock; in drm_framebuffer_test_init() 353 struct drm_device *mock = test->priv; in drm_test_framebuffer_create() local [all …]
|
/linux-6.3-rc2/drivers/platform/chrome/ |
A D | cros_ec_proto_test.c | 197 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_normal() local 351 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_no_pd_return_error() local 416 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_no_pd_return0() local 481 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_legacy_normal_v3_return_error() local 546 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_legacy_normal_v3_return0() local 611 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_legacy_xfer_error() local 659 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_legacy_return_error() local 707 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_legacy_data_error() local 760 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_legacy_return0() local 808 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_no_mkbp() local [all …]
|
A D | cros_kunit_util.c | 29 if (!mock) { in cros_kunit_ec_xfer_mock() 38 mock->i_data = kunit_kzalloc(mock->test, msg->outsize, GFP_KERNEL); in cros_kunit_ec_xfer_mock() 39 if (mock->i_data) in cros_kunit_ec_xfer_mock() 45 memcpy(msg->data, mock->o_data, min(msg->insize, mock->o_data_len)); in cros_kunit_ec_xfer_mock() 49 return mock->ret; in cros_kunit_ec_xfer_mock() 74 mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); in cros_kunit_ec_xfer_mock_addx() 75 if (!mock) in cros_kunit_ec_xfer_mock_addx() 81 mock->ret = ret; in cros_kunit_ec_xfer_mock_addx() 88 return mock; in cros_kunit_ec_xfer_mock_addx() 96 if (mock) in cros_kunit_ec_xfer_mock_next() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/gem/selftests/ |
A D | mock_dmabuf.c | 59 put_page(mock->pages[i]); in mock_dmabuf_release() 61 kfree(mock); in mock_dmabuf_release() 69 vaddr = vm_map_ram(mock->pages, mock->npages, 0); in mock_dmabuf_vmap() 100 struct mock_dmabuf *mock; in mock_dmabuf() local 105 mock = kmalloc(sizeof(*mock) + npages * sizeof(struct page *), in mock_dmabuf() 107 if (!mock) in mock_dmabuf() 110 mock->npages = npages; in mock_dmabuf() 113 if (!mock->pages[i]) in mock_dmabuf() 120 exp_info.priv = mock; in mock_dmabuf() 130 put_page(mock->pages[i]); in mock_dmabuf() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/gt/ |
A D | mock_engine.c | 97 mock.link); in first_request() 127 if (request->mock.delay) { in hw_delay_complete() 220 request->mock.delay = 0; in mock_request_alloc() 247 if (request->mock.delay) in mock_submit_request() 295 struct mock_engine *mock = in mock_reset_cancel() local 300 del_timer_sync(&mock->hw_delay); in mock_reset_cancel() 310 list_for_each_entry(rq, &mock->hw_queue, mock.link) { in mock_reset_cancel() 327 struct mock_engine *mock = in mock_engine_release() local 431 struct mock_engine *mock = in mock_engine_flush() local 437 spin_lock_irq(&mock->hw_lock); in mock_engine_flush() [all …]
|
A D | selftest_execlists.c | 2778 rq->mock.link.next = &(*prev)->mock.link; in create_gang() 3014 struct i915_request *n = list_next_entry(rq, mock.link); in live_preempt_gang()
|
/linux-6.3-rc2/tools/testing/kunit/ |
A D | kunit_tool_test.py | 10 from unittest import mock 85 self.addCleanup(mock.patch.stopall) 391 mock.patch.object(signal, 'signal').start() 392 self.addCleanup(mock.patch.stopall) 527 self.addCleanup(mock.patch.stopall) 576 self.addCleanup(mock.patch.stopall) 750 @mock.patch.object(kunit_kernel, 'LinuxSourceTree') 805 @mock.patch.object(kunit, '_list_tests') 811 mock_tests.assert_called_once_with(mock.ANY, 818 @mock.patch.object(kunit, '_list_tests') [all …]
|
/linux-6.3-rc2/drivers/iommu/iommufd/ |
A D | selftest.c | 109 struct mock_iommu_domain *mock; in mock_domain_alloc() local 114 mock = kzalloc(sizeof(*mock), GFP_KERNEL); in mock_domain_alloc() 115 if (!mock) in mock_domain_alloc() 120 xa_init(&mock->pfns); in mock_domain_alloc() 121 return &mock->domain; in mock_domain_alloc() 126 struct mock_iommu_domain *mock = in mock_domain_free() local 129 WARN_ON(!xa_empty(&mock->pfns)); in mock_domain_free() 130 kfree(mock); in mock_domain_free() 138 struct mock_iommu_domain *mock = in mock_domain_map_pages() local 167 xa_erase(&mock->pfns, in mock_domain_map_pages() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/selftests/ |
A D | i915_selftest.c | 71 int (*mock)(void); member 76 #define selftest(n, f) [mock_##n] = { .name = #n, { .mock = f } }, 163 err = st->mock(); in __run_selftests() 185 if (!i915_selftest.mock) in i915_mock_selftests() 188 err = run_selftests(mock, NULL); in i915_mock_selftests() 190 i915_selftest.mock = err; in i915_mock_selftests() 194 if (i915_selftest.mock < 0) { in i915_mock_selftests() 195 i915_selftest.mock = -ENOTTY; in i915_mock_selftests() 433 module_param_named_unsafe(mock_selftests, i915_selftest.mock, int, 0400);
|
A D | mock_request.c | 40 request->mock.delay = delay; in mock_request() 51 was_queued = !list_empty(&request->mock.link); in mock_cancel_request() 52 list_del_init(&request->mock.link); in mock_cancel_request()
|
/linux-6.3-rc2/drivers/gpu/drm/vc4/tests/ |
A D | vc4_mock.c | 141 const struct vc4_mock_desc *mock) in __build_mock() argument 145 for (i = 0; i < mock->npipes; i++) { in __build_mock() 146 const struct vc4_mock_pipe_desc *pipe = &mock->pipes[i]; in __build_mock()
|
/linux-6.3-rc2/tools/testing/cxl/test/ |
A D | mock.c | 14 static LIST_HEAD(mock); 18 list_add_rcu(&ops->list, &mock); in register_cxl_mock_ops() 34 return list_first_or_null_rcu(&mock, struct cxl_mock_ops, list); in get_cxl_mock_ops()
|
A D | Kbuild | 9 cxl_mock-y := mock.o
|
/linux-6.3-rc2/drivers/net/dsa/ |
A D | Kconfig | 20 tristate "DSA mock-up Ethernet switch chip support" 24 This enables support for a fake mock-up switch chip which
|
/linux-6.3-rc2/drivers/gpu/drm/i915/ |
A D | i915_selftest.h | 37 int mock; member
|
A D | i915_request.h | 359 } mock;)
|
/linux-6.3-rc2/Documentation/gpu/ |
A D | vc4.rst | 63 These tests are using a mock driver and can be ran using the
|
/linux-6.3-rc2/Documentation/dev-tools/kunit/ |
A D | index.rst | 32 It is inspired by JUnit, Python’s unittest.mock, and GoogleTest/GoogleMock
|
A D | usage.rst | 655 The example below uses this to implement a "mock" implementation of a function, ``foo``:
|
/linux-6.3-rc2/drivers/nvdimm/ |
A D | Kconfig | 144 test implement a mock state machine.
|
/linux-6.3-rc2/Documentation/dev-tools/kunit/api/ |
A D | functionredirection.rst | 25 replacing access to and mutation of this state with a "fake" or "mock" variant.
|
/linux-6.3-rc2/Documentation/networking/ |
A D | nexthop-group-resilient.rst | 278 The netdevsim driver implements a mock offload of resilient groups, and
|