/Linux-v6.6/drivers/gpu/drm/tests/ |
D | drm_damage_helper_test.c | 28 struct drm_damage_mock *mock; in drm_damage_helper_init() local 30 mock = kunit_kzalloc(test, sizeof(*mock), GFP_KERNEL); in drm_damage_helper_init() 31 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, mock); in drm_damage_helper_init() 33 mock->fb.width = 2048; in drm_damage_helper_init() 34 mock->fb.height = 2048; in drm_damage_helper_init() 36 mock->state.crtc = ZERO_SIZE_PTR; in drm_damage_helper_init() 37 mock->state.fb = &mock->fb; in drm_damage_helper_init() 38 mock->state.visible = true; 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() [all …]
|
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() 63 KUNIT_ASSERT_NOT_NULL(test, mock); 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() 67 mock->rotation = params->rotation; 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() [all …]
|
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-v6.6/drivers/platform/chrome/ |
D | cros_ec_proto_test.c | 197 struct ec_xfer_mock *mock; in cros_ec_proto_test_query_all_normal() local 204 mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data)); in cros_ec_proto_test_query_all_normal() 205 KUNIT_ASSERT_PTR_NE(test, mock, NULL); in cros_ec_proto_test_query_all_normal() 207 data = (struct ec_response_get_protocol_info *)mock->o_data; in cros_ec_proto_test_query_all_normal() 217 mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data)); in cros_ec_proto_test_query_all_normal() 218 KUNIT_ASSERT_PTR_NE(test, mock, NULL); in cros_ec_proto_test_query_all_normal() 220 data = (struct ec_response_get_protocol_info *)mock->o_data; in cros_ec_proto_test_query_all_normal() 228 mock = cros_kunit_ec_xfer_mock_add(test, sizeof(*data)); in cros_ec_proto_test_query_all_normal() 229 KUNIT_ASSERT_PTR_NE(test, mock, NULL); in cros_ec_proto_test_query_all_normal() 231 data = (struct ec_response_get_cmd_versions *)mock->o_data; in cros_ec_proto_test_query_all_normal() [all …]
|
D | cros_kunit_util.c | 26 struct ec_xfer_mock *mock; in cros_kunit_ec_xfer_mock() local 28 mock = list_first_entry_or_null(&cros_kunit_ec_xfer_mock_in, struct ec_xfer_mock, list); in cros_kunit_ec_xfer_mock() 29 if (!mock) { in cros_kunit_ec_xfer_mock() 34 list_del(&mock->list); in cros_kunit_ec_xfer_mock() 36 memcpy(&mock->msg, msg, sizeof(*msg)); 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() 40 memcpy(mock->i_data, msg->data, msg->outsize); in cros_kunit_ec_xfer_mock() 43 msg->result = mock->result; 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() [all …]
|
/Linux-v6.6/drivers/gpu/drm/i915/gem/selftests/ |
D | mock_dmabuf.c | 12 struct mock_dmabuf *mock = to_mock(attachment->dmabuf); in mock_map_dma_buf() local 21 err = sg_alloc_table(st, mock->npages, GFP_KERNEL); in mock_map_dma_buf() 26 for (i = 0; i < mock->npages; i++) { in mock_map_dma_buf() 27 sg_set_page(sg, mock->pages[i], PAGE_SIZE, 0); in mock_map_dma_buf() 55 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_release() local 58 for (i = 0; i < mock->npages; i++) in mock_dmabuf_release() 59 put_page(mock->pages[i]); in mock_dmabuf_release() 61 kfree(mock); in mock_dmabuf_release() 66 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vmap() local 69 vaddr = vm_map_ram(mock->pages, mock->npages, 0); in mock_dmabuf_vmap() [all …]
|
/Linux-v6.6/drivers/gpu/drm/i915/gt/ |
D | mock_engine.c | 97 mock.link); in first_request() 102 list_del_init(&request->mock.link); in advance() 127 if (request->mock.delay) { in hw_delay_complete() 129 jiffies + request->mock.delay); in hw_delay_complete() 219 INIT_LIST_HEAD(&request->mock.link); in mock_request_alloc() 220 request->mock.delay = 0; in mock_request_alloc() 245 list_add_tail(&request->mock.link, &engine->hw_queue); in mock_submit_request() 246 if (list_is_first(&request->mock.link, &engine->hw_queue)) { in mock_submit_request() 247 if (request->mock.delay) in mock_submit_request() 249 jiffies + request->mock.delay); in mock_submit_request() [all …]
|
D | selftest_execlists.c | 2782 rq->mock.link.next = &(*prev)->mock.link; in create_gang() 3018 struct i915_request *n = list_next_entry(rq, mock.link); in live_preempt_gang()
|
/Linux-v6.6/tools/testing/kunit/ |
D | kunit_tool_test.py | 10 from unittest import mock 84 self.print_mock = mock.patch('kunit_printer.Printer.print').start() 85 self.addCleanup(mock.patch.stopall) 210 print_mock = mock.patch('kunit_printer.Printer.print').start() 391 mock.patch.object(signal, 'signal').start() 392 self.addCleanup(mock.patch.stopall) 454 mock.patch.object(tree._ops, 'start', side_effect=fake_start).start() 474 mock_build_config = mock.patch.object(tree, 'build_config').start() 495 mock_build_config = mock.patch.object(tree, 'build_config').start() 515 mock_build_config = mock.patch.object(tree, 'build_config').start() [all …]
|
/Linux-v6.6/drivers/iommu/iommufd/ |
D | selftest.c | 151 struct mock_iommu_domain *mock; in mock_domain_alloc() local 159 mock = kzalloc(sizeof(*mock), GFP_KERNEL); in mock_domain_alloc() 160 if (!mock) in mock_domain_alloc() 162 mock->domain.geometry.aperture_start = MOCK_APERTURE_START; in mock_domain_alloc() 163 mock->domain.geometry.aperture_end = MOCK_APERTURE_LAST; in mock_domain_alloc() 164 mock->domain.pgsize_bitmap = MOCK_IO_PAGE_SIZE; in mock_domain_alloc() 165 xa_init(&mock->pfns); in mock_domain_alloc() 166 return &mock->domain; in mock_domain_alloc() 171 struct mock_iommu_domain *mock = in mock_domain_free() local 174 WARN_ON(!xa_empty(&mock->pfns)); in mock_domain_free() [all …]
|
/Linux-v6.6/drivers/gpu/drm/i915/selftests/ |
D | i915_selftest.c | 73 int (*mock)(void); member 78 #define selftest(n, f) [mock_##n] = { .name = #n, { .mock = f } }, 190 err = st->mock(); in __run_selftests() 212 if (!i915_selftest.mock) in i915_mock_selftests() 215 err = run_selftests(mock, NULL); in i915_mock_selftests() 217 i915_selftest.mock = err; in i915_mock_selftests() 221 if (i915_selftest.mock < 0) { in i915_mock_selftests() 222 i915_selftest.mock = -ENOTTY; in i915_mock_selftests() 464 module_param_named_unsafe(mock_selftests, i915_selftest.mock, int, 0400);
|
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-v6.6/drivers/gpu/drm/vc4/tests/ |
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-v6.6/tools/testing/cxl/test/ |
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()
|
D | Kbuild | 9 cxl_mock-y := mock.o
|
/Linux-v6.6/drivers/gpu/drm/i915/ |
D | i915_selftest.h | 37 int mock; member
|
D | i915_request.h | 359 } mock;)
|
/Linux-v6.6/drivers/net/dsa/ |
D | Kconfig | 20 tristate "DSA mock-up Ethernet switch chip support" 24 This enables support for a fake mock-up switch chip which
|
/Linux-v6.6/Documentation/gpu/ |
D | vc4.rst | 63 These tests are using a mock driver and can be ran using the
|
/Linux-v6.6/Documentation/dev-tools/kunit/ |
D | index.rst | 32 It is inspired by JUnit, Python’s unittest.mock, and GoogleTest/GoogleMock
|
D | usage.rst | 720 The example below uses this to implement a "mock" implementation of a function, ``foo``:
|
/Linux-v6.6/drivers/nvdimm/ |
D | Kconfig | 144 test implement a mock state machine.
|
/Linux-v6.6/Documentation/dev-tools/kunit/api/ |
D | functionredirection.rst | 25 replacing access to and mutation of this state with a "fake" or "mock" variant.
|
/Linux-v6.6/Documentation/networking/ |
D | nexthop-group-resilient.rst | 278 The netdevsim driver implements a mock offload of resilient groups, and
|