From babbb1224fa06f16f98ca12db5a93591366cccd2 Mon Sep 17 00:00:00 2001 From: Krzysztof Gibala Date: Thu, 15 Oct 2020 11:06:10 +0200 Subject: [PATCH] Minor cleanup in buffer ULTs Change-Id: I5004cbcb7b001a878de96449457bf43db1b23164 Signed-off-by: Krzysztof Gibala --- opencl/test/unit_test/api/cl_create_buffer_tests.cpp | 8 +------- opencl/test/unit_test/mem_obj/buffer_tests.cpp | 5 +---- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/opencl/test/unit_test/api/cl_create_buffer_tests.cpp b/opencl/test/unit_test/api/cl_create_buffer_tests.cpp index 0196c7cfc7..288785773d 100644 --- a/opencl/test/unit_test/api/cl_create_buffer_tests.cpp +++ b/opencl/test/unit_test/api/cl_create_buffer_tests.cpp @@ -466,18 +466,12 @@ TEST_F(clCreateBufferTestsWithRestrictions, GivenMemoryManagerRestrictionsWhenMi using clCreateBufferWithMultiDeviceContextTests = clCreateBufferTemplateTests; -static int cbInvoked = 0; -void CL_CALLBACK eventCallBack(const char *, const void *, - size_t, void *) { - cbInvoked++; -} - TEST_P(clCreateBufferWithMultiDeviceContextTests, GivenBufferCreatedWithContextdWithMultiDeviceThenGraphicsAllocationsAreProperlyFilled) { UltClDeviceFactory deviceFactory{2, 0}; DebugManager.flags.EnableMultiRootDeviceContexts.set(true); cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[1]}; - auto context = clCreateContext(nullptr, 2u, devices, eventCallBack, nullptr, &retVal); + auto context = clCreateContext(nullptr, 2u, devices, nullptr, nullptr, &retVal); EXPECT_NE(nullptr, context); EXPECT_EQ(CL_SUCCESS, retVal); diff --git a/opencl/test/unit_test/mem_obj/buffer_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_tests.cpp index b8d4b31233..8bbd401001 100644 --- a/opencl/test/unit_test/mem_obj/buffer_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_tests.cpp @@ -1812,10 +1812,7 @@ using MultiRootDeviceBufferTest = MultiRootDeviceFixture; TEST_F(MultiRootDeviceBufferTest, WhenCleanAllGraphicsAllocationsCalledThenGraphicsAllocationsAreProperlyRemoved) { std::map allocationInfo; - for (auto rootDeviceIndex = 1u; rootDeviceIndex < 2u; rootDeviceIndex++) { - allocationInfo.insert({rootDeviceIndex, {}}); - } - + allocationInfo.insert({1u, {}}); allocationInfo[1u].memory = mockMemoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{1u, MemoryConstants::pageSize}); Buffer::cleanAllGraphicsAllocations(*context, *context->getMemoryManager(), allocationInfo);