Home
last modified time | relevance | path

Searched refs:mock (Results 1 – 24 of 24) sorted by relevance

/linux-6.3-rc2/drivers/gpu/drm/tests/
A Ddrm_damage_helper_test.c30 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 Ddrm_plane_helper_test.c52 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 Ddrm_framebuffer_test.c335 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 Dcros_ec_proto_test.c197 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 Dcros_kunit_util.c29 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 Dmock_dmabuf.c59 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 Dmock_engine.c97 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 Dselftest_execlists.c2778 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 Dkunit_tool_test.py10 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 Dselftest.c109 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 Di915_selftest.c71 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 Dmock_request.c40 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 Dvc4_mock.c141 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 Dmock.c14 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 DKbuild9 cxl_mock-y := mock.o
/linux-6.3-rc2/drivers/net/dsa/
A DKconfig20 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 Di915_selftest.h37 int mock; member
A Di915_request.h359 } mock;)
/linux-6.3-rc2/Documentation/gpu/
A Dvc4.rst63 These tests are using a mock driver and can be ran using the
/linux-6.3-rc2/Documentation/dev-tools/kunit/
A Dindex.rst32 It is inspired by JUnit, Python’s unittest.mock, and GoogleTest/GoogleMock
A Dusage.rst655 The example below uses this to implement a "mock" implementation of a function, ``foo``:
/linux-6.3-rc2/drivers/nvdimm/
A DKconfig144 test implement a mock state machine.
/linux-6.3-rc2/Documentation/dev-tools/kunit/api/
A Dfunctionredirection.rst25 replacing access to and mutation of this state with a "fake" or "mock" variant.
/linux-6.3-rc2/Documentation/networking/
A Dnexthop-group-resilient.rst278 The netdevsim driver implements a mock offload of resilient groups, and

Completed in 117 milliseconds