| /linux/drivers/platform/chrome/ |
| H A 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 …]
|
| H A D | cros_ec_proto_test_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/drivers/gpu/drm/tests/ |
| H A 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 …]
|
| H 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() 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 …]
|
| /linux/drivers/gpu/drm/i915/gem/selftests/ |
| H A D | mock_dmabuf.c | 13 struct mock_dmabuf *mock = to_mock(attachment->dmabuf); in mock_map_dma_buf() local 22 err = sg_alloc_table(st, mock->npages, GFP_KERNEL); in mock_map_dma_buf() 27 for (i = 0; i < mock->npages; i++) { in mock_map_dma_buf() 28 sg_set_page(sg, mock->pages[i], PAGE_SIZE, 0); in mock_map_dma_buf() 56 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_release() local 59 for (i = 0; i < mock->npages; i++) in mock_dmabuf_release() 60 put_page(mock->pages[i]); in mock_dmabuf_release() 62 kfree(mock); in mock_dmabuf_release() 67 struct mock_dmabuf *mock = to_mock(dma_buf); in mock_dmabuf_vmap() local 70 vaddr = vm_map_ram(mock->pages, mock->npages, 0); in mock_dmabuf_vmap() [all …]
|
| /linux/drivers/gpu/drm/i915/gt/ |
| H A 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 …]
|
| H A D | selftest_execlists.c | 2785 rq->mock.link.next = &(*prev)->mock.link; in create_gang() 3021 struct i915_request *n = list_next_entry(rq, mock.link); in live_preempt_gang()
|
| /linux/tools/testing/kunit/ |
| H A D | kunit_tool_test.py | 10 from unittest import mock 87 self.print_mock = mock.patch('kunit_printer.Printer.print').start() 88 self.addCleanup(mock.patch.stopall) 224 print_mock = mock.patch('kunit_printer.Printer.print').start() 432 mock.patch.object(signal, 'signal').start() 433 self.addCleanup(mock.patch.stopall) 496 mock.patch.object(tree._ops, 'start', side_effect=fake_start).start() 518 with mock.patch.object(tree._ops, 'start', side_effect=fake_start), \ 519 mock.patch.object(kunit_kernel.subprocess, 'call'): 542 mock_build_config = mock.patch.object(tree, 'build_config').start() [all …]
|
| /linux/drivers/iommu/iommufd/ |
| H A D | selftest.c | 325 struct mock_iommu_domain *mock = to_mock_domain(domain); in mock_domain_set_dirty_tracking() local 326 unsigned long flags = mock->flags; in mock_domain_set_dirty_tracking() 337 mock->flags = flags; in mock_domain_set_dirty_tracking() 390 struct mock_iommu_domain *mock = to_mock_domain(domain); in mock_domain_free() local 392 pt_iommu_deinit(&mock->iommu); in mock_domain_free() 393 kfree(mock); in mock_domain_free() 441 struct mock_iommu_domain *mock; in mock_domain_alloc_pgtable() local 444 mock = kzalloc_obj(*mock); in mock_domain_alloc_pgtable() 445 if (!mock) in mock_domain_alloc_pgtable() 447 mock->domain.type = IOMMU_DOMAIN_UNMANAGED; in mock_domain_alloc_pgtable() [all …]
|
| /linux/drivers/gpu/drm/i915/selftests/ |
| H 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/drivers/gpu/drm/ttm/tests/ |
| H A D | TODO | 6 - Improve mock manager's implementation, e.g. allocate a block of 12 - Rewrite the mock manager: drop use_tt and manage mock memory using
|
| /linux/drivers/gpu/drm/vc4/tests/ |
| H A D | vc4_mock.c | 139 const struct vc4_mock_desc *mock) in __build_mock() argument 143 for (i = 0; i < mock->npipes; i++) { in __build_mock() 144 const struct vc4_mock_pipe_desc *pipe = &mock->pipes[i]; in __build_mock()
|
| /linux/tools/testing/cxl/test/ |
| H A D | mock.c | 12 #include "mock.h" 14 static LIST_HEAD(mock); 18 list_add_rcu(&ops->list, &mock); 34 return list_first_or_null_rcu(&mock, struct cxl_mock_ops, list); in unregister_cxl_mock_ops()
|
| H A D | Kbuild | 10 cxl_mock-y := mock.o
|
| /linux/drivers/iommu/generic_pt/fmt/ |
| H A D | iommu_mock.c | 7 #define PT_FMT_VARIANT mock
|
| H A D | Makefile | 4 iommu_pt_fmt-$(CONFIG_IOMMUFD_TEST) += mock
|
| /linux/Documentation/gpu/ |
| H A D | vc4.rst | 63 These tests are using a mock driver and can be ran using the
|
| /linux/Documentation/dev-tools/kunit/ |
| H A D | index.rst | 32 It is inspired by JUnit, Python’s unittest.mock, and GoogleTest/GoogleMock
|
| /linux/Documentation/dev-tools/kunit/api/ |
| H A D | functionredirection.rst | 25 replacing access to and mutation of this state with a "fake" or "mock" variant.
|
| /linux/drivers/nvdimm/ |
| H A D | Kconfig | 163 test implement a mock state machine.
|
| /linux/Documentation/networking/ |
| H A D | nexthop-group-resilient.rst | 278 The netdevsim driver implements a mock offload of resilient groups, and
|
| /linux/init/ |
| H A D | Kconfig | 1901 tristate "Enable io_uring mock files (Experimental)" if EXPERT 1905 Enable mock files for io_uring subsystem testing. The ABI might
|
| /linux/lib/ |
| H A D | Kconfig.debug | 2890 registering a set of mock FLB objects with any real file handlers
|