diff --git a/.clang-tidy b/.clang-tidy index dfcdda309a..b7980c1448 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -17,7 +17,7 @@ CheckOptions: - key: readability-identifier-naming.StructCase value: CamelCase - key: readability-identifier-naming.StructIgnoredRegexp - value: '.*' + value: '(_|TOKSTR_).+' - key: readability-identifier-naming.MethodCase value: camelBack - key: readability-identifier-naming.ParameterCase diff --git a/level_zero/experimental/source/tracing/tracing_imp.h b/level_zero/experimental/source/tracing/tracing_imp.h index 8cb5351516..d8b95f8e95 100644 --- a/level_zero/experimental/source/tracing/tracing_imp.h +++ b/level_zero/experimental/source/tracing/tracing_imp.h @@ -39,7 +39,7 @@ namespace L0 { extern thread_local ze_bool_t tracingInProgress; extern struct APITracerContextImp *pGlobalAPITracerContextImp; -typedef struct tracer_array_entry { +typedef struct TracerArrayEntry { zet_core_callbacks_t corePrologues; zet_core_callbacks_t coreEpilogues; zet_device_handle_t hDevice; diff --git a/opencl/source/kernel/kernel.cpp b/opencl/source/kernel/kernel.cpp index 0e20c377f6..ceb666b1b1 100644 --- a/opencl/source/kernel/kernel.cpp +++ b/opencl/source/kernel/kernel.cpp @@ -571,7 +571,7 @@ cl_int Kernel::getWorkGroupInfo(cl_kernel_work_group_info paramName, cl_int retVal = CL_INVALID_VALUE; const void *pSrc = nullptr; size_t srcSize = GetInfo::invalidSourceSize; - struct size_t3 { + struct SizeT3 { size_t val[3]; } requiredWorkGroupSize; cl_ulong localMemorySize; @@ -716,20 +716,20 @@ cl_int Kernel::getSubGroupInfo(cl_kernel_sub_group_info paramName, case 1: return changeGetInfoStatusToCLResultType(info.set(workGroupSize)); case 2: - struct size_t2 { + struct SizeT2 { size_t val[2]; } workGroupSize2; workGroupSize2.val[0] = workGroupSize; workGroupSize2.val[1] = (workGroupSize > 0) ? 1 : 0; - return changeGetInfoStatusToCLResultType(info.set(workGroupSize2)); + return changeGetInfoStatusToCLResultType(info.set(workGroupSize2)); default: - struct size_t3 { + struct SizeT3 { size_t val[3]; } workGroupSize3; workGroupSize3.val[0] = workGroupSize; workGroupSize3.val[1] = (workGroupSize > 0) ? 1 : 0; workGroupSize3.val[2] = (workGroupSize > 0) ? 1 : 0; - return changeGetInfoStatusToCLResultType(info.set(workGroupSize3)); + return changeGetInfoStatusToCLResultType(info.set(workGroupSize3)); } } case CL_KERNEL_MAX_NUM_SUB_GROUPS: { diff --git a/opencl/test/unit_test/api/cl_add_comment_to_aub_tests.inl b/opencl/test/unit_test/api/cl_add_comment_to_aub_tests.inl index 8c7a4d7650..327ec31654 100644 --- a/opencl/test/unit_test/api/cl_add_comment_to_aub_tests.inl +++ b/opencl/test/unit_test/api/cl_add_comment_to_aub_tests.inl @@ -19,13 +19,13 @@ using namespace NEO; namespace ULT { -struct ClAddCommentToAubTest : api_tests { +struct ClAddCommentToAubTest : ApiTests { void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); pDevice = pContext->getDevice(0); } void TearDown() override { - api_tests::TearDown(); + ApiTests::TearDown(); } ClDevice *pDevice = nullptr; diff --git a/opencl/test/unit_test/api/cl_api_tests.h b/opencl/test/unit_test/api/cl_api_tests.h index 6911450e92..5899491d35 100644 --- a/opencl/test/unit_test/api/cl_api_tests.h +++ b/opencl/test/unit_test/api/cl_api_tests.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -92,8 +92,8 @@ struct ApiFixture { std::unique_ptr rootDeviceEnvironmentBackup; }; -struct api_tests : public ApiFixture<>, - public ::testing::Test { +struct ApiTests : public ApiFixture<>, + public ::testing::Test { void SetUp() override { ApiFixture::setUp(); } diff --git a/opencl/test/unit_test/api/cl_build_program_tests.inl b/opencl/test/unit_test/api/cl_build_program_tests.inl index 693c292ac2..e32fe10548 100644 --- a/opencl/test/unit_test/api/cl_build_program_tests.inl +++ b/opencl/test/unit_test/api/cl_build_program_tests.inl @@ -20,13 +20,13 @@ using namespace NEO; -struct ClBuildProgramTests : public api_tests { +struct ClBuildProgramTests : public ApiTests { void SetUp() override { DebugManager.flags.FailBuildProgramWithStatefulAccess.set(0); - api_tests::setUp(); + ApiTests::setUp(); } void TearDown() override { - api_tests::tearDown(); + ApiTests::tearDown(); } DebugManagerStateRestore restore; diff --git a/opencl/test/unit_test/api/cl_clone_kernel_tests.inl b/opencl/test/unit_test/api/cl_clone_kernel_tests.inl index 2b6a5f58b4..2900aeaaa6 100644 --- a/opencl/test/unit_test/api/cl_clone_kernel_tests.inl +++ b/opencl/test/unit_test/api/cl_clone_kernel_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,21 +14,21 @@ using namespace NEO; -typedef api_tests clCloneKernelTests; +using ClCloneKernelTests = ApiTests; namespace ULT { -TEST_F(clCloneKernelTests, GivenNullKernelWhenCloningKernelThenNullIsReturned) { +TEST_F(ClCloneKernelTests, GivenNullKernelWhenCloningKernelThenNullIsReturned) { auto kernel = clCloneKernel(nullptr, nullptr); EXPECT_EQ(nullptr, kernel); } -TEST_F(clCloneKernelTests, GivenNullKernelWhenCloningKernelThenInvalidKernelErrorIsReturned) { +TEST_F(ClCloneKernelTests, GivenNullKernelWhenCloningKernelThenInvalidKernelErrorIsReturned) { clCloneKernel(nullptr, &retVal); EXPECT_EQ(CL_INVALID_KERNEL, retVal); } -TEST_F(clCloneKernelTests, GivenValidKernelWhenCloningKernelThenSuccessIsReturned) { +TEST_F(ClCloneKernelTests, GivenValidKernelWhenCloningKernelThenSuccessIsReturned) { cl_kernel pSourceKernel = nullptr; cl_kernel pClonedKernel = nullptr; cl_program pProgram = nullptr; diff --git a/opencl/test/unit_test/api/cl_compile_program_tests.inl b/opencl/test/unit_test/api/cl_compile_program_tests.inl index a699401bca..a18a375c40 100644 --- a/opencl/test/unit_test/api/cl_compile_program_tests.inl +++ b/opencl/test/unit_test/api/cl_compile_program_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,11 +15,11 @@ using namespace NEO; -typedef api_tests clCompileProgramTests; +using ClCompileProgramTests = ApiTests; namespace ULT { -TEST_F(clCompileProgramTests, GivenKernelAsSingleSourceWhenCompilingProgramThenSuccessIsReturned) { +TEST_F(ClCompileProgramTests, GivenKernelAsSingleSourceWhenCompilingProgramThenSuccessIsReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; @@ -63,7 +63,7 @@ TEST_F(clCompileProgramTests, GivenKernelAsSingleSourceWhenCompilingProgramThenS EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCompileProgramTests, GivenKernelAsSourceWithHeaderWhenCompilingProgramThenSuccessIsReturned) { +TEST_F(ClCompileProgramTests, GivenKernelAsSourceWithHeaderWhenCompilingProgramThenSuccessIsReturned) { cl_program pProgram = nullptr; cl_program pHeader = nullptr; size_t sourceSize = 0; @@ -132,7 +132,7 @@ TEST_F(clCompileProgramTests, GivenKernelAsSourceWithHeaderWhenCompilingProgramT EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCompileProgramTests, GivenNullProgramWhenCompilingProgramThenInvalidProgramErrorIsReturned) { +TEST_F(ClCompileProgramTests, GivenNullProgramWhenCompilingProgramThenInvalidProgramErrorIsReturned) { retVal = clCompileProgram( nullptr, 1, @@ -146,7 +146,7 @@ TEST_F(clCompileProgramTests, GivenNullProgramWhenCompilingProgramThenInvalidPro EXPECT_EQ(CL_INVALID_PROGRAM, retVal); } -TEST_F(clCompileProgramTests, GivenInvalidCallbackInputWhenCompileProgramThenInvalidValueErrorIsReturned) { +TEST_F(ClCompileProgramTests, GivenInvalidCallbackInputWhenCompileProgramThenInvalidValueErrorIsReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; @@ -188,7 +188,7 @@ TEST_F(clCompileProgramTests, GivenInvalidCallbackInputWhenCompileProgramThenInv EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCompileProgramTests, GivenValidCallbackInputWhenLinkProgramThenCallbackIsInvoked) { +TEST_F(ClCompileProgramTests, GivenValidCallbackInputWhenLinkProgramThenCallbackIsInvoked) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; 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 2c2d340ecc..ae66e1d338 100644 --- a/opencl/test/unit_test/api/cl_create_buffer_tests.cpp +++ b/opencl/test/unit_test/api/cl_create_buffer_tests.cpp @@ -16,7 +16,7 @@ using namespace NEO; -typedef api_tests ClCreateBufferTests; +using ClCreateBufferTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_create_command_queue_tests.inl b/opencl/test/unit_test/api/cl_create_command_queue_tests.inl index 279e39b723..49e750795c 100644 --- a/opencl/test/unit_test/api/cl_create_command_queue_tests.inl +++ b/opencl/test/unit_test/api/cl_create_command_queue_tests.inl @@ -15,11 +15,11 @@ using namespace NEO; -typedef api_tests clCreateCommandQueueTest; +using ClCreateCommandQueueTest = ApiTests; namespace ULT { -TEST_F(clCreateCommandQueueTest, GivenCorrectParametersWhenCreatingCommandQueueThenCommandQueueIsCreatedAndSuccessIsReturned) { +TEST_F(ClCreateCommandQueueTest, GivenCorrectParametersWhenCreatingCommandQueueThenCommandQueueIsCreatedAndSuccessIsReturned) { cl_command_queue cmdQ = nullptr; cl_queue_properties properties = 0; @@ -32,24 +32,24 @@ TEST_F(clCreateCommandQueueTest, GivenCorrectParametersWhenCreatingCommandQueueT EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateCommandQueueTest, GivenNullContextWhenCreatingCommandQueueThenInvalidContextErrorIsReturned) { +TEST_F(ClCreateCommandQueueTest, GivenNullContextWhenCreatingCommandQueueThenInvalidContextErrorIsReturned) { clCreateCommandQueue(nullptr, testedClDevice, 0, &retVal); EXPECT_EQ(CL_INVALID_CONTEXT, retVal); } -TEST_F(clCreateCommandQueueTest, GivenNullDeviceWhenCreatingCommandQueueThenInvalidDeviceErrorIsReturned) { +TEST_F(ClCreateCommandQueueTest, GivenNullDeviceWhenCreatingCommandQueueThenInvalidDeviceErrorIsReturned) { clCreateCommandQueue(pContext, nullptr, 0, &retVal); EXPECT_EQ(CL_INVALID_DEVICE, retVal); } -TEST_F(clCreateCommandQueueTest, GivenDeviceNotAssociatedWithContextWhenCreatingCommandQueueThenInvalidDeviceErrorIsReturned) { +TEST_F(ClCreateCommandQueueTest, GivenDeviceNotAssociatedWithContextWhenCreatingCommandQueueThenInvalidDeviceErrorIsReturned) { UltClDeviceFactory deviceFactory{1, 0}; EXPECT_FALSE(pContext->isDeviceAssociated(*deviceFactory.rootDevices[0])); clCreateCommandQueue(pContext, deviceFactory.rootDevices[0], 0, &retVal); EXPECT_EQ(CL_INVALID_DEVICE, retVal); } -TEST_F(clCreateCommandQueueTest, GivenInvalidPropertiesWhenCreatingCommandQueueThenInvalidValueErrorIsReturned) { +TEST_F(ClCreateCommandQueueTest, GivenInvalidPropertiesWhenCreatingCommandQueueThenInvalidValueErrorIsReturned) { cl_command_queue cmdQ = nullptr; cl_queue_properties properties = 0xf0000; @@ -59,7 +59,7 @@ TEST_F(clCreateCommandQueueTest, GivenInvalidPropertiesWhenCreatingCommandQueueT ASSERT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenQueueIsSucesfullyCreated) { +TEST_F(ClCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenQueueIsSucesfullyCreated) { cl_int retVal = CL_SUCCESS; cl_queue_properties ooq = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE; auto cmdq = clCreateCommandQueue(pContext, testedClDevice, ooq, &retVal); @@ -68,7 +68,7 @@ TEST_F(clCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenQueueIs retVal = clReleaseCommandQueue(cmdq); } -HWTEST_F(clCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverSwitchesToBatchingMode) { +HWTEST_F(ClCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverSwitchesToBatchingMode) { using BaseType = typename CommandQueue::BaseType; cl_int retVal = CL_SUCCESS; cl_queue_properties ooq = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE; @@ -83,7 +83,7 @@ HWTEST_F(clCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenComma retVal = clReleaseCommandQueue(cmdq); } -HWTEST_F(clCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedAndUpdateTaskCountFromWaitEnabledThenCommandStreamReceiverDoesntSwitchToBatchingMode) { +HWTEST_F(ClCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedAndUpdateTaskCountFromWaitEnabledThenCommandStreamReceiverDoesntSwitchToBatchingMode) { DebugManagerStateRestore restorer; DebugManager.flags.UpdateTaskCountFromWait.set(3); @@ -101,7 +101,7 @@ HWTEST_F(clCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedAndUpdate retVal = clReleaseCommandQueue(cmdq); } -HWTEST_F(clCreateCommandQueueTest, GivenForcedDispatchModeAndOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverDoesntSwitchToBatchingMode) { +HWTEST_F(ClCreateCommandQueueTest, GivenForcedDispatchModeAndOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverDoesntSwitchToBatchingMode) { DebugManagerStateRestore restorer; DebugManager.flags.CsrDispatchMode.set(static_cast(DispatchMode::ImmediateDispatch)); @@ -117,7 +117,7 @@ HWTEST_F(clCreateCommandQueueTest, GivenForcedDispatchModeAndOoqParametersWhenQu retVal = clReleaseCommandQueue(cmdq); } -HWTEST_F(clCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverSwitchesToNTo1SubmissionModel) { +HWTEST_F(ClCreateCommandQueueTest, GivenOoqParametersWhenQueueIsCreatedThenCommandStreamReceiverSwitchesToNTo1SubmissionModel) { using BaseType = typename CommandQueue::BaseType; cl_int retVal = CL_SUCCESS; cl_queue_properties ooq = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE; diff --git a/opencl/test/unit_test/api/cl_create_context_tests.inl b/opencl/test/unit_test/api/cl_create_context_tests.inl index 8b4565fd40..d22277e3d3 100644 --- a/opencl/test/unit_test/api/cl_create_context_tests.inl +++ b/opencl/test/unit_test/api/cl_create_context_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,16 +12,16 @@ using namespace NEO; -typedef api_tests clCreateContextTests; +using ClCreateContextTests = ApiTests; -namespace ClCreateContextTests { +namespace ULT { static int cbInvoked = 0; void CL_CALLBACK eventCallBack(const char *, const void *, size_t, void *) { cbInvoked++; } -TEST_F(clCreateContextTests, GivenValidParamsWhenCreatingContextThenContextIsCreated) { +TEST_F(ClCreateContextTests, GivenValidParamsWhenCreatingContextThenContextIsCreated) { auto context = clCreateContext(nullptr, 1u, &testedClDevice, nullptr, nullptr, &retVal); @@ -34,7 +34,7 @@ TEST_F(clCreateContextTests, GivenValidParamsWhenCreatingContextThenContextIsCre EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateContextTests, GivenNullptrRetValWhenCreatingContextThenContextIsCreated) { +TEST_F(ClCreateContextTests, GivenNullptrRetValWhenCreatingContextThenContextIsCreated) { auto context = clCreateContext(nullptr, 1u, &testedClDevice, nullptr, nullptr, nullptr); @@ -46,20 +46,20 @@ TEST_F(clCreateContextTests, GivenNullptrRetValWhenCreatingContextThenContextIsC EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateContextTests, GivenZeroDevicesWhenCreatingContextThenInvalidValueErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenZeroDevicesWhenCreatingContextThenInvalidValueErrorIsReturned) { auto context = clCreateContext(nullptr, 0, &testedClDevice, nullptr, nullptr, &retVal); ASSERT_EQ(nullptr, context); ASSERT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clCreateContextTests, GivenInvalidUserDataWhenCreatingContextThenInvalidValueErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenInvalidUserDataWhenCreatingContextThenInvalidValueErrorIsReturned) { cl_int someData = 25; auto context = clCreateContext(nullptr, 1u, &testedClDevice, nullptr, &someData, &retVal); ASSERT_EQ(nullptr, context); ASSERT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clCreateContextTests, GivenInvalidDeviceListWhenCreatingContextThenInvalidDeviceErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenInvalidDeviceListWhenCreatingContextThenInvalidDeviceErrorIsReturned) { cl_device_id devList[2]; devList[0] = testedClDevice; devList[1] = (cl_device_id)ptrGarbage; @@ -69,13 +69,13 @@ TEST_F(clCreateContextTests, GivenInvalidDeviceListWhenCreatingContextThenInvali ASSERT_EQ(CL_INVALID_DEVICE, retVal); } -TEST_F(clCreateContextTests, GivenNullDeviceListWhenCreatingContextThenInvalidValueErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenNullDeviceListWhenCreatingContextThenInvalidValueErrorIsReturned) { auto context = clCreateContext(nullptr, 2, nullptr, nullptr, nullptr, &retVal); ASSERT_EQ(nullptr, context); ASSERT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clCreateContextTests, GivenNullUserDataWhenCreatingContextThenContextIsCreated) { +TEST_F(ClCreateContextTests, GivenNullUserDataWhenCreatingContextThenContextIsCreated) { auto context = clCreateContext(nullptr, 1u, &testedClDevice, eventCallBack, nullptr, &retVal); ASSERT_NE(nullptr, context); @@ -83,7 +83,7 @@ TEST_F(clCreateContextTests, GivenNullUserDataWhenCreatingContextThenContextIsCr EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateContextTests, givenMultipleRootDevicesWithoutSubDevicesWhenCreatingContextThenContextIsCreated) { +TEST_F(ClCreateContextTests, givenMultipleRootDevicesWithoutSubDevicesWhenCreatingContextThenContextIsCreated) { UltClDeviceFactory deviceFactory{2, 0}; cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[1]}; auto context = clCreateContext(nullptr, 2u, devices, eventCallBack, nullptr, &retVal); @@ -92,7 +92,7 @@ TEST_F(clCreateContextTests, givenMultipleRootDevicesWithoutSubDevicesWhenCreati clReleaseContext(context); } -TEST_F(clCreateContextTests, givenMultipleSubDevicesFromDifferentRootDevicesWhenCreatingContextThenContextIsCreated) { +TEST_F(ClCreateContextTests, givenMultipleSubDevicesFromDifferentRootDevicesWhenCreatingContextThenContextIsCreated) { UltClDeviceFactory deviceFactory{2, 2}; cl_device_id devices[] = {deviceFactory.subDevices[0], deviceFactory.subDevices[1], deviceFactory.subDevices[2], deviceFactory.subDevices[3]}; auto context = clCreateContext(nullptr, 4u, devices, eventCallBack, nullptr, &retVal); @@ -101,7 +101,7 @@ TEST_F(clCreateContextTests, givenMultipleSubDevicesFromDifferentRootDevicesWhen clReleaseContext(context); } -TEST_F(clCreateContextTests, givenDisabledMultipleRootDeviceSupportWhenCreatingContextThenOutOfHostMemoryErrorIsReturned) { +TEST_F(ClCreateContextTests, givenDisabledMultipleRootDeviceSupportWhenCreatingContextThenOutOfHostMemoryErrorIsReturned) { UltClDeviceFactory deviceFactory{2, 2}; DebugManager.flags.EnableMultiRootDeviceContexts.set(false); cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[1]}; @@ -110,7 +110,7 @@ TEST_F(clCreateContextTests, givenDisabledMultipleRootDeviceSupportWhenCreatingC EXPECT_EQ(CL_OUT_OF_HOST_MEMORY, retVal); } -TEST_F(clCreateContextTests, whenCreateContextWithMultipleRootDevicesWithSubDevicesThenContextIsCreated) { +TEST_F(ClCreateContextTests, whenCreateContextWithMultipleRootDevicesWithSubDevicesThenContextIsCreated) { UltClDeviceFactory deviceFactory{2, 2}; cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[1]}; auto context = clCreateContext(nullptr, 2u, devices, eventCallBack, nullptr, &retVal); @@ -119,7 +119,7 @@ TEST_F(clCreateContextTests, whenCreateContextWithMultipleRootDevicesWithSubDevi clReleaseContext(context); } -TEST_F(clCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenRootDeviceIndicesSetIsFilled) { +TEST_F(ClCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenRootDeviceIndicesSetIsFilled) { UltClDeviceFactory deviceFactory{3, 2}; cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[1], deviceFactory.rootDevices[2]}; auto context = clCreateContext(nullptr, 3u, devices, eventCallBack, nullptr, &retVal); @@ -137,7 +137,7 @@ TEST_F(clCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenRootDe clReleaseContext(context); } -TEST_F(clCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenMaxRootDeviceIndexIsProperlyFilled) { +TEST_F(ClCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenMaxRootDeviceIndexIsProperlyFilled) { UltClDeviceFactory deviceFactory{3, 0}; DebugManager.flags.EnableMultiRootDeviceContexts.set(true); cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[2]}; @@ -151,7 +151,7 @@ TEST_F(clCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenMaxRoo clReleaseContext(context); } -TEST_F(clCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenSpecialQueueIsProperlyFilled) { +TEST_F(ClCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenSpecialQueueIsProperlyFilled) { UltClDeviceFactory deviceFactory{3, 0}; DebugManager.flags.EnableMultiRootDeviceContexts.set(true); cl_device_id devices[] = {deviceFactory.rootDevices[0], deviceFactory.rootDevices[2]}; @@ -178,14 +178,14 @@ TEST_F(clCreateContextTests, givenMultipleRootDevicesWhenCreateContextThenSpecia clReleaseContext(context); } -TEST_F(clCreateContextTests, givenInvalidContextCreationPropertiesThenContextCreationFails) { +TEST_F(ClCreateContextTests, givenInvalidContextCreationPropertiesThenContextCreationFails) { cl_context_properties invalidProperties[3] = {CL_CONTEXT_PLATFORM, (cl_context_properties) nullptr, 0}; auto context = clCreateContext(invalidProperties, 1u, &testedClDevice, nullptr, nullptr, &retVal); EXPECT_EQ(CL_INVALID_PLATFORM, retVal); EXPECT_EQ(nullptr, context); } -TEST_F(clCreateContextTests, GivenNonDefaultPlatformInContextCreationPropertiesWhenCreatingContextThenSuccessIsReturned) { +TEST_F(ClCreateContextTests, GivenNonDefaultPlatformInContextCreationPropertiesWhenCreatingContextThenSuccessIsReturned) { auto nonDefaultPlatform = std::make_unique(); nonDefaultPlatform->initializeWithNewDevices(); cl_platform_id nonDefaultPlatformCl = nonDefaultPlatform.get(); @@ -197,7 +197,7 @@ TEST_F(clCreateContextTests, GivenNonDefaultPlatformInContextCreationPropertiesW clReleaseContext(clContext); } -TEST_F(clCreateContextTests, GivenNonDefaultPlatformWithInvalidIcdDispatchInContextCreationPropertiesWhenCreatingContextThenInvalidPlatformErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenNonDefaultPlatformWithInvalidIcdDispatchInContextCreationPropertiesWhenCreatingContextThenInvalidPlatformErrorIsReturned) { auto nonDefaultPlatform = std::make_unique(); nonDefaultPlatform->initializeWithNewDevices(); cl_platform_id nonDefaultPlatformCl = nonDefaultPlatform.get(); @@ -209,7 +209,7 @@ TEST_F(clCreateContextTests, GivenNonDefaultPlatformWithInvalidIcdDispatchInCont EXPECT_EQ(nullptr, clContext); } -TEST_F(clCreateContextTests, GivenDeviceNotAssociatedToPlatformInPropertiesWhenCreatingContextThenInvalidDeviceErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenDeviceNotAssociatedToPlatformInPropertiesWhenCreatingContextThenInvalidDeviceErrorIsReturned) { auto nonDefaultPlatform = std::make_unique(); nonDefaultPlatform->initializeWithNewDevices(); cl_device_id clDevice = platform()->getClDevice(0); @@ -221,7 +221,7 @@ TEST_F(clCreateContextTests, GivenDeviceNotAssociatedToPlatformInPropertiesWhenC EXPECT_EQ(nullptr, clContext); } -TEST_F(clCreateContextTests, GivenDevicesFromDifferentPlatformsWhenCreatingContextWithoutSpecifiedPlatformThenInvalidDeviceErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenDevicesFromDifferentPlatformsWhenCreatingContextWithoutSpecifiedPlatformThenInvalidDeviceErrorIsReturned) { auto platform1 = std::make_unique(); auto platform2 = std::make_unique(); platform1->initializeWithNewDevices(); @@ -233,7 +233,7 @@ TEST_F(clCreateContextTests, GivenDevicesFromDifferentPlatformsWhenCreatingConte EXPECT_EQ(nullptr, clContext); } -TEST_F(clCreateContextTests, GivenDevicesFromDifferentPlatformsWhenCreatingContextWithSpecifiedPlatformThenInvalidDeviceErrorIsReturned) { +TEST_F(ClCreateContextTests, GivenDevicesFromDifferentPlatformsWhenCreatingContextWithSpecifiedPlatformThenInvalidDeviceErrorIsReturned) { auto platform1 = std::make_unique(); auto platform2 = std::make_unique(); platform1->initializeWithNewDevices(); @@ -247,4 +247,4 @@ TEST_F(clCreateContextTests, GivenDevicesFromDifferentPlatformsWhenCreatingConte EXPECT_EQ(CL_INVALID_DEVICE, retVal); EXPECT_EQ(nullptr, clContext); } -} // namespace ClCreateContextTests +} // namespace ULT diff --git a/opencl/test/unit_test/api/cl_create_kernel_tests.inl b/opencl/test/unit_test/api/cl_create_kernel_tests.inl index 871a7ba058..9a7cd23859 100644 --- a/opencl/test/unit_test/api/cl_create_kernel_tests.inl +++ b/opencl/test/unit_test/api/cl_create_kernel_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,11 +16,11 @@ using namespace NEO; -typedef api_tests clCreateKernelTests; +using ClCreateKernelTests = ApiTests; namespace ULT { -TEST_F(clCreateKernelTests, GivenCorrectKernelInProgramWhenCreatingNewKernelThenKernelIsCreatedAndSuccessIsReturned) { +TEST_F(ClCreateKernelTests, GivenCorrectKernelInProgramWhenCreatingNewKernelThenKernelIsCreatedAndSuccessIsReturned) { cl_kernel kernel = nullptr; cl_program pProgram = nullptr; cl_int binaryStatus = CL_SUCCESS; @@ -74,7 +74,7 @@ TEST_F(clCreateKernelTests, GivenCorrectKernelInProgramWhenCreatingNewKernelThen EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateKernelTests, GivenInvalidKernelNameWhenCreatingNewKernelThenInvalidKernelNameErrorIsReturned) { +TEST_F(ClCreateKernelTests, GivenInvalidKernelNameWhenCreatingNewKernelThenInvalidKernelNameErrorIsReturned) { cl_kernel kernel = nullptr; cl_program pProgram = nullptr; cl_int binaryStatus = CL_SUCCESS; @@ -126,7 +126,7 @@ TEST_F(clCreateKernelTests, GivenInvalidKernelNameWhenCreatingNewKernelThenInval EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateKernelTests, GivenNullProgramWhenCreatingNewKernelThenInvalidProgramErrorIsReturned) { +TEST_F(ClCreateKernelTests, GivenNullProgramWhenCreatingNewKernelThenInvalidProgramErrorIsReturned) { cl_kernel kernel = nullptr; kernel = clCreateKernel( nullptr, @@ -137,7 +137,7 @@ TEST_F(clCreateKernelTests, GivenNullProgramWhenCreatingNewKernelThenInvalidProg ASSERT_EQ(nullptr, kernel); } -TEST_F(clCreateKernelTests, GivenNullKernelNameWhenCreatingNewKernelThenInvalidValueErrorIsReturned) { +TEST_F(ClCreateKernelTests, GivenNullKernelNameWhenCreatingNewKernelThenInvalidValueErrorIsReturned) { cl_kernel kernel = nullptr; KernelInfo *pKernelInfo = new KernelInfo(); @@ -153,7 +153,7 @@ TEST_F(clCreateKernelTests, GivenNullKernelNameWhenCreatingNewKernelThenInvalidV EXPECT_EQ(nullptr, kernel); } -TEST_F(clCreateKernelTests, GivenInvalidProgramWhenCreatingNewKernelThenInvalidProgramErrorIsReturned) { +TEST_F(ClCreateKernelTests, GivenInvalidProgramWhenCreatingNewKernelThenInvalidProgramErrorIsReturned) { cl_kernel kernel = nullptr; kernel = clCreateKernel( @@ -165,7 +165,7 @@ TEST_F(clCreateKernelTests, GivenInvalidProgramWhenCreatingNewKernelThenInvalidP ASSERT_EQ(nullptr, kernel); } -TEST_F(clCreateKernelTests, GivenProgramWithBuildErrorWhenCreatingNewKernelThenInvalidProgramExecutableErrorIsReturned) { +TEST_F(ClCreateKernelTests, GivenProgramWithBuildErrorWhenCreatingNewKernelThenInvalidProgramExecutableErrorIsReturned) { cl_kernel kernel = nullptr; std::unique_ptr pMockProg = std::make_unique(pContext, false, toClDeviceVector(*pDevice)); pMockProg->setBuildStatus(CL_BUILD_ERROR); @@ -179,7 +179,7 @@ TEST_F(clCreateKernelTests, GivenProgramWithBuildErrorWhenCreatingNewKernelThenI EXPECT_EQ(nullptr, kernel); } -TEST_F(clCreateKernelTests, GivenNullPtrForReturnWhenCreatingNewKernelThenKernelIsCreated) { +TEST_F(ClCreateKernelTests, GivenNullPtrForReturnWhenCreatingNewKernelThenKernelIsCreated) { cl_kernel kernel = nullptr; kernel = clCreateKernel( nullptr, diff --git a/opencl/test/unit_test/api/cl_create_kernels_in_program_tests.inl b/opencl/test/unit_test/api/cl_create_kernels_in_program_tests.inl index e463bc92a0..dd43765eaf 100644 --- a/opencl/test/unit_test/api/cl_create_kernels_in_program_tests.inl +++ b/opencl/test/unit_test/api/cl_create_kernels_in_program_tests.inl @@ -16,11 +16,11 @@ using namespace NEO; -struct ClCreateKernelsInProgramTests : public api_tests { +struct ClCreateKernelsInProgramTests : public ApiTests { void SetUp() override { DebugManager.flags.FailBuildProgramWithStatefulAccess.set(0); - api_tests::SetUp(); + ApiTests::SetUp(); constexpr auto numBits = is32bit ? Elf::EI_CLASS_32 : Elf::EI_CLASS_64; auto zebinData = std::make_unique>(pDevice->getHardwareInfo(), 16); @@ -57,7 +57,7 @@ struct ClCreateKernelsInProgramTests : public api_tests { void TearDown() override { clReleaseKernel(kernel); clReleaseProgram(program); - api_tests::TearDown(); + ApiTests::TearDown(); } cl_program program = nullptr; diff --git a/opencl/test/unit_test/api/cl_create_pipe_tests.inl b/opencl/test/unit_test/api/cl_create_pipe_tests.inl index 8174813522..cabb246fcb 100644 --- a/opencl/test/unit_test/api/cl_create_pipe_tests.inl +++ b/opencl/test/unit_test/api/cl_create_pipe_tests.inl @@ -17,7 +17,7 @@ using namespace NEO; -struct ClCreatePipeTests : api_tests { +struct ClCreatePipeTests : ApiTests { VariableBackup supportsPipesBackup{&defaultHwInfo->capabilityTable.supportsPipes, true}; }; diff --git a/opencl/test/unit_test/api/cl_create_program_with_binary_tests.inl b/opencl/test/unit_test/api/cl_create_program_with_binary_tests.inl index ec7c98e4a9..73d9a18c22 100644 --- a/opencl/test/unit_test/api/cl_create_program_with_binary_tests.inl +++ b/opencl/test/unit_test/api/cl_create_program_with_binary_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,13 +15,13 @@ using namespace NEO; -typedef api_tests clCreateProgramWithBinaryTests; -typedef api_tests clCreateProgramWithILTests; -typedef api_tests clCreateProgramWithILKHRTests; +using ClCreateProgramWithBinaryTests = ApiTests; +using ClCreateProgramWithILTests = ApiTests; +using ClCreateProgramWithILKHRTests = ApiTests; namespace ULT { -TEST_F(clCreateProgramWithBinaryTests, GivenCorrectParametersWhenCreatingProgramWithBinaryThenProgramIsCreatedAndSuccessIsReturned) { +TEST_F(ClCreateProgramWithBinaryTests, GivenCorrectParametersWhenCreatingProgramWithBinaryThenProgramIsCreatedAndSuccessIsReturned) { cl_program pProgram = nullptr; cl_int binaryStatus = CL_INVALID_VALUE; size_t binarySize = 0; @@ -66,7 +66,7 @@ TEST_F(clCreateProgramWithBinaryTests, GivenCorrectParametersWhenCreatingProgram EXPECT_EQ(nullptr, pProgram); } -TEST_F(clCreateProgramWithBinaryTests, GivenInvalidInputWhenCreatingProgramWithBinaryThenInvalidValueErrorIsReturned) { +TEST_F(ClCreateProgramWithBinaryTests, GivenInvalidInputWhenCreatingProgramWithBinaryThenInvalidValueErrorIsReturned) { cl_program pProgram = nullptr; cl_int binaryStatus = CL_INVALID_VALUE; size_t binarySize = 0; @@ -127,7 +127,7 @@ TEST_F(clCreateProgramWithBinaryTests, GivenInvalidInputWhenCreatingProgramWithB clReleaseProgram(pProgram); } -TEST_F(clCreateProgramWithBinaryTests, GivenDeviceNotAssociatedWithContextWhenCreatingProgramWithBinaryThenInvalidDeviceErrorIsReturned) { +TEST_F(ClCreateProgramWithBinaryTests, GivenDeviceNotAssociatedWithContextWhenCreatingProgramWithBinaryThenInvalidDeviceErrorIsReturned) { cl_program pProgram = nullptr; cl_int binaryStatus = CL_INVALID_VALUE; size_t binarySize = 0; @@ -175,7 +175,7 @@ TEST_F(clCreateProgramWithBinaryTests, GivenDeviceNotAssociatedWithContextWhenCr EXPECT_EQ(nullptr, pProgram); } -TEST_F(clCreateProgramWithILTests, GivenInvalidContextWhenCreatingProgramWithIlThenInvalidContextErrorIsReturned) { +TEST_F(ClCreateProgramWithILTests, GivenInvalidContextWhenCreatingProgramWithIlThenInvalidContextErrorIsReturned) { const uint32_t spirv[16] = {0x03022307}; cl_int err = CL_SUCCESS; @@ -184,14 +184,14 @@ TEST_F(clCreateProgramWithILTests, GivenInvalidContextWhenCreatingProgramWithIlT EXPECT_EQ(nullptr, prog); } -TEST_F(clCreateProgramWithILTests, GivenNullIlWhenCreatingProgramWithIlThenInvalidValueErrorIsReturned) { +TEST_F(ClCreateProgramWithILTests, GivenNullIlWhenCreatingProgramWithIlThenInvalidValueErrorIsReturned) { cl_int err = CL_SUCCESS; cl_program prog = clCreateProgramWithIL(pContext, nullptr, 0, &err); EXPECT_EQ(CL_INVALID_VALUE, err); EXPECT_EQ(nullptr, prog); } -TEST_F(clCreateProgramWithILTests, GivenIncorrectIlSizeWhenCreatingProgramWithIlThenInvalidBinaryErrorIsReturned) { +TEST_F(ClCreateProgramWithILTests, GivenIncorrectIlSizeWhenCreatingProgramWithIlThenInvalidBinaryErrorIsReturned) { const uint32_t spirv[16] = {0x03022307}; cl_int err = CL_SUCCESS; @@ -200,7 +200,7 @@ TEST_F(clCreateProgramWithILTests, GivenIncorrectIlSizeWhenCreatingProgramWithIl EXPECT_EQ(nullptr, prog); } -TEST_F(clCreateProgramWithILTests, GivenIncorrectIlWhenCreatingProgramWithIlThenInvalidBinaryErrorIsReturned) { +TEST_F(ClCreateProgramWithILTests, GivenIncorrectIlWhenCreatingProgramWithIlThenInvalidBinaryErrorIsReturned) { const uint32_t notSpirv[16] = {0xDEADBEEF}; cl_int err = CL_SUCCESS; @@ -209,14 +209,14 @@ TEST_F(clCreateProgramWithILTests, GivenIncorrectIlWhenCreatingProgramWithIlThen EXPECT_EQ(nullptr, prog); } -TEST_F(clCreateProgramWithILTests, GivenIncorrectIlAndNoErrorPointerWhenCreatingProgramWithIlThenInvalidBinaryErrorIsReturned) { +TEST_F(ClCreateProgramWithILTests, GivenIncorrectIlAndNoErrorPointerWhenCreatingProgramWithIlThenInvalidBinaryErrorIsReturned) { const uint32_t notSpirv[16] = {0xDEADBEEF}; cl_program prog = clCreateProgramWithIL(pContext, notSpirv, sizeof(notSpirv), nullptr); EXPECT_EQ(nullptr, prog); } -TEST_F(clCreateProgramWithILKHRTests, GivenCorrectParametersWhenCreatingProgramWithIlkhrThenProgramIsCreatedAndSuccessIsReturned) { +TEST_F(ClCreateProgramWithILKHRTests, GivenCorrectParametersWhenCreatingProgramWithIlkhrThenProgramIsCreatedAndSuccessIsReturned) { const uint32_t spirv[16] = {0x03022307}; cl_int err = CL_INVALID_VALUE; @@ -228,7 +228,7 @@ TEST_F(clCreateProgramWithILKHRTests, GivenCorrectParametersWhenCreatingProgramW EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateProgramWithILKHRTests, GivenProgramCreatedWithILWhenBuildAfterBuildIsCalledThenReturnSuccess) { +TEST_F(ClCreateProgramWithILKHRTests, GivenProgramCreatedWithILWhenBuildAfterBuildIsCalledThenReturnSuccess) { const uint32_t spirv[16] = {0x03022307}; cl_int err = CL_INVALID_VALUE; cl_program program = clCreateProgramWithIL(pContext, spirv, sizeof(spirv), &err); @@ -242,12 +242,12 @@ TEST_F(clCreateProgramWithILKHRTests, GivenProgramCreatedWithILWhenBuildAfterBui EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateProgramWithILKHRTests, GivenNullIlWhenCreatingProgramWithIlkhrThenNullProgramIsReturned) { +TEST_F(ClCreateProgramWithILKHRTests, GivenNullIlWhenCreatingProgramWithIlkhrThenNullProgramIsReturned) { cl_program program = clCreateProgramWithILKHR(pContext, nullptr, 0, nullptr); EXPECT_EQ(nullptr, program); } -TEST_F(clCreateProgramWithILKHRTests, GivenBothFunctionVariantsWhenCreatingProgramWithIlThenCommonLogicIsUsed) { +TEST_F(ClCreateProgramWithILKHRTests, GivenBothFunctionVariantsWhenCreatingProgramWithIlThenCommonLogicIsUsed) { VariableBackup createFromIlBackup{&ProgramFunctions::createFromIL}; bool createFromIlCalled; diff --git a/opencl/test/unit_test/api/cl_create_program_with_built_in_kernels_tests.cpp b/opencl/test/unit_test/api/cl_create_program_with_built_in_kernels_tests.cpp index e5a43aef59..eed35e5e73 100644 --- a/opencl/test/unit_test/api/cl_create_program_with_built_in_kernels_tests.cpp +++ b/opencl/test/unit_test/api/cl_create_program_with_built_in_kernels_tests.cpp @@ -22,7 +22,7 @@ using namespace NEO; -typedef api_tests ClCreateProgramWithBuiltInKernelsTests; +using ClCreateProgramWithBuiltInKernelsTests = ApiTests; struct ClCreateProgramWithBuiltInVmeKernelsTests : ClCreateProgramWithBuiltInKernelsTests { void SetUp() override { diff --git a/opencl/test/unit_test/api/cl_create_sampler_tests.inl b/opencl/test/unit_test/api/cl_create_sampler_tests.inl index 8e5181cf15..c5713bebf4 100644 --- a/opencl/test/unit_test/api/cl_create_sampler_tests.inl +++ b/opencl/test/unit_test/api/cl_create_sampler_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,11 +11,11 @@ using namespace NEO; -typedef api_tests clCreateSamplerTests; +using ClCreateSamplerTests = ApiTests; namespace ULT { -TEST_F(clCreateSamplerTests, GivenCorrectParametersWhenCreatingSamplerThenSamplerIsCreatedAndSuccessReturned) { +TEST_F(ClCreateSamplerTests, GivenCorrectParametersWhenCreatingSamplerThenSamplerIsCreatedAndSuccessReturned) { auto sampler = clCreateSampler( pContext, CL_TRUE, @@ -29,7 +29,7 @@ TEST_F(clCreateSamplerTests, GivenCorrectParametersWhenCreatingSamplerThenSample EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateSamplerTests, GivenCorrectParametersAndNullReturnPointerWhenCreatingSamplerThenSamplerIsCreated) { +TEST_F(ClCreateSamplerTests, GivenCorrectParametersAndNullReturnPointerWhenCreatingSamplerThenSamplerIsCreated) { auto sampler = clCreateSampler( pContext, CL_TRUE, @@ -42,7 +42,7 @@ TEST_F(clCreateSamplerTests, GivenCorrectParametersAndNullReturnPointerWhenCreat EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateSamplerTests, GivenInvalidContextWhenCreatingSamplerThenInvalidContextErrorIsReturned) { +TEST_F(ClCreateSamplerTests, GivenInvalidContextWhenCreatingSamplerThenInvalidContextErrorIsReturned) { auto sampler = clCreateSampler( nullptr, CL_FALSE, diff --git a/opencl/test/unit_test/api/cl_create_sampler_with_properties_tests.inl b/opencl/test/unit_test/api/cl_create_sampler_with_properties_tests.inl index 7d96583c27..86e7ef4316 100644 --- a/opencl/test/unit_test/api/cl_create_sampler_with_properties_tests.inl +++ b/opencl/test/unit_test/api/cl_create_sampler_with_properties_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -35,10 +35,10 @@ struct SamplerWithPropertiesTest : public ApiFixture<>, cl_sampler_properties FilterProperties = 0; }; -typedef api_tests clCreateSamplerWithPropertiesTests; -typedef SamplerWithPropertiesTest clCreateSamplerWithPropertiesTests2; +using ClCreateSamplerWithPropertiesTests = ApiTests; +using ClCreateSamplerWithPropertiesTests2 = SamplerWithPropertiesTest; -TEST_F(clCreateSamplerWithPropertiesTests, GivenSamplerPropertiesAndNoReturnPointerWhenCreatingSamplerWithPropertiesThenSamplerIsCreated) { +TEST_F(ClCreateSamplerWithPropertiesTests, GivenSamplerPropertiesAndNoReturnPointerWhenCreatingSamplerWithPropertiesThenSamplerIsCreated) { cl_sampler sampler = nullptr; cl_queue_properties properties[] = { @@ -57,7 +57,7 @@ TEST_F(clCreateSamplerWithPropertiesTests, GivenSamplerPropertiesAndNoReturnPoin EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateSamplerWithPropertiesTests, GivenNullContextWhenCreatingSamplerWithPropertiesThenInvalidContextErrorIsReturned) { +TEST_F(ClCreateSamplerWithPropertiesTests, GivenNullContextWhenCreatingSamplerWithPropertiesThenInvalidContextErrorIsReturned) { cl_sampler sampler = nullptr; cl_queue_properties properties[] = { @@ -74,7 +74,7 @@ TEST_F(clCreateSamplerWithPropertiesTests, GivenNullContextWhenCreatingSamplerWi EXPECT_EQ(CL_INVALID_CONTEXT, retVal); } -TEST_F(clCreateSamplerWithPropertiesTests, GivenSamplerCreatedWithNullPropertiesWhenQueryingPropertiesThenNothingIsReturned) { +TEST_F(ClCreateSamplerWithPropertiesTests, GivenSamplerCreatedWithNullPropertiesWhenQueryingPropertiesThenNothingIsReturned) { cl_int retVal = CL_SUCCESS; auto sampler = clCreateSamplerWithProperties(pContext, nullptr, &retVal); EXPECT_EQ(retVal, CL_SUCCESS); @@ -88,7 +88,7 @@ TEST_F(clCreateSamplerWithPropertiesTests, GivenSamplerCreatedWithNullProperties clReleaseSampler(sampler); } -TEST_F(clCreateSamplerWithPropertiesTests, WhenCreatingSamplerWithPropertiesThenPropertiesAreCorrectlyStored) { +TEST_F(ClCreateSamplerWithPropertiesTests, WhenCreatingSamplerWithPropertiesThenPropertiesAreCorrectlyStored) { cl_int retVal = CL_SUCCESS; cl_sampler_properties properties[7]; size_t propertiesSize; @@ -114,7 +114,7 @@ TEST_F(clCreateSamplerWithPropertiesTests, WhenCreatingSamplerWithPropertiesThen } } -TEST_P(clCreateSamplerWithPropertiesTests2, GivenCorrectParametersWhenCreatingSamplerWithPropertiesThenSamplerIsCreatedAndSuccessIsReturned) { +TEST_P(ClCreateSamplerWithPropertiesTests2, GivenCorrectParametersWhenCreatingSamplerWithPropertiesThenSamplerIsCreatedAndSuccessIsReturned) { cl_sampler sampler = nullptr; cl_queue_properties properties[] = { @@ -152,7 +152,7 @@ TEST_P(clCreateSamplerWithPropertiesTests2, GivenCorrectParametersWhenCreatingSa EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_P(clCreateSamplerWithPropertiesTests2, GivenInvalidPropertiesWhenCreatingSamplerWithPropertiesThenInvalidValueErrorIsReturned) { +TEST_P(ClCreateSamplerWithPropertiesTests2, GivenInvalidPropertiesWhenCreatingSamplerWithPropertiesThenInvalidValueErrorIsReturned) { cl_sampler sampler = nullptr; cl_queue_properties properties[] = { @@ -234,13 +234,13 @@ static cl_sampler_properties FilterProperties[] = }; INSTANTIATE_TEST_CASE_P(api, - clCreateSamplerWithPropertiesTests2, + ClCreateSamplerWithPropertiesTests2, ::testing::Combine( ::testing::ValuesIn(NormalizdProperties), ::testing::ValuesIn(AddressingProperties), ::testing::ValuesIn(FilterProperties))); -TEST_F(clCreateSamplerWithPropertiesTests, GivenMipMapDataWhenCreatingSamplerWithPropertiesThenSamplerIsCreatedAndCorrectlyPopulated) { +TEST_F(ClCreateSamplerWithPropertiesTests, GivenMipMapDataWhenCreatingSamplerWithPropertiesThenSamplerIsCreatedAndCorrectlyPopulated) { SamplerLodProperty minLodProperty; SamplerLodProperty maxLodProperty; minLodProperty.lod = 2.0f; diff --git a/opencl/test/unit_test/api/cl_create_sub_buffer_tests.inl b/opencl/test/unit_test/api/cl_create_sub_buffer_tests.inl index e086b7a270..98cd2d9b34 100644 --- a/opencl/test/unit_test/api/cl_create_sub_buffer_tests.inl +++ b/opencl/test/unit_test/api/cl_create_sub_buffer_tests.inl @@ -101,9 +101,9 @@ INSTANTIATE_TEST_CASE_P( ClCreateSubBufferInvalidFlagsHostPtrTests, testing::ValuesIn(invalidFlags)); -class ClCreateSubBufferTests : public api_tests { +class ClCreateSubBufferTests : public ApiTests { void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); cl_mem_flags flg = CL_MEM_READ_WRITE | CL_MEM_USE_HOST_PTR | CL_MEM_HOST_NO_ACCESS; buffer = clCreateBuffer(pContext, flg, 64, pHostPtr, &retVal); diff --git a/opencl/test/unit_test/api/cl_create_user_event_tests.inl b/opencl/test/unit_test/api/cl_create_user_event_tests.inl index d5b4e903f5..16c40020bf 100644 --- a/opencl/test/unit_test/api/cl_create_user_event_tests.inl +++ b/opencl/test/unit_test/api/cl_create_user_event_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,11 +11,11 @@ using namespace NEO; -typedef api_tests clCreateUserEventTests; +using ClCreateUserEventTests = ApiTests; namespace ULT { -TEST_F(clCreateUserEventTests, GivenValidContextWhenCreatingUserEventThenEventIsCreated) { +TEST_F(ClCreateUserEventTests, GivenValidContextWhenCreatingUserEventThenEventIsCreated) { auto userEvent = clCreateUserEvent( pContext, &retVal); @@ -26,7 +26,7 @@ TEST_F(clCreateUserEventTests, GivenValidContextWhenCreatingUserEventThenEventIs EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateUserEventTests, GivenNullContextWhenCreatingUserEventThenInvalidContextErrorIsReturned) { +TEST_F(ClCreateUserEventTests, GivenNullContextWhenCreatingUserEventThenInvalidContextErrorIsReturned) { auto userEvent = clCreateUserEvent( nullptr, &retVal); @@ -34,7 +34,7 @@ TEST_F(clCreateUserEventTests, GivenNullContextWhenCreatingUserEventThenInvalidC EXPECT_EQ(nullptr, userEvent); } -TEST_F(clCreateUserEventTests, GivenCorrectUserEventWhenGetingEventInfoThenClCommandUserCmdTypeIsReturned) { +TEST_F(ClCreateUserEventTests, GivenCorrectUserEventWhenGetingEventInfoThenClCommandUserCmdTypeIsReturned) { auto userEvent = clCreateUserEvent( pContext, &retVal); @@ -58,7 +58,7 @@ TEST_F(clCreateUserEventTests, GivenCorrectUserEventWhenGetingEventInfoThenClCom EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateUserEventTests, GivenUserEventStatusSetToCompleteWhenGettingEventInfoThenStatusIsSetToCompleteAndSuccessReturned) { +TEST_F(ClCreateUserEventTests, GivenUserEventStatusSetToCompleteWhenGettingEventInfoThenStatusIsSetToCompleteAndSuccessReturned) { auto userEvent = clCreateUserEvent( pContext, &retVal); @@ -79,7 +79,7 @@ TEST_F(clCreateUserEventTests, GivenUserEventStatusSetToCompleteWhenGettingEvent EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateUserEventTests, GivenValidUserEventWhenGettingContextThenValidContextAndSuccessIsReturned) { +TEST_F(ClCreateUserEventTests, GivenValidUserEventWhenGettingContextThenValidContextAndSuccessIsReturned) { auto userEvent = clCreateUserEvent( pContext, &retVal); @@ -97,7 +97,7 @@ TEST_F(clCreateUserEventTests, GivenValidUserEventWhenGettingContextThenValidCon EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateUserEventTests, GivenCompleteUserEventWhenWaitingForUserEventThenReturnIsImmediate) { +TEST_F(ClCreateUserEventTests, GivenCompleteUserEventWhenWaitingForUserEventThenReturnIsImmediate) { auto userEvent = clCreateUserEvent( pContext, &retVal); @@ -112,7 +112,7 @@ TEST_F(clCreateUserEventTests, GivenCompleteUserEventWhenWaitingForUserEventThen EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clCreateUserEventTests, GivenUserEventWithErrorStatusWhenWaitingForUserEventThenClExecStatusErrorForEventsInWaitListErrorIsReturned) { +TEST_F(ClCreateUserEventTests, GivenUserEventWithErrorStatusWhenWaitingForUserEventThenClExecStatusErrorForEventsInWaitListErrorIsReturned) { auto userEvent = clCreateUserEvent( pContext, &retVal); diff --git a/opencl/test/unit_test/api/cl_enqueue_barrier_tests.inl b/opencl/test/unit_test/api/cl_enqueue_barrier_tests.inl index 45b6de6d32..4a1a23a4aa 100644 --- a/opencl/test/unit_test/api/cl_enqueue_barrier_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_barrier_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,21 +11,21 @@ using namespace NEO; -typedef api_tests clEnqueueBarrierTests; +using ClEnqueueBarrierTests = ApiTests; -TEST_F(clEnqueueBarrierTests, GivenNullCommandQueueWhenEnqueuingThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueBarrierTests, GivenNullCommandQueueWhenEnqueuingThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueBarrier( nullptr); EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueBarrierTests, GivenValidCommandQueueWhenEnqueuingBarrierThenSuccessIsReturned) { +TEST_F(ClEnqueueBarrierTests, GivenValidCommandQueueWhenEnqueuingBarrierThenSuccessIsReturned) { auto retVal = clEnqueueBarrier( pCommandQueue); EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueBarrierTests, GivenQueueIncapableWhenEnqueuingBarrierThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueBarrierTests, GivenQueueIncapableWhenEnqueuingBarrierThenInvalidOperationIsReturned) { this->disableQueueCapabilities(CL_QUEUE_CAPABILITY_BARRIER_INTEL); auto retVal = clEnqueueBarrier( pCommandQueue); diff --git a/opencl/test/unit_test/api/cl_enqueue_barrier_with_wait_list_tests.inl b/opencl/test/unit_test/api/cl_enqueue_barrier_with_wait_list_tests.inl index af57e15903..df83b86066 100644 --- a/opencl/test/unit_test/api/cl_enqueue_barrier_with_wait_list_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_barrier_with_wait_list_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,9 +11,9 @@ using namespace NEO; -typedef api_tests clEnqueueBarrierWithWaitListTests; +using ClEnqueueBarrierWithWaitListTests = ApiTests; -TEST_F(clEnqueueBarrierWithWaitListTests, GivenNullCommandQueueWhenEnqueuingBarrierWithWaitListThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueBarrierWithWaitListTests, GivenNullCommandQueueWhenEnqueuingBarrierWithWaitListThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueBarrierWithWaitList( nullptr, 0, @@ -22,7 +22,7 @@ TEST_F(clEnqueueBarrierWithWaitListTests, GivenNullCommandQueueWhenEnqueuingBarr EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueBarrierWithWaitListTests, GivenValidCommandQueueWhenEnqueuingBarrierWithWaitListThenSuccessIsReturned) { +TEST_F(ClEnqueueBarrierWithWaitListTests, GivenValidCommandQueueWhenEnqueuingBarrierWithWaitListThenSuccessIsReturned) { auto retVal = clEnqueueBarrierWithWaitList( pCommandQueue, 0, @@ -31,7 +31,7 @@ TEST_F(clEnqueueBarrierWithWaitListTests, GivenValidCommandQueueWhenEnqueuingBar EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueBarrierWithWaitListTests, GivenQueueIncapableWhenEnqueuingBarrierWithWaitListThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueBarrierWithWaitListTests, GivenQueueIncapableWhenEnqueuingBarrierWithWaitListThenInvalidOperationIsReturned) { this->disableQueueCapabilities(CL_QUEUE_CAPABILITY_BARRIER_INTEL); auto retVal = clEnqueueBarrierWithWaitList( pCommandQueue, diff --git a/opencl/test/unit_test/api/cl_enqueue_copy_buffer_to_image_tests.inl b/opencl/test/unit_test/api/cl_enqueue_copy_buffer_to_image_tests.inl index 2076dbbc31..757b1dbf96 100644 --- a/opencl/test/unit_test/api/cl_enqueue_copy_buffer_to_image_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_copy_buffer_to_image_tests.inl @@ -14,7 +14,7 @@ using namespace NEO; -typedef api_tests ClEnqueueCopyBufferToImageTests; +using ClEnqueueCopyBufferToImageTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_enqueue_copy_image_tests.inl b/opencl/test/unit_test/api/cl_enqueue_copy_image_tests.inl index a299c10a90..3a8e77768a 100644 --- a/opencl/test/unit_test/api/cl_enqueue_copy_image_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_copy_image_tests.inl @@ -15,7 +15,7 @@ using namespace NEO; -typedef api_tests ClEnqueueCopyImageTests; +using ClEnqueueCopyImageTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_enqueue_copy_image_to_buffer_tests.inl b/opencl/test/unit_test/api/cl_enqueue_copy_image_to_buffer_tests.inl index 9c9aca21d3..5555d2303f 100644 --- a/opencl/test/unit_test/api/cl_enqueue_copy_image_to_buffer_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_copy_image_to_buffer_tests.inl @@ -13,7 +13,7 @@ using namespace NEO; -typedef api_tests ClEnqueueCopyImageToBufferTests; +using ClEnqueueCopyImageToBufferTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_enqueue_fill_buffer_tests.inl b/opencl/test/unit_test/api/cl_enqueue_fill_buffer_tests.inl index 1f4558783b..bcd719ca04 100644 --- a/opencl/test/unit_test/api/cl_enqueue_fill_buffer_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_fill_buffer_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,11 +13,11 @@ using namespace NEO; -typedef api_tests clEnqueueFillBufferTests; +using ClEnqueueFillBufferTests = ApiTests; namespace ULT { -TEST_F(clEnqueueFillBufferTests, GivenNullCommandQueueWhenFillingBufferThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueFillBufferTests, GivenNullCommandQueueWhenFillingBufferThenInvalidCommandQueueErrorIsReturned) { auto buffer = (cl_mem)ptrGarbage; cl_float pattern = 1.0f; @@ -35,7 +35,7 @@ TEST_F(clEnqueueFillBufferTests, GivenNullCommandQueueWhenFillingBufferThenInval EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueFillBufferTests, GivenNullBufferWhenFillingBufferThenInvalidMemObjectErrorIsReturned) { +TEST_F(ClEnqueueFillBufferTests, GivenNullBufferWhenFillingBufferThenInvalidMemObjectErrorIsReturned) { cl_float pattern = 1.0f; retVal = clEnqueueFillBuffer( @@ -52,7 +52,7 @@ TEST_F(clEnqueueFillBufferTests, GivenNullBufferWhenFillingBufferThenInvalidMemO EXPECT_EQ(CL_INVALID_MEM_OBJECT, retVal); } -TEST_F(clEnqueueFillBufferTests, GivenValidArgumentsWhenFillingBufferThenSuccessIsReturned) { +TEST_F(ClEnqueueFillBufferTests, GivenValidArgumentsWhenFillingBufferThenSuccessIsReturned) { MockBuffer buffer{}; cl_float pattern = 1.0f; @@ -69,7 +69,7 @@ TEST_F(clEnqueueFillBufferTests, GivenValidArgumentsWhenFillingBufferThenSuccess EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueFillBufferTests, GivenQueueIncapableWhenFillingBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueFillBufferTests, GivenQueueIncapableWhenFillingBufferThenInvalidOperationIsReturned) { MockBuffer buffer{}; cl_float pattern = 1.0f; diff --git a/opencl/test/unit_test/api/cl_enqueue_fill_image_tests.inl b/opencl/test/unit_test/api/cl_enqueue_fill_image_tests.inl index 914cbfab89..49e2558e5d 100644 --- a/opencl/test/unit_test/api/cl_enqueue_fill_image_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_fill_image_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,11 +14,11 @@ using namespace NEO; -typedef api_tests clEnqueueFillImageTests; +using ClEnqueueFillImageTests = ApiTests; namespace ULT { -TEST_F(clEnqueueFillImageTests, GivenNullCommandQueueWhenFillingImageThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueFillImageTests, GivenNullCommandQueueWhenFillingImageThenInvalidCommandQueueErrorIsReturned) { auto image = std::unique_ptr(Image2dHelper>::create(pContext)); uint32_t fillColor[4] = {0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc, 0xdddddddd}; size_t origin[3] = {0, 0, 0}; @@ -37,7 +37,7 @@ TEST_F(clEnqueueFillImageTests, GivenNullCommandQueueWhenFillingImageThenInvalid EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueFillImageTests, GivenNullImageWhenFillingImageThenInvalidMemObjectErrorIsReturned) { +TEST_F(ClEnqueueFillImageTests, GivenNullImageWhenFillingImageThenInvalidMemObjectErrorIsReturned) { uint32_t fillColor[4] = {0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc, 0xdddddddd}; size_t origin[3] = {0, 0, 0}; size_t region[3] = {2, 2, 1}; @@ -55,7 +55,7 @@ TEST_F(clEnqueueFillImageTests, GivenNullImageWhenFillingImageThenInvalidMemObje EXPECT_EQ(CL_INVALID_MEM_OBJECT, retVal); } -TEST_F(clEnqueueFillImageTests, GivenNullFillColorWhenFillingImageThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueFillImageTests, GivenNullFillColorWhenFillingImageThenInvalidValueErrorIsReturned) { auto image = std::unique_ptr(Image2dHelper>::create(pContext)); size_t origin[3] = {0, 0, 0}; size_t region[3] = {2, 2, 1}; @@ -73,7 +73,7 @@ TEST_F(clEnqueueFillImageTests, GivenNullFillColorWhenFillingImageThenInvalidVal EXPECT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clEnqueueFillImageTests, GivenCorrectArgumentsWhenFillingImageThenSuccessIsReturned) { +TEST_F(ClEnqueueFillImageTests, GivenCorrectArgumentsWhenFillingImageThenSuccessIsReturned) { auto image = std::unique_ptr(Image2dHelper>::create(pContext)); uint32_t fillColor[4] = {0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc, 0xdddddddd}; size_t origin[3] = {0, 0, 0}; @@ -92,7 +92,7 @@ TEST_F(clEnqueueFillImageTests, GivenCorrectArgumentsWhenFillingImageThenSuccess EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueFillImageTests, GivenQueueIncapableWhenFillingImageThenInvalidOperationReturned) { +TEST_F(ClEnqueueFillImageTests, GivenQueueIncapableWhenFillingImageThenInvalidOperationReturned) { auto image = std::unique_ptr(Image2dHelper>::create(pContext)); uint32_t fillColor[4] = {0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc, 0xdddddddd}; size_t origin[3] = {0, 0, 0}; diff --git a/opencl/test/unit_test/api/cl_enqueue_map_buffer_tests.inl b/opencl/test/unit_test/api/cl_enqueue_map_buffer_tests.inl index 65ae40a97b..056be86c63 100644 --- a/opencl/test/unit_test/api/cl_enqueue_map_buffer_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_map_buffer_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,9 +13,9 @@ using namespace NEO; -typedef api_tests clEnqueueMapBufferTests; +using ClEnqueueMapBufferTests = ApiTests; -TEST_F(clEnqueueMapBufferTests, GivenNullCommandQueueWhenMappingBufferThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueMapBufferTests, GivenNullCommandQueueWhenMappingBufferThenInvalidCommandQueueErrorIsReturned) { unsigned int bufferSize = 16; auto pHostMem = new unsigned char[bufferSize]; memset(pHostMem, 0xaa, bufferSize); @@ -53,7 +53,7 @@ TEST_F(clEnqueueMapBufferTests, GivenNullCommandQueueWhenMappingBufferThenInvali clReleaseEvent(eventReturned); } -TEST_F(clEnqueueMapBufferTests, GivenValidParametersWhenMappingBufferThenSuccessIsReturned) { +TEST_F(ClEnqueueMapBufferTests, GivenValidParametersWhenMappingBufferThenSuccessIsReturned) { unsigned int bufferSize = 16; auto pHostMem = new unsigned char[bufferSize]; memset(pHostMem, 0xaa, bufferSize); @@ -91,7 +91,7 @@ TEST_F(clEnqueueMapBufferTests, GivenValidParametersWhenMappingBufferThenSuccess clReleaseEvent(eventReturned); } -TEST_F(clEnqueueMapBufferTests, GivenQueueIncapableWhenMappingBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueMapBufferTests, GivenQueueIncapableWhenMappingBufferThenInvalidOperationIsReturned) { MockBuffer buffer{}; disableQueueCapabilities(CL_QUEUE_CAPABILITY_MAP_BUFFER_INTEL); @@ -110,7 +110,7 @@ TEST_F(clEnqueueMapBufferTests, GivenQueueIncapableWhenMappingBufferThenInvalidO EXPECT_EQ(CL_INVALID_OPERATION, retVal); } -TEST_F(clEnqueueMapBufferTests, GivenMappedPointerWhenCreatingBufferFromThisPointerThenInvalidHostPtrErrorIsReturned) { +TEST_F(ClEnqueueMapBufferTests, GivenMappedPointerWhenCreatingBufferFromThisPointerThenInvalidHostPtrErrorIsReturned) { unsigned int bufferSize = 16; cl_mem buffer = clCreateBuffer(pContext, CL_MEM_READ_WRITE, bufferSize, nullptr, &retVal); diff --git a/opencl/test/unit_test/api/cl_enqueue_marker_tests.inl b/opencl/test/unit_test/api/cl_enqueue_marker_tests.inl index 2770f293af..3ba0df86fb 100644 --- a/opencl/test/unit_test/api/cl_enqueue_marker_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_marker_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,23 +12,23 @@ using namespace NEO; -typedef api_tests clEnqueueMarkerTests; +using ClEnqueueMarkerTests = ApiTests; -TEST_F(clEnqueueMarkerTests, GivenNullCommandQueueWhenEnqueingMarkerThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueMarkerTests, GivenNullCommandQueueWhenEnqueingMarkerThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueMarker( nullptr, nullptr); EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueMarkerTests, GivenValidCommandQueueWhenEnqueingMarkerThenSuccessIsReturned) { +TEST_F(ClEnqueueMarkerTests, GivenValidCommandQueueWhenEnqueingMarkerThenSuccessIsReturned) { auto retVal = clEnqueueMarker( pCommandQueue, nullptr); EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueMarkerTests, GivenQueueIncapableWhenEnqueingMarkerThenInvalidOperationReturned) { +TEST_F(ClEnqueueMarkerTests, GivenQueueIncapableWhenEnqueingMarkerThenInvalidOperationReturned) { this->disableQueueCapabilities(CL_QUEUE_CAPABILITY_MARKER_INTEL); auto retVal = clEnqueueMarker( pCommandQueue, diff --git a/opencl/test/unit_test/api/cl_enqueue_marker_with_wait_list_tests.inl b/opencl/test/unit_test/api/cl_enqueue_marker_with_wait_list_tests.inl index 24db913290..2b0f3332b0 100644 --- a/opencl/test/unit_test/api/cl_enqueue_marker_with_wait_list_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_marker_with_wait_list_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,9 +11,9 @@ using namespace NEO; -typedef api_tests clEnqueueMarkerWithWaitListTests; +using ClEnqueueMarkerWithWaitListTests = ApiTests; -TEST_F(clEnqueueMarkerWithWaitListTests, GivenNullCommandQueueWhenEnqueingMarkerWithWaitListThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueMarkerWithWaitListTests, GivenNullCommandQueueWhenEnqueingMarkerWithWaitListThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueMarkerWithWaitList( nullptr, 0, @@ -22,7 +22,7 @@ TEST_F(clEnqueueMarkerWithWaitListTests, GivenNullCommandQueueWhenEnqueingMarker EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueMarkerWithWaitListTests, GivenValidCommandQueueWhenEnqueingMarkerWithWaitListThenSuccessIsReturned) { +TEST_F(ClEnqueueMarkerWithWaitListTests, GivenValidCommandQueueWhenEnqueingMarkerWithWaitListThenSuccessIsReturned) { auto retVal = clEnqueueMarkerWithWaitList( pCommandQueue, 0, @@ -31,7 +31,7 @@ TEST_F(clEnqueueMarkerWithWaitListTests, GivenValidCommandQueueWhenEnqueingMarke EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueMarkerWithWaitListTests, GivenQueueIncapableWhenEnqueingMarkerWithWaitListThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueMarkerWithWaitListTests, GivenQueueIncapableWhenEnqueingMarkerWithWaitListThenInvalidOperationIsReturned) { this->disableQueueCapabilities(CL_QUEUE_CAPABILITY_MARKER_INTEL); auto retVal = clEnqueueMarkerWithWaitList( pCommandQueue, diff --git a/opencl/test/unit_test/api/cl_enqueue_migrate_mem_objects_tests.inl b/opencl/test/unit_test/api/cl_enqueue_migrate_mem_objects_tests.inl index 77b628fee5..ba3b0f751d 100644 --- a/opencl/test/unit_test/api/cl_enqueue_migrate_mem_objects_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_migrate_mem_objects_tests.inl @@ -13,9 +13,9 @@ using namespace NEO; -typedef api_tests clEnqueueMigrateMemObjectsTests; +using ClEnqueueMigrateMemObjectsTests = ApiTests; -TEST_F(clEnqueueMigrateMemObjectsTests, GivenNullCommandQueueWhenMigratingMemObjThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenNullCommandQueueWhenMigratingMemObjThenInvalidCommandQueueErrorIsReturned) { unsigned int bufferSize = 16; auto pHostMem = new unsigned char[bufferSize]; memset(pHostMem, 0xaa, bufferSize); @@ -49,7 +49,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenNullCommandQueueWhenMigratingMemObj clReleaseEvent(eventReturned); } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenValidInputsWhenMigratingMemObjThenSuccessIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenValidInputsWhenMigratingMemObjThenSuccessIsReturned) { unsigned int bufferSize = 16; auto pHostMem = new unsigned char[bufferSize]; memset(pHostMem, 0xaa, bufferSize); @@ -83,7 +83,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenValidInputsWhenMigratingMemObjThenS clReleaseEvent(eventReturned); } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenNullMemObjsWhenMigratingMemObjThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenNullMemObjsWhenMigratingMemObjThenInvalidValueErrorIsReturned) { cl_event eventReturned = nullptr; auto result = clEnqueueMigrateMemObjects( @@ -97,7 +97,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenNullMemObjsWhenMigratingMemObjThenI EXPECT_EQ(CL_INVALID_VALUE, result); } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenZeroMemObjectsWhenMigratingMemObjsThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenZeroMemObjectsWhenMigratingMemObjsThenInvalidValueErrorIsReturned) { cl_event eventReturned = nullptr; auto result = clEnqueueMigrateMemObjects( @@ -111,7 +111,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenZeroMemObjectsWhenMigratingMemObjsT EXPECT_EQ(CL_INVALID_VALUE, result); } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenNonZeroEventsAndNullWaitlistWhenMigratingMemObjThenInvalidWaitListErrorIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenNonZeroEventsAndNullWaitlistWhenMigratingMemObjThenInvalidWaitListErrorIsReturned) { cl_event eventReturned = nullptr; auto result = clEnqueueMigrateMemObjects( @@ -125,7 +125,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenNonZeroEventsAndNullWaitlistWhenMig EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, result); } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenZeroEventsAndNonNullWaitlistWhenMigratingMemObjsThenInvalidWaitListErrorIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenZeroEventsAndNonNullWaitlistWhenMigratingMemObjsThenInvalidWaitListErrorIsReturned) { cl_event eventReturned = nullptr; Event event(pCommandQueue, CL_COMMAND_MIGRATE_MEM_OBJECTS, 0, 0); @@ -141,7 +141,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenZeroEventsAndNonNullWaitlistWhenMig EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, result); } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenValidFlagsWhenMigratingMemObjsThenSuccessIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenValidFlagsWhenMigratingMemObjsThenSuccessIsReturned) { unsigned int bufferSize = 16; auto pHostMem = new unsigned char[bufferSize]; memset(pHostMem, 0xaa, bufferSize); @@ -178,7 +178,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenValidFlagsWhenMigratingMemObjsThenS delete[] pHostMem; } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenInvalidFlagsWhenMigratingMemObjsThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenInvalidFlagsWhenMigratingMemObjsThenInvalidValueErrorIsReturned) { unsigned int bufferSize = 16; auto pHostMem = new unsigned char[bufferSize]; memset(pHostMem, 0xaa, bufferSize); @@ -215,7 +215,7 @@ TEST_F(clEnqueueMigrateMemObjectsTests, GivenInvalidFlagsWhenMigratingMemObjsThe delete[] pHostMem; } -TEST_F(clEnqueueMigrateMemObjectsTests, GivenInvalidMemObjectWhenMigratingMemObjsThenInvalidMemObjectErrorIsReturned) { +TEST_F(ClEnqueueMigrateMemObjectsTests, GivenInvalidMemObjectWhenMigratingMemObjsThenInvalidMemObjectErrorIsReturned) { cl_event eventReturned = nullptr; auto result = clEnqueueMigrateMemObjects( diff --git a/opencl/test/unit_test/api/cl_enqueue_native_kernel_tests.inl b/opencl/test/unit_test/api/cl_enqueue_native_kernel_tests.inl index 9b9a4d4018..4445fc1a49 100644 --- a/opencl/test/unit_test/api/cl_enqueue_native_kernel_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_native_kernel_tests.inl @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clEnqueueNativeKernelTests; +using ClEnqueueNativeKernelTests = ApiTests; namespace ULT { -TEST_F(clEnqueueNativeKernelTests, GivenAnyParametersWhenExecutingNativeKernelThenOutOfHostMemoryErrorIsReturned) { +TEST_F(ClEnqueueNativeKernelTests, GivenAnyParametersWhenExecutingNativeKernelThenOutOfHostMemoryErrorIsReturned) { auto retVal = clEnqueueNativeKernel( nullptr, // commandQueue nullptr, // user_func diff --git a/opencl/test/unit_test/api/cl_enqueue_nd_range_kernel_tests.inl b/opencl/test/unit_test/api/cl_enqueue_nd_range_kernel_tests.inl index 4b033fa3b3..e6ce41dd93 100644 --- a/opencl/test/unit_test/api/cl_enqueue_nd_range_kernel_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_nd_range_kernel_tests.inl @@ -12,11 +12,11 @@ using namespace NEO; -typedef api_tests clEnqueueNDRangeKernelTests; +using ClEnqueueNDRangeKernelTests = ApiTests; namespace ULT { -TEST_F(clEnqueueNDRangeKernelTests, GivenValidParametersWhenExecutingKernelThenSuccessIsReturned) { +TEST_F(ClEnqueueNDRangeKernelTests, GivenValidParametersWhenExecutingKernelThenSuccessIsReturned) { cl_uint workDim = 1; size_t globalWorkOffset[3] = {0, 0, 0}; size_t globalWorkSize[3] = {1, 1, 1}; @@ -39,7 +39,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenValidParametersWhenExecutingKernelThenS EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueNDRangeKernelTests, GivenKernelWithSlmSizeExceedingLocalMemorySizeWhenExecutingKernelThenDebugMsgErrIsPrintedAndOutOfResourcesIsReturned) { +TEST_F(ClEnqueueNDRangeKernelTests, GivenKernelWithSlmSizeExceedingLocalMemorySizeWhenExecutingKernelThenDebugMsgErrIsPrintedAndOutOfResourcesIsReturned) { DebugManagerStateRestore dbgRestorer; DebugManager.flags.PrintDebugMessages.set(true); @@ -94,7 +94,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenKernelWithSlmSizeExceedingLocalMemorySi EXPECT_EQ(expectedOutput, output); } -TEST_F(clEnqueueNDRangeKernelTests, GivenQueueIncapableWhenExecutingKernelThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueNDRangeKernelTests, GivenQueueIncapableWhenExecutingKernelThenInvalidOperationIsReturned) { cl_uint workDim = 1; size_t globalWorkOffset[3] = {0, 0, 0}; size_t globalWorkSize[3] = {1, 1, 1}; @@ -118,7 +118,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenQueueIncapableWhenExecutingKernelThenIn EXPECT_EQ(CL_INVALID_OPERATION, retVal); } -TEST_F(clEnqueueNDRangeKernelTests, GivenNullCommandQueueWhenExecutingKernelThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueNDRangeKernelTests, GivenNullCommandQueueWhenExecutingKernelThenInvalidCommandQueueErrorIsReturned) { size_t globalWorkSize[3] = {1, 1, 1}; retVal = clEnqueueNDRangeKernel( @@ -135,7 +135,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenNullCommandQueueWhenExecutingKernelThen EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueNDRangeKernelTests, GivenNonZeroEventsAndEmptyEventWaitListWhenExecutingKernelThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueNDRangeKernelTests, GivenNonZeroEventsAndEmptyEventWaitListWhenExecutingKernelThenInvalidEventWaitListErrorIsReturned) { cl_uint workDim = 1; size_t globalWorkOffset[3] = {0, 0, 0}; size_t globalWorkSize[3] = {1, 1, 1}; @@ -158,7 +158,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenNonZeroEventsAndEmptyEventWaitListWhenE EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueNDRangeKernelTests, GivenConcurrentKernelWhenExecutingKernelThenInvalidKernelErrorIsReturned) { +TEST_F(ClEnqueueNDRangeKernelTests, GivenConcurrentKernelWhenExecutingKernelThenInvalidKernelErrorIsReturned) { cl_uint workDim = 1; size_t globalWorkOffset[3] = {0, 0, 0}; size_t globalWorkSize[3] = {1, 1, 1}; @@ -181,7 +181,7 @@ TEST_F(clEnqueueNDRangeKernelTests, GivenConcurrentKernelWhenExecutingKernelThen EXPECT_EQ(CL_INVALID_KERNEL, retVal); } -TEST_F(clEnqueueNDRangeKernelTests, GivenKernelWithAllocateSyncBufferPatchWhenExecutingKernelThenInvalidKernelErrorIsReturned) { +TEST_F(ClEnqueueNDRangeKernelTests, GivenKernelWithAllocateSyncBufferPatchWhenExecutingKernelThenInvalidKernelErrorIsReturned) { cl_uint workDim = 1; size_t globalWorkOffset[3] = {0, 0, 0}; size_t globalWorkSize[3] = {1, 1, 1}; diff --git a/opencl/test/unit_test/api/cl_enqueue_read_buffer_rect_tests.inl b/opencl/test/unit_test/api/cl_enqueue_read_buffer_rect_tests.inl index 3a45049c17..3149b52844 100644 --- a/opencl/test/unit_test/api/cl_enqueue_read_buffer_rect_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_read_buffer_rect_tests.inl @@ -15,11 +15,11 @@ using namespace NEO; -typedef api_tests clEnqueueReadBufferRectTest; +using ClEnqueueReadBufferRectTest = ApiTests; namespace ULT { -TEST_F(clEnqueueReadBufferRectTest, GivenInvalidBufferWhenReadingRectangularRegionThenInvalidMemObjectErrorIsReturned) { +TEST_F(ClEnqueueReadBufferRectTest, GivenInvalidBufferWhenReadingRectangularRegionThenInvalidMemObjectErrorIsReturned) { auto buffer = (cl_mem)ptrGarbage; size_t buffOrigin[] = {0, 0, 0}; size_t hostOrigin[] = {0, 0, 0}; @@ -45,7 +45,7 @@ TEST_F(clEnqueueReadBufferRectTest, GivenInvalidBufferWhenReadingRectangularRegi EXPECT_EQ(CL_INVALID_MEM_OBJECT, retVal); } -TEST_F(clEnqueueReadBufferRectTest, GivenNullCommandQueueWhenReadingRectangularRegionThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueReadBufferRectTest, GivenNullCommandQueueWhenReadingRectangularRegionThenInvalidCommandQueueErrorIsReturned) { auto buffer = (cl_mem)ptrGarbage; size_t buffOrigin[] = {0, 0, 0}; size_t hostOrigin[] = {0, 0, 0}; @@ -71,7 +71,7 @@ TEST_F(clEnqueueReadBufferRectTest, GivenNullCommandQueueWhenReadingRectangularR EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueReadBufferRectTest, GivenNullHostPtrWhenReadingRectangularRegionThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueReadBufferRectTest, GivenNullHostPtrWhenReadingRectangularRegionThenInvalidValueErrorIsReturned) { auto buffer = clCreateBuffer( pContext, CL_MEM_READ_WRITE, @@ -106,7 +106,7 @@ TEST_F(clEnqueueReadBufferRectTest, GivenNullHostPtrWhenReadingRectangularRegion EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueReadBufferRectTest, GivenValidParametersWhenReadingRectangularRegionThenSuccessIsReturned) { +TEST_F(ClEnqueueReadBufferRectTest, GivenValidParametersWhenReadingRectangularRegionThenSuccessIsReturned) { auto buffer = clCreateBuffer( pContext, CL_MEM_READ_WRITE, @@ -142,7 +142,7 @@ TEST_F(clEnqueueReadBufferRectTest, GivenValidParametersWhenReadingRectangularRe clReleaseMemObject(buffer); } -TEST_F(clEnqueueReadBufferRectTest, GivenQueueIncapableWhenReadingRectangularRegionThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueReadBufferRectTest, GivenQueueIncapableWhenReadingRectangularRegionThenInvalidOperationIsReturned) { MockBuffer buffer{}; buffer.size = 100; char ptr[10]; @@ -171,7 +171,7 @@ TEST_F(clEnqueueReadBufferRectTest, GivenQueueIncapableWhenReadingRectangularReg EXPECT_EQ(CL_INVALID_OPERATION, retVal); } -TEST_F(clEnqueueReadBufferRectTest, GivenInvalidPitchWhenReadingRectangularRegionThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueReadBufferRectTest, GivenInvalidPitchWhenReadingRectangularRegionThenInvalidValueErrorIsReturned) { auto buffer = clCreateBuffer( pContext, CL_MEM_READ_WRITE, diff --git a/opencl/test/unit_test/api/cl_enqueue_read_buffer_tests.inl b/opencl/test/unit_test/api/cl_enqueue_read_buffer_tests.inl index 220520704c..ae465cdc96 100644 --- a/opencl/test/unit_test/api/cl_enqueue_read_buffer_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_read_buffer_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,11 +16,11 @@ using namespace NEO; -typedef api_tests clEnqueueReadBufferTests; +using ClEnqueueReadBufferTests = ApiTests; namespace ULT { -TEST_F(clEnqueueReadBufferTests, GivenCorrectArgumentsWhenReadingBufferThenSuccessIsReturned) { +TEST_F(ClEnqueueReadBufferTests, GivenCorrectArgumentsWhenReadingBufferThenSuccessIsReturned) { MockBuffer buffer{}; auto data = 1; auto retVal = clEnqueueReadBuffer( @@ -37,7 +37,7 @@ TEST_F(clEnqueueReadBufferTests, GivenCorrectArgumentsWhenReadingBufferThenSucce EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueReadBufferTests, GivenQueueIncapableArgumentsWhenReadingBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueReadBufferTests, GivenQueueIncapableArgumentsWhenReadingBufferThenInvalidOperationIsReturned) { MockBuffer buffer{}; auto data = 1; @@ -56,7 +56,7 @@ TEST_F(clEnqueueReadBufferTests, GivenQueueIncapableArgumentsWhenReadingBufferTh EXPECT_EQ(CL_INVALID_OPERATION, retVal); } -TEST_F(clEnqueueReadBufferTests, GivenNullCommandQueueWhenReadingBufferThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueReadBufferTests, GivenNullCommandQueueWhenReadingBufferThenInvalidCommandQueueErrorIsReturned) { auto data = 1; auto retVal = clEnqueueReadBuffer( nullptr, @@ -135,7 +135,7 @@ INSTANTIATE_TEST_CASE_P( testing::ValuesIn(read_buffer_flags)); } // namespace ULT -class EnqueueReadBufferTest : public api_tests { +class EnqueueReadBufferTest : public ApiTests { public: EnqueueReadBufferTest() {} @@ -146,7 +146,7 @@ class EnqueueReadBufferTest : public api_tests { unsigned int bufferSize = 0; void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); bufferSize = 16; @@ -167,7 +167,7 @@ class EnqueueReadBufferTest : public api_tests { retVal = clReleaseMemObject(buffer); EXPECT_EQ(CL_SUCCESS, retVal); delete[] pHostMem; - api_tests::TearDown(); + ApiTests::TearDown(); } }; TEST_F(EnqueueReadBufferTest, GivenSvmPtrWhenReadingBufferThenSuccessIsReturned) { diff --git a/opencl/test/unit_test/api/cl_enqueue_read_image_tests.inl b/opencl/test/unit_test/api/cl_enqueue_read_image_tests.inl index 8e3ed91156..083e6f7e40 100644 --- a/opencl/test/unit_test/api/cl_enqueue_read_image_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_read_image_tests.inl @@ -14,7 +14,7 @@ using namespace NEO; -typedef api_tests ClEnqueueReadImageTests; +using ClEnqueueReadImageTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_enqueue_svm_free_tests.inl b/opencl/test/unit_test/api/cl_enqueue_svm_free_tests.inl index 00180d1e63..568c319d5b 100644 --- a/opencl/test/unit_test/api/cl_enqueue_svm_free_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_svm_free_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,11 +17,11 @@ using namespace NEO; -typedef api_tests clEnqueueSVMFreeTests; +using ClEnqueueSVMFreeTests = ApiTests; namespace ULT { -TEST_F(clEnqueueSVMFreeTests, GivenInvalidCommandQueueWhenFreeingSVMThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenInvalidCommandQueueWhenFreeingSVMThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueSVMFree( nullptr, // cl_command_queue command_queue 0, // cl_uint num_svm_pointers @@ -35,7 +35,7 @@ TEST_F(clEnqueueSVMFreeTests, GivenInvalidCommandQueueWhenFreeingSVMThenInvalidC EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueSVMFreeTests, GivenNonZeroNumOfSVMPointersAndNullSVMPointersWhenFreeingSVMThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenNonZeroNumOfSVMPointersAndNullSVMPointersWhenFreeingSVMThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { auto retVal = clEnqueueSVMFree( @@ -52,7 +52,7 @@ TEST_F(clEnqueueSVMFreeTests, GivenNonZeroNumOfSVMPointersAndNullSVMPointersWhen } } -TEST_F(clEnqueueSVMFreeTests, GivenZeroNumOfSVMPointersAndNonNullSVMPointersWhenFreeingSVMThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenZeroNumOfSVMPointersAndNonNullSVMPointersWhenFreeingSVMThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -75,7 +75,7 @@ TEST_F(clEnqueueSVMFreeTests, GivenZeroNumOfSVMPointersAndNonNullSVMPointersWhen } } -TEST_F(clEnqueueSVMFreeTests, GivenNonZeroNumOfEventsAndNullEventListWhenFreeingSVMThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenNonZeroNumOfEventsAndNullEventListWhenFreeingSVMThenInvalidEventWaitListErrorIsReturned) { auto retVal = clEnqueueSVMFree( pCommandQueue, // cl_command_queue command_queue 0, // cl_uint num_svm_pointers @@ -89,7 +89,7 @@ TEST_F(clEnqueueSVMFreeTests, GivenNonZeroNumOfEventsAndNullEventListWhenFreeing EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMFreeTests, GivenZeroNumOfEventsAndNonNullEventListWhenFreeingSVMThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenZeroNumOfEventsAndNonNullEventListWhenFreeingSVMThenInvalidEventWaitListErrorIsReturned) { UserEvent uEvent(pContext); cl_event eventWaitList[] = {&uEvent}; auto retVal = clEnqueueSVMFree( @@ -105,7 +105,7 @@ TEST_F(clEnqueueSVMFreeTests, GivenZeroNumOfEventsAndNonNullEventListWhenFreeing EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMFreeTests, GivenNonZeroNumOfSVMPointersAndNonNullSVMPointersWhenFreeingSVMThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenNonZeroNumOfSVMPointersAndNonNullSVMPointersWhenFreeingSVMThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -128,7 +128,7 @@ TEST_F(clEnqueueSVMFreeTests, GivenNonZeroNumOfSVMPointersAndNonNullSVMPointersW } } -TEST_F(clEnqueueSVMFreeTests, GivenZeroNumOfSVMPointersAndNullSVMPointersWhenFreeingSVMThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenZeroNumOfSVMPointersAndNullSVMPointersWhenFreeingSVMThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { auto retVal = clEnqueueSVMFree( @@ -145,7 +145,7 @@ TEST_F(clEnqueueSVMFreeTests, GivenZeroNumOfSVMPointersAndNullSVMPointersWhenFre } } -TEST_F(clEnqueueSVMFreeTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMFreeThenInvalidOperationErrorIsReturned) { +TEST_F(ClEnqueueSVMFreeTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMFreeThenInvalidOperationErrorIsReturned) { auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.ftrSvm = false; diff --git a/opencl/test/unit_test/api/cl_enqueue_svm_map_tests.inl b/opencl/test/unit_test/api/cl_enqueue_svm_map_tests.inl index 2f34963548..3f01ec0e10 100644 --- a/opencl/test/unit_test/api/cl_enqueue_svm_map_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_svm_map_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,11 +17,11 @@ using namespace NEO; -typedef api_tests clEnqueueSVMMapTests; +using ClEnqueueSVMMapTests = ApiTests; namespace ULT { -TEST_F(clEnqueueSVMMapTests, GivenInvalidCommandQueueWhenMappingSVMThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenInvalidCommandQueueWhenMappingSVMThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueSVMMap( nullptr, // cl_command_queue command_queue CL_FALSE, // cl_bool blocking_map @@ -35,7 +35,7 @@ TEST_F(clEnqueueSVMMapTests, GivenInvalidCommandQueueWhenMappingSVMThenInvalidCo EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueSVMMapTests, GivenNullSVMPointerWhenMappingSVMThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenNullSVMPointerWhenMappingSVMThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { auto retVal = clEnqueueSVMMap( @@ -52,7 +52,7 @@ TEST_F(clEnqueueSVMMapTests, GivenNullSVMPointerWhenMappingSVMThenInvalidValueEr } } -TEST_F(clEnqueueSVMMapTests, GivenRegionSizeZeroWhenMappingSVMThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenRegionSizeZeroWhenMappingSVMThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -74,7 +74,7 @@ TEST_F(clEnqueueSVMMapTests, GivenRegionSizeZeroWhenMappingSVMThenInvalidValueEr } } -TEST_F(clEnqueueSVMMapTests, GivenNullEventWaitListAndNonZeroNumEventsWhenMappingSVMThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenNullEventWaitListAndNonZeroNumEventsWhenMappingSVMThenInvalidEventWaitListErrorIsReturned) { auto retVal = clEnqueueSVMMap( pCommandQueue, // cl_command_queue command_queue CL_FALSE, // cl_bool blocking_map @@ -88,7 +88,7 @@ TEST_F(clEnqueueSVMMapTests, GivenNullEventWaitListAndNonZeroNumEventsWhenMappin EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMapTests, GivenNonNullEventWaitListAndZeroNumEventsWhenMappingSVMThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenNonNullEventWaitListAndZeroNumEventsWhenMappingSVMThenInvalidEventWaitListErrorIsReturned) { UserEvent uEvent(pContext); cl_event eventWaitList[] = {&uEvent}; auto retVal = clEnqueueSVMMap( @@ -104,7 +104,7 @@ TEST_F(clEnqueueSVMMapTests, GivenNonNullEventWaitListAndZeroNumEventsWhenMappin EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMapTests, GivenValidParametersWhenMappingSVMThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenValidParametersWhenMappingSVMThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -126,7 +126,7 @@ TEST_F(clEnqueueSVMMapTests, GivenValidParametersWhenMappingSVMThenSuccessIsRetu } } -TEST_F(clEnqueueSVMMapTests, GivenQueueIncapableWhenMappingSvmBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenQueueIncapableWhenMappingSvmBufferThenInvalidOperationIsReturned) { REQUIRE_SVM_OR_SKIP(pDevice); disableQueueCapabilities(CL_QUEUE_CAPABILITY_MAP_BUFFER_INTEL); @@ -149,7 +149,7 @@ TEST_F(clEnqueueSVMMapTests, GivenQueueIncapableWhenMappingSvmBufferThenInvalidO clSVMFree(pContext, ptrSvm); } -TEST_F(clEnqueueSVMMapTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMapThenInvalidOperationErrorIsReturned) { +TEST_F(ClEnqueueSVMMapTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMapThenInvalidOperationErrorIsReturned) { auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.ftrSvm = false; diff --git a/opencl/test/unit_test/api/cl_enqueue_svm_mem_fill_tests.inl b/opencl/test/unit_test/api/cl_enqueue_svm_mem_fill_tests.inl index 48067cef58..4d17c31d7f 100644 --- a/opencl/test/unit_test/api/cl_enqueue_svm_mem_fill_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_svm_mem_fill_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,11 +17,11 @@ using namespace NEO; -typedef api_tests clEnqueueSVMMemFillTests; +using ClEnqueueSVMMemFillTests = ApiTests; namespace ULT { -TEST_F(clEnqueueSVMMemFillTests, GivenInvalidCommandQueueWhenFillingSVMMemoryThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenInvalidCommandQueueWhenFillingSVMMemoryThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueSVMMemFill( nullptr, // cl_command_queue command_queue nullptr, // void *svm_ptr @@ -35,7 +35,7 @@ TEST_F(clEnqueueSVMMemFillTests, GivenInvalidCommandQueueWhenFillingSVMMemoryThe EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueSVMMemFillTests, GivenNullSVMPtrWhenFillingSVMMemoryThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenNullSVMPtrWhenFillingSVMMemoryThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { auto retVal = clEnqueueSVMMemFill( @@ -52,7 +52,7 @@ TEST_F(clEnqueueSVMMemFillTests, GivenNullSVMPtrWhenFillingSVMMemoryThenInvalidV } } -TEST_F(clEnqueueSVMMemFillTests, GivenRegionSizeZeroWhenFillingSVMMemoryThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenRegionSizeZeroWhenFillingSVMMemoryThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -74,7 +74,7 @@ TEST_F(clEnqueueSVMMemFillTests, GivenRegionSizeZeroWhenFillingSVMMemoryThenInva } } -TEST_F(clEnqueueSVMMemFillTests, GivenNullEventWaitListAndNonZeroEventsWhenFillingSVMMemoryThenInvalidEventWaitListIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenNullEventWaitListAndNonZeroEventsWhenFillingSVMMemoryThenInvalidEventWaitListIsReturned) { auto retVal = clEnqueueSVMMemFill( pCommandQueue, // cl_command_queue command_queue nullptr, // void *svm_ptr @@ -88,7 +88,7 @@ TEST_F(clEnqueueSVMMemFillTests, GivenNullEventWaitListAndNonZeroEventsWhenFilli EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMemFillTests, GivenNonNullEventWaitListAndZeroEventsWhenFillingSVMMemoryThenInvalidEventWaitListIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenNonNullEventWaitListAndZeroEventsWhenFillingSVMMemoryThenInvalidEventWaitListIsReturned) { UserEvent uEvent(pContext); cl_event eventWaitList[] = {&uEvent}; auto retVal = clEnqueueSVMMemFill( @@ -104,7 +104,7 @@ TEST_F(clEnqueueSVMMemFillTests, GivenNonNullEventWaitListAndZeroEventsWhenFilli EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMemFillTests, GivenValidParametersWhenFillingSVMMemoryThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenValidParametersWhenFillingSVMMemoryThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -126,7 +126,7 @@ TEST_F(clEnqueueSVMMemFillTests, GivenValidParametersWhenFillingSVMMemoryThenSuc } } -TEST_F(clEnqueueSVMMemFillTests, GivenQueueIncapableWhenFillingSvmBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenQueueIncapableWhenFillingSvmBufferThenInvalidOperationIsReturned) { REQUIRE_SVM_OR_SKIP(pDevice); disableQueueCapabilities(CL_QUEUE_CAPABILITY_FILL_BUFFER_INTEL); @@ -149,7 +149,7 @@ TEST_F(clEnqueueSVMMemFillTests, GivenQueueIncapableWhenFillingSvmBufferThenInva clSVMFree(pContext, ptrSvm); } -TEST_F(clEnqueueSVMMemFillTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMemFillThenInvalidOperationErrorIsReturned) { +TEST_F(ClEnqueueSVMMemFillTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMemFillThenInvalidOperationErrorIsReturned) { auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.ftrSvm = false; diff --git a/opencl/test/unit_test/api/cl_enqueue_svm_memcpy_tests.inl b/opencl/test/unit_test/api/cl_enqueue_svm_memcpy_tests.inl index 66ad1c985a..0d1942faeb 100644 --- a/opencl/test/unit_test/api/cl_enqueue_svm_memcpy_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_svm_memcpy_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,11 +17,11 @@ using namespace NEO; -typedef api_tests clEnqueueSVMMemcpyTests; +using ClEnqueueSVMMemcpyTests = ApiTests; namespace ULT { -TEST_F(clEnqueueSVMMemcpyTests, GivenInvalidCommandQueueWhenCopyingSVMMemoryThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenInvalidCommandQueueWhenCopyingSVMMemoryThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueSVMMemcpy( nullptr, // cl_command_queue command_queue CL_FALSE, // cl_bool blocking_copy @@ -35,7 +35,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenInvalidCommandQueueWhenCopyingSVMMemoryThen EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueSVMMemcpyTests, GivenNullDstPtrWhenCopyingSVMMemoryThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenNullDstPtrWhenCopyingSVMMemoryThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *pSrcSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -57,7 +57,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenNullDstPtrWhenCopyingSVMMemoryThenInvalidVa } } -TEST_F(clEnqueueSVMMemcpyTests, GivenNullSrcPtrWhenCopyingSVMMemoryThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenNullSrcPtrWhenCopyingSVMMemoryThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *pDstSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -79,7 +79,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenNullSrcPtrWhenCopyingSVMMemoryThenInvalidVa } } -TEST_F(clEnqueueSVMMemcpyTests, GivenNonZeroEventsAndNullEventListWhenCopyingSVMMemoryThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenNonZeroEventsAndNullEventListWhenCopyingSVMMemoryThenInvalidEventWaitListErrorIsReturned) { auto retVal = clEnqueueSVMMemcpy( pCommandQueue, // cl_command_queue command_queue CL_FALSE, // cl_bool blocking_copy @@ -93,7 +93,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenNonZeroEventsAndNullEventListWhenCopyingSVM EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMemcpyTests, GivenZeroEventsAndNonNullEventListWhenCopyingSVMMemoryThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenZeroEventsAndNonNullEventListWhenCopyingSVMMemoryThenInvalidEventWaitListErrorIsReturned) { UserEvent uEvent(pContext); cl_event eventWaitList[] = {&uEvent}; auto retVal = clEnqueueSVMMemcpy( @@ -109,7 +109,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenZeroEventsAndNonNullEventListWhenCopyingSVM EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMemcpyTests, GivenNonZeroSizeWhenCopyingSVMMemoryThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenNonZeroSizeWhenCopyingSVMMemoryThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *pDstSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -134,7 +134,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenNonZeroSizeWhenCopyingSVMMemoryThenSuccessI } } -TEST_F(clEnqueueSVMMemcpyTests, GivenQueueIncapableWhenCopyingSvmBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenQueueIncapableWhenCopyingSvmBufferThenInvalidOperationIsReturned) { REQUIRE_SVM_OR_SKIP(pDevice); disableQueueCapabilities(CL_QUEUE_CAPABILITY_TRANSFER_BUFFER_INTEL); @@ -160,7 +160,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenQueueIncapableWhenCopyingSvmBufferThenInval clSVMFree(pContext, pSrcSvm); } -TEST_F(clEnqueueSVMMemcpyTests, GivenZeroSizeWhenCopyingSVMMemoryThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenZeroSizeWhenCopyingSVMMemoryThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *pDstSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -185,7 +185,7 @@ TEST_F(clEnqueueSVMMemcpyTests, GivenZeroSizeWhenCopyingSVMMemoryThenSuccessIsRe } } -TEST_F(clEnqueueSVMMemcpyTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMemcpyThenInvalidOperationErrorIsReturned) { +TEST_F(ClEnqueueSVMMemcpyTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMemcpyThenInvalidOperationErrorIsReturned) { auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.ftrSvm = false; diff --git a/opencl/test/unit_test/api/cl_enqueue_svm_migrate_mem_tests.cpp b/opencl/test/unit_test/api/cl_enqueue_svm_migrate_mem_tests.cpp index 2325a4934e..5f92202bbc 100644 --- a/opencl/test/unit_test/api/cl_enqueue_svm_migrate_mem_tests.cpp +++ b/opencl/test/unit_test/api/cl_enqueue_svm_migrate_mem_tests.cpp @@ -19,11 +19,11 @@ using namespace NEO; -typedef api_tests clEnqueueSVMMigrateMemTests; +using ClEnqueueSVMMigrateMemTests = ApiTests; namespace ULT { -TEST_F(clEnqueueSVMMigrateMemTests, GivenInvalidCommandQueueWhenMigratingSVMThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenInvalidCommandQueueWhenMigratingSVMThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueSVMMigrateMem( nullptr, // cl_command_queue command_queue 0, // cl_uint num_svm_pointers @@ -37,7 +37,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenInvalidCommandQueueWhenMigratingSVMThen EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueSVMMigrateMemTests, GivenNullSvmPointersWhenMigratingSvmThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenNullSvmPointersWhenMigratingSvmThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { auto retVal = clEnqueueSVMMigrateMem( @@ -54,7 +54,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenNullSvmPointersWhenMigratingSvmThenInva } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenNumSvmPointersIsZeroWhenMigratingSvmThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenNumSvmPointersIsZeroWhenMigratingSvmThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -77,7 +77,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenNumSvmPointersIsZeroWhenMigratingSvmThe } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenSvmPointerIsHostPtrWhenMigratingSvmThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenSvmPointerIsHostPtrWhenMigratingSvmThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities == 0) { GTEST_SKIP(); @@ -101,7 +101,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenSvmPointerIsHostPtrWhenMigratingSvmThen delete[] ptrHost; } -TEST_F(clEnqueueSVMMigrateMemTests, GivenNonZeroSizeIsNotContainedWithinAllocationWhenMigratingSvmThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenNonZeroSizeIsNotContainedWithinAllocationWhenMigratingSvmThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -131,7 +131,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenNonZeroSizeIsNotContainedWithinAllocati } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenUnsupportedFlagsWhenMigratingSvmThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenUnsupportedFlagsWhenMigratingSvmThenInvalidValueErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -154,7 +154,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenUnsupportedFlagsWhenMigratingSvmThenInv } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenNullEventWaitListAndNonZeroNumEventsWhenMigratingSvmThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenNullEventWaitListAndNonZeroNumEventsWhenMigratingSvmThenInvalidEventWaitListErrorIsReturned) { auto retVal = clEnqueueSVMMigrateMem( pCommandQueue, // cl_command_queue command_queue 0, // cl_uint num_svm_pointers @@ -168,7 +168,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenNullEventWaitListAndNonZeroNumEventsWhe EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMigrateMemTests, GivenNonNullEventWaitListAndZeroNumEventsWhenMigratingSvmThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenNonNullEventWaitListAndZeroNumEventsWhenMigratingSvmThenInvalidEventWaitListErrorIsReturned) { UserEvent uEvent(pContext); cl_event eventWaitList[] = {&uEvent}; auto retVal = clEnqueueSVMMigrateMem( @@ -184,7 +184,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenNonNullEventWaitListAndZeroNumEventsWhe EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMMigrateMemTests, GivenDifferentContextCommandQueueAndEventsWhenMigratingSvmThenInvalidContextErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenDifferentContextCommandQueueAndEventsWhenMigratingSvmThenInvalidContextErrorIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -210,7 +210,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenDifferentContextCommandQueueAndEventsWh } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenNullSizesWhenMigratingSvmThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenNullSizesWhenMigratingSvmThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -233,7 +233,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenNullSizesWhenMigratingSvmThenSuccessIsR } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenSizeZeroWhenMigratingSvmThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenSizeZeroWhenMigratingSvmThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -257,7 +257,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenSizeZeroWhenMigratingSvmThenSuccessIsRe } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenNonZeroSizeWhenMigratingSvmThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenNonZeroSizeWhenMigratingSvmThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -281,7 +281,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenNonZeroSizeWhenMigratingSvmThenSuccessI } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenSameContextCommandQueueAndEventsWhenMigratingSvmThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenSameContextCommandQueueAndEventsWhenMigratingSvmThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -306,7 +306,7 @@ TEST_F(clEnqueueSVMMigrateMemTests, GivenSameContextCommandQueueAndEventsWhenMig } } -TEST_F(clEnqueueSVMMigrateMemTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMigrateMemThenInvalidOperationErrorIsReturned) { +TEST_F(ClEnqueueSVMMigrateMemTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMMigrateMemThenInvalidOperationErrorIsReturned) { auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.ftrSvm = false; diff --git a/opencl/test/unit_test/api/cl_enqueue_svm_unmap_tests.inl b/opencl/test/unit_test/api/cl_enqueue_svm_unmap_tests.inl index 4b6f6785fa..5c00564ecd 100644 --- a/opencl/test/unit_test/api/cl_enqueue_svm_unmap_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_svm_unmap_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,11 +17,11 @@ using namespace NEO; -typedef api_tests clEnqueueSVMUnmapTests; +using ClEnqueueSVMUnmapTests = ApiTests; namespace ULT { -TEST_F(clEnqueueSVMUnmapTests, GivenInvalidCommandQueueWhenUnmappingSvmThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueSVMUnmapTests, GivenInvalidCommandQueueWhenUnmappingSvmThenInvalidCommandQueueErrorIsReturned) { auto retVal = clEnqueueSVMUnmap( nullptr, // cl_command_queue command_queue nullptr, // void *svm_ptr @@ -32,7 +32,7 @@ TEST_F(clEnqueueSVMUnmapTests, GivenInvalidCommandQueueWhenUnmappingSvmThenInval EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueSVMUnmapTests, GivenNullSvmPtrWhenUnmappingSvmThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueSVMUnmapTests, GivenNullSvmPtrWhenUnmappingSvmThenInvalidValueErrorIsReturned) { auto retVal = clEnqueueSVMUnmap( pCommandQueue, // cl_command_queue command_queue nullptr, // void *svm_ptr @@ -43,7 +43,7 @@ TEST_F(clEnqueueSVMUnmapTests, GivenNullSvmPtrWhenUnmappingSvmThenInvalidValueEr EXPECT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clEnqueueSVMUnmapTests, GivenNullEventListAndNonZeroEventsWhenUnmappingSvmThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMUnmapTests, GivenNullEventListAndNonZeroEventsWhenUnmappingSvmThenInvalidEventWaitListErrorIsReturned) { auto retVal = clEnqueueSVMUnmap( pCommandQueue, // cl_command_queue command_queue nullptr, // void *svm_ptr @@ -54,7 +54,7 @@ TEST_F(clEnqueueSVMUnmapTests, GivenNullEventListAndNonZeroEventsWhenUnmappingSv EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMUnmapTests, GivenNonNullEventListAndZeroEventsWhenUnmappingSvmThenInvalidEventWaitListErrorIsReturned) { +TEST_F(ClEnqueueSVMUnmapTests, GivenNonNullEventListAndZeroEventsWhenUnmappingSvmThenInvalidEventWaitListErrorIsReturned) { UserEvent uEvent(pContext); cl_event eventWaitList[] = {&uEvent}; auto retVal = clEnqueueSVMUnmap( @@ -67,7 +67,7 @@ TEST_F(clEnqueueSVMUnmapTests, GivenNonNullEventListAndZeroEventsWhenUnmappingSv EXPECT_EQ(CL_INVALID_EVENT_WAIT_LIST, retVal); } -TEST_F(clEnqueueSVMUnmapTests, GivenValidParametersWhenUnmappingSvmThenSuccessIsReturned) { +TEST_F(ClEnqueueSVMUnmapTests, GivenValidParametersWhenUnmappingSvmThenSuccessIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -98,7 +98,7 @@ TEST_F(clEnqueueSVMUnmapTests, GivenValidParametersWhenUnmappingSvmThenSuccessIs } } -TEST_F(clEnqueueSVMUnmapTests, GivenQueueIncapableWhenUnmappingSvmBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueSVMUnmapTests, GivenQueueIncapableWhenUnmappingSvmBufferThenInvalidOperationIsReturned) { REQUIRE_SVM_OR_SKIP(pDevice); void *ptrSvm = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 256, 4); @@ -130,7 +130,7 @@ TEST_F(clEnqueueSVMUnmapTests, GivenQueueIncapableWhenUnmappingSvmBufferThenInva clSVMFree(pContext, ptrSvm); } -TEST_F(clEnqueueSVMUnmapTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMUnmapThenInvalidOperationErrorIsReturned) { +TEST_F(ClEnqueueSVMUnmapTests, GivenDeviceNotSupportingSvmWhenEnqueuingSVMUnmapThenInvalidOperationErrorIsReturned) { auto hwInfo = *defaultHwInfo; hwInfo.capabilityTable.ftrSvm = false; diff --git a/opencl/test/unit_test/api/cl_enqueue_task_tests.inl b/opencl/test/unit_test/api/cl_enqueue_task_tests.inl index e3d3434700..2cc3f201c8 100644 --- a/opencl/test/unit_test/api/cl_enqueue_task_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_task_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,7 +13,7 @@ using namespace NEO; -typedef api_tests clEnqueueTaskTests; +using ClEnqueueTaskTests = ApiTests; struct EnqueueTaskWithRequiredWorkGroupSize : public HelloWorldTest { typedef HelloWorldTest Parent; @@ -31,7 +31,7 @@ struct EnqueueTaskWithRequiredWorkGroupSize : public HelloWorldTest(BufferHelper>::create(pContext)); diff --git a/opencl/test/unit_test/api/cl_enqueue_verify_memory.inl b/opencl/test/unit_test/api/cl_enqueue_verify_memory.inl index def715c9e1..aa45371cd0 100644 --- a/opencl/test/unit_test/api/cl_enqueue_verify_memory.inl +++ b/opencl/test/unit_test/api/cl_enqueue_verify_memory.inl @@ -31,7 +31,7 @@ struct ClEnqueueVerifyMemoryINTELSettings { void *gpuAddress = expected; }; -class ClEnqueueVerifyMemoryIntelTests : public api_tests, +class ClEnqueueVerifyMemoryIntelTests : public ApiTests, public ClEnqueueVerifyMemoryINTELSettings { }; diff --git a/opencl/test/unit_test/api/cl_enqueue_wait_for_events_tests.inl b/opencl/test/unit_test/api/cl_enqueue_wait_for_events_tests.inl index 478b68857b..9a95928c77 100644 --- a/opencl/test/unit_test/api/cl_enqueue_wait_for_events_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_wait_for_events_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -21,7 +21,7 @@ using namespace NEO; -using clEnqueueWaitForEventsTests = api_tests; +using clEnqueueWaitForEventsTests = ApiTests; TEST_F(clEnqueueWaitForEventsTests, GivenInvalidCommandQueueWhenClEnqueueWaitForEventsIsCalledThenReturnError) { auto retVal = CL_SUCCESS; diff --git a/opencl/test/unit_test/api/cl_enqueue_write_buffer_rect_tests.inl b/opencl/test/unit_test/api/cl_enqueue_write_buffer_rect_tests.inl index 0eaf98222d..87a47eed8c 100644 --- a/opencl/test/unit_test/api/cl_enqueue_write_buffer_rect_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_write_buffer_rect_tests.inl @@ -14,11 +14,11 @@ using namespace NEO; -typedef api_tests clEnqueueWriteBufferRectTests; +using ClEnqueueWriteBufferRectTests = ApiTests; namespace ULT { -TEST_F(clEnqueueWriteBufferRectTests, GivenInvalidBufferWhenWritingRectangularRegionThenInvalidMemObjectErrorIsReturned) { +TEST_F(ClEnqueueWriteBufferRectTests, GivenInvalidBufferWhenWritingRectangularRegionThenInvalidMemObjectErrorIsReturned) { auto buffer = (cl_mem)ptrGarbage; size_t buffOrigin[] = {0, 0, 0}; size_t hostOrigin[] = {0, 0, 0}; @@ -44,7 +44,7 @@ TEST_F(clEnqueueWriteBufferRectTests, GivenInvalidBufferWhenWritingRectangularRe EXPECT_EQ(CL_INVALID_MEM_OBJECT, retVal); } -TEST_F(clEnqueueWriteBufferRectTests, GivenNullCommandQueueWhenWritingRectangularRegionThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueWriteBufferRectTests, GivenNullCommandQueueWhenWritingRectangularRegionThenInvalidCommandQueueErrorIsReturned) { auto buffer = (cl_mem)ptrGarbage; size_t buffOrigin[] = {0, 0, 0}; size_t hostOrigin[] = {0, 0, 0}; @@ -70,7 +70,7 @@ TEST_F(clEnqueueWriteBufferRectTests, GivenNullCommandQueueWhenWritingRectangula EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueWriteBufferRectTests, GivenNullHostPtrWhenWritingRectangularRegionThenInvalidValueErrorIsReturned) { +TEST_F(ClEnqueueWriteBufferRectTests, GivenNullHostPtrWhenWritingRectangularRegionThenInvalidValueErrorIsReturned) { auto buffer = clCreateBuffer( pContext, CL_MEM_READ_WRITE, @@ -105,7 +105,7 @@ TEST_F(clEnqueueWriteBufferRectTests, GivenNullHostPtrWhenWritingRectangularRegi EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueWriteBufferRectTests, GivenCorrectParametersWhenWritingRectangularRegionThenSuccessIsReturned) { +TEST_F(ClEnqueueWriteBufferRectTests, GivenCorrectParametersWhenWritingRectangularRegionThenSuccessIsReturned) { MockBuffer buffer{}; buffer.size = 100; char ptr[10] = {}; @@ -133,7 +133,7 @@ TEST_F(clEnqueueWriteBufferRectTests, GivenCorrectParametersWhenWritingRectangul EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueWriteBufferRectTests, GivenQueueIncapableWhenWritingRectangularRegionThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueWriteBufferRectTests, GivenQueueIncapableWhenWritingRectangularRegionThenInvalidOperationIsReturned) { MockBuffer buffer{}; buffer.size = 100; char ptr[10] = {}; diff --git a/opencl/test/unit_test/api/cl_enqueue_write_buffer_tests.inl b/opencl/test/unit_test/api/cl_enqueue_write_buffer_tests.inl index d5b931cb0b..aca86c18bb 100644 --- a/opencl/test/unit_test/api/cl_enqueue_write_buffer_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_write_buffer_tests.inl @@ -14,11 +14,11 @@ using namespace NEO; -typedef api_tests clEnqueueWriteBufferTests; +using ClEnqueueWriteBufferTests = ApiTests; namespace ULT { -TEST_F(clEnqueueWriteBufferTests, GivenCorrectArgumentsWhenWritingBufferThenSuccessIsReturned) { +TEST_F(ClEnqueueWriteBufferTests, GivenCorrectArgumentsWhenWritingBufferThenSuccessIsReturned) { MockBuffer buffer{}; auto data = 1; auto retVal = clEnqueueWriteBuffer( @@ -35,7 +35,7 @@ TEST_F(clEnqueueWriteBufferTests, GivenCorrectArgumentsWhenWritingBufferThenSucc EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clEnqueueWriteBufferTests, GivenQueueIncapableArgumentsWhenWritingBufferThenInvalidOperationIsReturned) { +TEST_F(ClEnqueueWriteBufferTests, GivenQueueIncapableArgumentsWhenWritingBufferThenInvalidOperationIsReturned) { MockBuffer buffer{}; auto data = 1; @@ -54,7 +54,7 @@ TEST_F(clEnqueueWriteBufferTests, GivenQueueIncapableArgumentsWhenWritingBufferT EXPECT_EQ(CL_INVALID_OPERATION, retVal); } -TEST_F(clEnqueueWriteBufferTests, GivenNullCommandQueueWhenWritingBufferThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClEnqueueWriteBufferTests, GivenNullCommandQueueWhenWritingBufferThenInvalidCommandQueueErrorIsReturned) { auto buffer = (cl_mem)ptrGarbage; retVal = clEnqueueWriteBuffer( @@ -71,7 +71,7 @@ TEST_F(clEnqueueWriteBufferTests, GivenNullCommandQueueWhenWritingBufferThenInva EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -TEST_F(clEnqueueWriteBufferTests, GivenNullBufferWhenWritingBufferThenInvalidMemObjectErrorIsReturned) { +TEST_F(ClEnqueueWriteBufferTests, GivenNullBufferWhenWritingBufferThenInvalidMemObjectErrorIsReturned) { void *ptr = nullptr; retVal = clEnqueueWriteBuffer( diff --git a/opencl/test/unit_test/api/cl_enqueue_write_image_tests.inl b/opencl/test/unit_test/api/cl_enqueue_write_image_tests.inl index d94025aa9b..523fc39eab 100644 --- a/opencl/test/unit_test/api/cl_enqueue_write_image_tests.inl +++ b/opencl/test/unit_test/api/cl_enqueue_write_image_tests.inl @@ -14,7 +14,7 @@ using namespace NEO; -typedef api_tests ClEnqueueWriteImageTests; +using ClEnqueueWriteImageTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_finish_tests.inl b/opencl/test/unit_test/api/cl_finish_tests.inl index a6443ee694..8495a531ec 100644 --- a/opencl/test/unit_test/api/cl_finish_tests.inl +++ b/opencl/test/unit_test/api/cl_finish_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,16 +11,16 @@ using namespace NEO; -typedef api_tests clFinishTests; +using ClFinishTests = ApiTests; namespace ULT { -TEST_F(clFinishTests, GivenValidCommandQueueWhenWaitingForFinishThenSuccessIsReturned) { +TEST_F(ClFinishTests, GivenValidCommandQueueWhenWaitingForFinishThenSuccessIsReturned) { retVal = clFinish(pCommandQueue); EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clFinishTests, GivenNullCommandQueueWhenWaitingForFinishThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClFinishTests, GivenNullCommandQueueWhenWaitingForFinishThenInvalidCommandQueueErrorIsReturned) { auto retVal = clFinish(nullptr); EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } diff --git a/opencl/test/unit_test/api/cl_flush_tests.inl b/opencl/test/unit_test/api/cl_flush_tests.inl index 9eb2ccd116..1a116ab1a6 100644 --- a/opencl/test/unit_test/api/cl_flush_tests.inl +++ b/opencl/test/unit_test/api/cl_flush_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,16 +11,16 @@ using namespace NEO; -typedef api_tests clFlushTests; +using ClFlushTests = ApiTests; namespace ULT { -TEST_F(clFlushTests, GivenValidCommandQueueWhenFlushingThenSuccessIsReturned) { +TEST_F(ClFlushTests, GivenValidCommandQueueWhenFlushingThenSuccessIsReturned) { retVal = clFlush(pCommandQueue); EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clFlushTests, GivenNullCommandQueueWhenFlushingThenInvalidCommandQueueErrorIsReturned) { +TEST_F(ClFlushTests, GivenNullCommandQueueWhenFlushingThenInvalidCommandQueueErrorIsReturned) { auto retVal = clFlush(nullptr); EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } diff --git a/opencl/test/unit_test/api/cl_function_pointers_tests.inl b/opencl/test/unit_test/api/cl_function_pointers_tests.inl index 276666d19d..8e2ec29506 100644 --- a/opencl/test/unit_test/api/cl_function_pointers_tests.inl +++ b/opencl/test/unit_test/api/cl_function_pointers_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,8 +11,8 @@ using namespace NEO; -using clGetDeviceGlobalVariablePointer = api_tests; -using clGetDeviceFunctionPointer = api_tests; +using clGetDeviceGlobalVariablePointer = ApiTests; +using clGetDeviceFunctionPointer = ApiTests; TEST_F(clGetDeviceGlobalVariablePointer, GivenNullMandatoryArgumentsThenReturnInvalidArgError) { auto &symbols = pProgram->buildInfos[testedRootDeviceIndex].symbols; diff --git a/opencl/test/unit_test/api/cl_get_context_info_tests.inl b/opencl/test/unit_test/api/cl_get_context_info_tests.inl index 8d13fcb963..cf1a264364 100644 --- a/opencl/test/unit_test/api/cl_get_context_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_context_info_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,11 +13,11 @@ using namespace NEO; -typedef api_tests clGetContextInfoTests; +using ClGetContextInfoTests = ApiTests; namespace ULT { -TEST_F(clGetContextInfoTests, GivenContextNumDevicesParamWhenGettingContextInfoThenNumDevicesIsReturned) { +TEST_F(ClGetContextInfoTests, GivenContextNumDevicesParamWhenGettingContextInfoThenNumDevicesIsReturned) { cl_uint numDevices = 0; retVal = clGetContextInfo( @@ -31,7 +31,7 @@ TEST_F(clGetContextInfoTests, GivenContextNumDevicesParamWhenGettingContextInfoT EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clGetContextInfoTests, GivenContextWithSingleDeviceAndContextDevicesParamWhenGettingContextInfoThenListOfDevicesContainsOneDevice) { +TEST_F(ClGetContextInfoTests, GivenContextWithSingleDeviceAndContextDevicesParamWhenGettingContextInfoThenListOfDevicesContainsOneDevice) { retVal = clGetContextInfo( pContext, CL_CONTEXT_DEVICES, @@ -43,7 +43,7 @@ TEST_F(clGetContextInfoTests, GivenContextWithSingleDeviceAndContextDevicesParam EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clGetContextInfoTests, GivenContextWithMultipleDevicesAndContextDevicesParamWhenGettingContextInfoThenListOfDevicesContainsAllDevices) { +TEST_F(ClGetContextInfoTests, GivenContextWithMultipleDevicesAndContextDevicesParamWhenGettingContextInfoThenListOfDevicesContainsAllDevices) { cl_uint numDevices = 2u; auto inputDevices = std::make_unique(numDevices); auto outputDevices = std::make_unique(numDevices); diff --git a/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl b/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl index 6b1bb88fc8..90ec841fc6 100644 --- a/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl +++ b/opencl/test/unit_test/api/cl_get_device_and_host_timer.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -30,12 +30,12 @@ struct FailOSTime : public MockOSTime { }; }; -typedef api_tests clGetDeviceAndHostTimerTest; -typedef api_tests clGetHostTimerTest; +using ClGetDeviceAndHostTimerTest = ApiTests; +using ClGetHostTimerTest = ApiTests; namespace ULT { -TEST_F(clGetDeviceAndHostTimerTest, GivenNullDeviceWhenGettingDeviceAndHostTimerThenInvalidDeviceErrorIsReturned) { +TEST_F(ClGetDeviceAndHostTimerTest, GivenNullDeviceWhenGettingDeviceAndHostTimerThenInvalidDeviceErrorIsReturned) { cl_ulong deviceTimestamp = 0; cl_ulong hostTimestamp = 0; @@ -47,7 +47,7 @@ TEST_F(clGetDeviceAndHostTimerTest, GivenNullDeviceWhenGettingDeviceAndHostTimer EXPECT_EQ(CL_INVALID_DEVICE, retVal); } -TEST_F(clGetDeviceAndHostTimerTest, GivenNullHostTimerWhenGettingDeviceAndHostTimerThenInvalidValueErrorIsReturned) { +TEST_F(ClGetDeviceAndHostTimerTest, GivenNullHostTimerWhenGettingDeviceAndHostTimerThenInvalidValueErrorIsReturned) { cl_ulong deviceTimestamp = 0; retVal = clGetDeviceAndHostTimer( @@ -58,7 +58,7 @@ TEST_F(clGetDeviceAndHostTimerTest, GivenNullHostTimerWhenGettingDeviceAndHostTi EXPECT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clGetDeviceAndHostTimerTest, GivenNullDevicesTimerWhenGettingDeviceAndHostTimerThenInvalidValueErrorIsReturned) { +TEST_F(ClGetDeviceAndHostTimerTest, GivenNullDevicesTimerWhenGettingDeviceAndHostTimerThenInvalidValueErrorIsReturned) { cl_ulong hostTimestamp = 0; retVal = clGetDeviceAndHostTimer( @@ -69,7 +69,7 @@ TEST_F(clGetDeviceAndHostTimerTest, GivenNullDevicesTimerWhenGettingDeviceAndHos EXPECT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clGetDeviceAndHostTimerTest, GivenValidOSTimeWhenGettingDeviceAndHostTimerThenSuccessIsReturned) { +TEST_F(ClGetDeviceAndHostTimerTest, GivenValidOSTimeWhenGettingDeviceAndHostTimerThenSuccessIsReturned) { cl_ulong deviceTimestamp = 0; cl_ulong hostTimestamp = 0; cl_ulong zeroTimestamp = 0; @@ -89,7 +89,7 @@ TEST_F(clGetDeviceAndHostTimerTest, GivenValidOSTimeWhenGettingDeviceAndHostTime delete mDev; } -TEST_F(clGetDeviceAndHostTimerTest, GivenInvalidOSTimeWhenGettingDeviceAndHostTimerThenOutOfResourcesErrorIsReturned) { +TEST_F(ClGetDeviceAndHostTimerTest, GivenInvalidOSTimeWhenGettingDeviceAndHostTimerThenOutOfResourcesErrorIsReturned) { cl_ulong deviceTimestamp = 0; cl_ulong hostTimestamp = 0; cl_ulong zeroTimestamp = 0; @@ -109,7 +109,7 @@ TEST_F(clGetDeviceAndHostTimerTest, GivenInvalidOSTimeWhenGettingDeviceAndHostTi delete mDev; } -TEST_F(clGetHostTimerTest, GivenNullDeviceWhenGettingHostTimerThenInvalidDeviceErrorIsReturned) { +TEST_F(ClGetHostTimerTest, GivenNullDeviceWhenGettingHostTimerThenInvalidDeviceErrorIsReturned) { cl_ulong hostTimestamp = 0; retVal = clGetHostTimer( @@ -119,7 +119,7 @@ TEST_F(clGetHostTimerTest, GivenNullDeviceWhenGettingHostTimerThenInvalidDeviceE EXPECT_EQ(CL_INVALID_DEVICE, retVal); } -TEST_F(clGetHostTimerTest, GivenNullHostTimerWhenGettingHostTimerThenInvalidValueErrorIsReturned) { +TEST_F(ClGetHostTimerTest, GivenNullHostTimerWhenGettingHostTimerThenInvalidValueErrorIsReturned) { retVal = clGetHostTimer( testedClDevice, nullptr); @@ -127,7 +127,7 @@ TEST_F(clGetHostTimerTest, GivenNullHostTimerWhenGettingHostTimerThenInvalidValu EXPECT_EQ(CL_INVALID_VALUE, retVal); } -TEST_F(clGetHostTimerTest, GivenCorrectParametersWhenGettingHostTimerThenSuccessIsReturned) { +TEST_F(ClGetHostTimerTest, GivenCorrectParametersWhenGettingHostTimerThenSuccessIsReturned) { cl_ulong hostTimestamp = 0; cl_ulong zeroTimestamp = 0; @@ -139,7 +139,7 @@ TEST_F(clGetHostTimerTest, GivenCorrectParametersWhenGettingHostTimerThenSuccess EXPECT_EQ(retVal, CL_SUCCESS); } -TEST_F(clGetHostTimerTest, GivenValidOSTimeWhenGettingHostTimerThenSuccessIsReturned) { +TEST_F(ClGetHostTimerTest, GivenValidOSTimeWhenGettingHostTimerThenSuccessIsReturned) { cl_ulong hostTimestamp = 0; cl_ulong zeroTimestamp = 0; @@ -156,7 +156,7 @@ TEST_F(clGetHostTimerTest, GivenValidOSTimeWhenGettingHostTimerThenSuccessIsRetu delete mDev; } -TEST_F(clGetHostTimerTest, GivenInvalidOSTimeWhenGettingHostTimerThenOutOfResourcesErrorIsReturned) { +TEST_F(ClGetHostTimerTest, GivenInvalidOSTimeWhenGettingHostTimerThenOutOfResourcesErrorIsReturned) { cl_ulong hostTimestamp = 0; cl_ulong zeroTimestamp = 0; diff --git a/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp b/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp index bf4347250a..22f85fa946 100644 --- a/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp +++ b/opencl/test/unit_test/api/cl_get_device_info_pvc_and_later_tests.cpp @@ -12,7 +12,7 @@ using namespace NEO; -using clGetDeviceInfoPvcAndLater = api_tests; +using clGetDeviceInfoPvcAndLater = ApiTests; using matcherPvcAndLater = IsAtLeastXeHpcCore; namespace ULT { HWTEST2_F(clGetDeviceInfoPvcAndLater, givenClDeviceSupportedThreadArbitrationPolicyIntelWhenPvcAndLatereAndCallClGetDeviceInfoThenProperArrayIsReturned, matcherPvcAndLater) { diff --git a/opencl/test/unit_test/api/cl_get_device_info_tests.inl b/opencl/test/unit_test/api/cl_get_device_info_tests.inl index bc7e06bef3..6d0dec616f 100644 --- a/opencl/test/unit_test/api/cl_get_device_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_device_info_tests.inl @@ -16,7 +16,7 @@ using namespace NEO; -using clGetDeviceInfoTests = api_tests; +using clGetDeviceInfoTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_get_extension_function_address_tests.inl b/opencl/test/unit_test/api/cl_get_extension_function_address_tests.inl index 80e5e3061c..278b20e8a1 100644 --- a/opencl/test/unit_test/api/cl_get_extension_function_address_tests.inl +++ b/opencl/test/unit_test/api/cl_get_extension_function_address_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,186 +9,186 @@ using namespace NEO; -typedef api_tests clGetExtensionFunctionAddressTests; +using ClGetExtensionFunctionAddressTests = ApiTests; namespace ULT { -TEST_F(clGetExtensionFunctionAddressTests, GivenNonExistentExtensionWhenGettingExtensionFunctionThenNullIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenNonExistentExtensionWhenGettingExtensionFunctionThenNullIsReturned) { auto retVal = clGetExtensionFunctionAddress("__some__function__"); EXPECT_EQ(nullptr, retVal); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClIcdGetPlatformIDsKHRWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClIcdGetPlatformIDsKHRWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clIcdGetPlatformIDsKHR"); EXPECT_EQ(retVal, reinterpret_cast(clIcdGetPlatformIDsKHR)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clCreateAcceleratorINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clCreateAcceleratorINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetAcceleratorInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetAcceleratorInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetAcceleratorInfoINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetAcceleratorInfoINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClRetainAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClRetainAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clRetainAcceleratorINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clRetainAcceleratorINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClReleaseAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClReleaseAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clReleaseAcceleratorINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clReleaseAcceleratorINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClCreatePerfCountersCommandQueueINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreatePerfCountersCommandQueueINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clCreatePerfCountersCommandQueueINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clCreatePerfCountersCommandQueueINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClSetPerformanceConfigurationINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClSetPerformanceConfigurationINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clSetPerformanceConfigurationINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clSetPerformanceConfigurationINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateBufferWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateBufferWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto functionPointer = clGetExtensionFunctionAddress("clCreateBufferWithPropertiesINTEL"); EXPECT_EQ(functionPointer, reinterpret_cast(clCreateBufferWithPropertiesINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateImageWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateImageWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto functionPointer = clGetExtensionFunctionAddress("clCreateImageWithPropertiesINTEL"); EXPECT_EQ(functionPointer, reinterpret_cast(clCreateImageWithPropertiesINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, givenClAddCommentToAubIntelAsInputWhenFunctionIsCalledThenProperPointerIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, givenClAddCommentToAubIntelAsInputWhenFunctionIsCalledThenProperPointerIsReturned) { auto functionPointer = clGetExtensionFunctionAddress("clAddCommentINTEL"); EXPECT_EQ(functionPointer, reinterpret_cast(clAddCommentINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clCreateTracingHandleINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clCreateTracingHandleINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClSetTracingPointINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClSetTracingPointINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clSetTracingPointINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clSetTracingPointINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClDestroyTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClDestroyTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clDestroyTracingHandleINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clDestroyTracingHandleINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnableTracingINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnableTracingINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clEnableTracingINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnableTracingINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClDisableTracingINTELLWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClDisableTracingINTELLWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clDisableTracingINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clDisableTracingINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetTracingStateINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetTracingStateINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetTracingStateINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetTracingStateINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClHostMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClHostMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clHostMemAllocINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clHostMemAllocINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClDeviceMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClDeviceMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clDeviceMemAllocINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clDeviceMemAllocINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClSharedMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClSharedMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clSharedMemAllocINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clSharedMemAllocINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClMemFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClMemFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clMemFreeINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clMemFreeINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClMemBlockingFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClMemBlockingFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clMemBlockingFreeINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clMemBlockingFreeINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetMemAllocInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetMemAllocInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetMemAllocInfoINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetMemAllocInfoINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClSetKernelArgMemPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClSetKernelArgMemPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clSetKernelArgMemPointerINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clSetKernelArgMemPointerINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemsetINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemsetINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueMemsetINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueMemsetINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemFillINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemFillINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueMemFillINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueMemFillINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemcpyINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemcpyINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueMemcpyINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueMemcpyINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMigrateMemINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMigrateMemINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueMigrateMemINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueMigrateMemINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemAdviseINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemAdviseINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueMemAdviseINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueMemAdviseINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetDeviceGlobalVariablePointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetDeviceGlobalVariablePointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetDeviceGlobalVariablePointerINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetDeviceGlobalVariablePointerINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetDeviceFunctionPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetDeviceFunctionPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetDeviceFunctionPointerINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetDeviceFunctionPointerINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetKernelSuggestedLocalWorkSizeINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetKernelSuggestedLocalWorkSizeINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeKHRWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeKHRWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetKernelSuggestedLocalWorkSizeKHR"); EXPECT_EQ(retVal, reinterpret_cast(clGetKernelSuggestedLocalWorkSizeKHR)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetKernelMaxConcurrentWorkGroupCountINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetKernelMaxConcurrentWorkGroupCountINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clGetKernelMaxConcurrentWorkGroupCountINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetKernelMaxConcurrentWorkGroupCountINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueNDCountKernelINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueNDCountKernelINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueNDCountKernelINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueNDCountKernelINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenCSlSetProgramSpecializationConstantWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenCSlSetProgramSpecializationConstantWhenGettingExtensionFunctionThenCorrectAddressIsReturned) { auto retVal = clGetExtensionFunctionAddress("clSetProgramSpecializationConstant"); EXPECT_EQ(retVal, reinterpret_cast(clSetProgramSpecializationConstant)); } diff --git a/opencl/test/unit_test/api/cl_get_kernel_arg_info_tests.inl b/opencl/test/unit_test/api/cl_get_kernel_arg_info_tests.inl index 7042229e01..a14d69f741 100644 --- a/opencl/test/unit_test/api/cl_get_kernel_arg_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_kernel_arg_info_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,11 +18,11 @@ using namespace NEO; -typedef api_tests clGetKernelArgInfoTests; +using ClGetKernelArgInfoTests = ApiTests; namespace ULT { -TEST_F(clGetKernelArgInfoTests, GivenValidParamsWhenGettingKernelArgInfoThenSuccessAndCorrectSizeAreReturned) { +TEST_F(ClGetKernelArgInfoTests, GivenValidParamsWhenGettingKernelArgInfoThenSuccessAndCorrectSizeAreReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; diff --git a/opencl/test/unit_test/api/cl_get_kernel_info_tests.inl b/opencl/test/unit_test/api/cl_get_kernel_info_tests.inl index a41c4562a2..d694a3df5a 100644 --- a/opencl/test/unit_test/api/cl_get_kernel_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_kernel_info_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,11 +17,11 @@ using namespace NEO; -typedef api_tests clGetKernelInfoTests; +using ClGetKernelInfoTests = ApiTests; namespace ULT { -TEST_F(clGetKernelInfoTests, GivenValidParamsWhenGettingKernelInfoThenSuccessIsReturned) { +TEST_F(ClGetKernelInfoTests, GivenValidParamsWhenGettingKernelInfoThenSuccessIsReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; diff --git a/opencl/test/unit_test/api/cl_get_kernel_max_concurrent_work_group_count_intel_tests.inl b/opencl/test/unit_test/api/cl_get_kernel_max_concurrent_work_group_count_intel_tests.inl index 1d788e00eb..6b9fe74ec0 100644 --- a/opencl/test/unit_test/api/cl_get_kernel_max_concurrent_work_group_count_intel_tests.inl +++ b/opencl/test/unit_test/api/cl_get_kernel_max_concurrent_work_group_count_intel_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2022 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,7 +14,7 @@ using namespace NEO; -using clGetKernelMaxConcurrentWorkGroupCountTests = api_tests; +using clGetKernelMaxConcurrentWorkGroupCountTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_intel_tests.inl b/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_intel_tests.inl index f7843a901a..67254e6335 100644 --- a/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_intel_tests.inl +++ b/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_intel_tests.inl @@ -13,7 +13,7 @@ using namespace NEO; -using clGetKernelSuggestedLocalWorkSizeTests = api_tests; +using clGetKernelSuggestedLocalWorkSizeTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_khr_tests.inl b/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_khr_tests.inl index 96d80bb935..6bc0ee221e 100644 --- a/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_khr_tests.inl +++ b/opencl/test/unit_test/api/cl_get_kernel_suggested_local_work_size_khr_tests.inl @@ -13,7 +13,7 @@ using namespace NEO; -using clGetKernelSuggestedLocalWorkSizeKHRTests = api_tests; +using clGetKernelSuggestedLocalWorkSizeKHRTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_get_mem_object_info_tests.inl b/opencl/test/unit_test/api/cl_get_mem_object_info_tests.inl index c28a347150..d03bc2fc65 100644 --- a/opencl/test/unit_test/api/cl_get_mem_object_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_mem_object_info_tests.inl @@ -16,11 +16,11 @@ using namespace NEO; -typedef api_tests clGetMemObjectInfoTests; +using ClGetMemObjectInfoTests = ApiTests; namespace ULT { -TEST_F(clGetMemObjectInfoTests, givenValidBufferWhenGettingMemObjectInfoThenCorrectBufferSizeIsReturned) { +TEST_F(ClGetMemObjectInfoTests, givenValidBufferWhenGettingMemObjectInfoThenCorrectBufferSizeIsReturned) { size_t bufferSize = 16; cl_mem buffer = nullptr; @@ -42,7 +42,7 @@ TEST_F(clGetMemObjectInfoTests, givenValidBufferWhenGettingMemObjectInfoThenCorr EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clGetMemObjectInfoTests, givenBufferWithMappedRegionWhenGettingMemObjectInfoThenCorrectMapCountIsReturned) { +TEST_F(ClGetMemObjectInfoTests, givenBufferWithMappedRegionWhenGettingMemObjectInfoThenCorrectMapCountIsReturned) { size_t bufferSize = 16; cl_mem buffer = nullptr; @@ -81,7 +81,7 @@ TEST_F(clGetMemObjectInfoTests, givenBufferWithMappedRegionWhenGettingMemObjectI clReleaseCommandQueue(cmdQ); } -TEST_F(clGetMemObjectInfoTests, givenBufferCreatedFromSvmPointerWhenGettingMemObjectInfoThenClTrueIsReturned) { +TEST_F(ClGetMemObjectInfoTests, givenBufferCreatedFromSvmPointerWhenGettingMemObjectInfoThenClTrueIsReturned) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { size_t bufferSize = 64; diff --git a/opencl/test/unit_test/api/cl_get_pipe_info_tests.inl b/opencl/test/unit_test/api/cl_get_pipe_info_tests.inl index 10b544e53b..1c9de46aac 100644 --- a/opencl/test/unit_test/api/cl_get_pipe_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_pipe_info_tests.inl @@ -13,7 +13,7 @@ using namespace NEO; -struct ClGetPipeInfoTests : api_tests { +struct ClGetPipeInfoTests : ApiTests { VariableBackup supportsPipesBackup{&defaultHwInfo->capabilityTable.supportsPipes, true}; }; diff --git a/opencl/test/unit_test/api/cl_get_platform_ids_tests.inl b/opencl/test/unit_test/api/cl_get_platform_ids_tests.inl index b0e9f61863..f6b9ba0e70 100644 --- a/opencl/test/unit_test/api/cl_get_platform_ids_tests.inl +++ b/opencl/test/unit_test/api/cl_get_platform_ids_tests.inl @@ -19,10 +19,10 @@ using namespace NEO; -typedef api_tests clGetPlatformIDsTests; +using ClGetPlatformIDsTests = ApiTests; namespace ULT { -TEST_F(clGetPlatformIDsTests, GivenNullPlatformWhenGettingPlatformIdsThenNumberofPlatformsIsReturned) { +TEST_F(ClGetPlatformIDsTests, GivenNullPlatformWhenGettingPlatformIdsThenNumberofPlatformsIsReturned) { cl_int retVal = CL_SUCCESS; cl_uint numPlatforms = 0; @@ -32,7 +32,7 @@ TEST_F(clGetPlatformIDsTests, GivenNullPlatformWhenGettingPlatformIdsThenNumbero EXPECT_GT(numPlatforms, 0u); } -TEST_F(clGetPlatformIDsTests, GivenPlatformsWhenGettingPlatformIdsThenPlatformsIdIsReturned) { +TEST_F(ClGetPlatformIDsTests, GivenPlatformsWhenGettingPlatformIdsThenPlatformsIdIsReturned) { cl_int retVal = CL_SUCCESS; cl_platform_id platform = nullptr; @@ -42,7 +42,7 @@ TEST_F(clGetPlatformIDsTests, GivenPlatformsWhenGettingPlatformIdsThenPlatformsI EXPECT_NE(nullptr, platform); } -TEST_F(clGetPlatformIDsTests, GivenNumEntriesZeroAndPlatformNotNullWhenGettingPlatformIdsThenClInvalidValueErrorIsReturned) { +TEST_F(ClGetPlatformIDsTests, GivenNumEntriesZeroAndPlatformNotNullWhenGettingPlatformIdsThenClInvalidValueErrorIsReturned) { cl_int retVal = CL_SUCCESS; cl_platform_id platform = nullptr; diff --git a/opencl/test/unit_test/api/cl_get_program_build_info_tests.inl b/opencl/test/unit_test/api/cl_get_program_build_info_tests.inl index 67ad7ec86f..e1ab606bb0 100644 --- a/opencl/test/unit_test/api/cl_get_program_build_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_program_build_info_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,12 +18,12 @@ #include "cl_api_tests.h" using namespace NEO; -typedef api_tests clGetProgramBuildInfoTests; +using ClGetProgramBuildInfoTests = ApiTests; namespace ULT { void verifyDevices(cl_program pProgram, size_t expectedNumDevices, cl_device_id *expectedDevices); -TEST_F(clGetProgramBuildInfoTests, givenSourceWhenclGetProgramBuildInfoIsCalledThenReturnClBuildNone) { +TEST_F(ClGetProgramBuildInfoTests, givenSourceWhenclGetProgramBuildInfoIsCalledThenReturnClBuildNone) { cl_program pProgram = nullptr; std::unique_ptr pSource = nullptr; size_t sourceSize = 0; @@ -236,7 +236,7 @@ TEST(clGetProgramBuildInfoTest, givenMultiDeviceProgramWhenCompilingWithoutInput EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clGetProgramBuildInfoTests, givenElfBinaryWhenclGetProgramBuildInfoIsCalledThenReturnClBuildNone) { +TEST_F(ClGetProgramBuildInfoTests, givenElfBinaryWhenclGetProgramBuildInfoIsCalledThenReturnClBuildNone) { cl_program pProgram = nullptr; cl_int binaryStatus = CL_INVALID_VALUE; @@ -271,7 +271,7 @@ TEST_F(clGetProgramBuildInfoTests, givenElfBinaryWhenclGetProgramBuildInfoIsCall EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clGetProgramBuildInfoTests, givenInvalidDeviceInputWhenGetProgramBuildInfoIsCalledThenInvalidDeviceErrorIsReturned) { +TEST_F(ClGetProgramBuildInfoTests, givenInvalidDeviceInputWhenGetProgramBuildInfoIsCalledThenInvalidDeviceErrorIsReturned) { cl_build_status buildStatus; retVal = clGetProgramBuildInfo(pProgram, nullptr, CL_PROGRAM_BUILD_STATUS, sizeof(buildStatus), &buildStatus, nullptr); EXPECT_EQ(CL_INVALID_DEVICE, retVal); diff --git a/opencl/test/unit_test/api/cl_get_program_info_tests.inl b/opencl/test/unit_test/api/cl_get_program_info_tests.inl index 6e92d5a6d5..bd07404e40 100644 --- a/opencl/test/unit_test/api/cl_get_program_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_program_info_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,7 +18,7 @@ using namespace NEO; -typedef api_tests clGetProgramInfoTests; +using ClGetProgramInfoTests = ApiTests; namespace ULT { @@ -42,7 +42,7 @@ void verifyDevices(cl_program pProgram, size_t expectedNumDevices, cl_device_id } } -TEST_F(clGetProgramInfoTests, GivenSourceWhenBuildingProgramThenGetProgramInfoReturnsCorrectInfo) { +TEST_F(ClGetProgramInfoTests, GivenSourceWhenBuildingProgramThenGetProgramInfoReturnsCorrectInfo) { cl_program pProgram = nullptr; std::unique_ptr pSource = nullptr; size_t sourceSize = 0; @@ -151,7 +151,7 @@ TEST(clGetProgramInfoTest, GivenMultiDeviceProgramCreatedWithSourceWhenGettingDe EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clGetProgramInfoTests, GivenIlWhenBuildingProgramThenGetProgramInfoReturnsCorrectInfo) { +TEST_F(ClGetProgramInfoTests, GivenIlWhenBuildingProgramThenGetProgramInfoReturnsCorrectInfo) { const size_t binarySize = 16; const uint32_t spirv[binarySize] = {0x03022307}; @@ -313,7 +313,7 @@ TEST(clGetProgramInfoTest, GivenMultiDeviceProgramCreatedWithBinaryWhenGettingBi EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clGetProgramInfoTests, GivenSPIRVProgramWhenGettingProgramSourceThenReturnNullString) { +TEST_F(ClGetProgramInfoTests, GivenSPIRVProgramWhenGettingProgramSourceThenReturnNullString) { const size_t binarySize = 16; const uint32_t spirv[binarySize] = {0x03022307}; diff --git a/opencl/test/unit_test/api/cl_get_supported_image_formats_tests.inl b/opencl/test/unit_test/api/cl_get_supported_image_formats_tests.inl index 2294201e74..a95f5160d0 100644 --- a/opencl/test/unit_test/api/cl_get_supported_image_formats_tests.inl +++ b/opencl/test/unit_test/api/cl_get_supported_image_formats_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,9 +17,9 @@ using namespace NEO; -typedef api_tests clGetSupportedImageFormatsTests; +using ClGetSupportedImageFormatsTests = ApiTests; -TEST_F(clGetSupportedImageFormatsTests, GivenValidParamsWhenGettingSupportImageFormatsThenNumImageFormatsIsGreaterThanZero) { +TEST_F(ClGetSupportedImageFormatsTests, GivenValidParamsWhenGettingSupportImageFormatsThenNumImageFormatsIsGreaterThanZero) { if (!pContext->getDevice(0)->getSharedDeviceInfo().imageSupport) { GTEST_SKIP(); } @@ -36,7 +36,7 @@ TEST_F(clGetSupportedImageFormatsTests, GivenValidParamsWhenGettingSupportImageF EXPECT_GT(numImageFormats, 0u); } -TEST_F(clGetSupportedImageFormatsTests, givenInvalidContextWhenGettingSupportImageFormatsThenClInvalidContextErrorIsReturned) { +TEST_F(ClGetSupportedImageFormatsTests, givenInvalidContextWhenGettingSupportImageFormatsThenClInvalidContextErrorIsReturned) { auto device = pContext->getDevice(0u); auto dummyContext = reinterpret_cast(device); diff --git a/opencl/test/unit_test/api/cl_intel_accelerator_tests.inl b/opencl/test/unit_test/api/cl_intel_accelerator_tests.inl index f583b5e875..55aa2b683d 100644 --- a/opencl/test/unit_test/api/cl_intel_accelerator_tests.inl +++ b/opencl/test/unit_test/api/cl_intel_accelerator_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,16 +14,16 @@ using namespace NEO; namespace ULT { -struct IntelAcceleratorTest : public api_tests { +struct IntelAcceleratorTest : public ApiTests { public: IntelAcceleratorTest() {} void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); } void TearDown() override { - api_tests::TearDown(); + ApiTests::TearDown(); } protected: diff --git a/opencl/test/unit_test/api/cl_intel_motion_estimation.cpp b/opencl/test/unit_test/api/cl_intel_motion_estimation.cpp index b2b91f403b..bc804dce1c 100644 --- a/opencl/test/unit_test/api/cl_intel_motion_estimation.cpp +++ b/opencl/test/unit_test/api/cl_intel_motion_estimation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,12 +14,12 @@ using namespace NEO; namespace ULT { -struct IntelMotionEstimationTest : public api_tests { +struct IntelMotionEstimationTest : public ApiTests { public: IntelMotionEstimationTest() {} void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); desc.mb_block_type = CL_ME_MB_TYPE_16x16_INTEL; desc.subpixel_mode = CL_ME_SUBPIXEL_MODE_QPEL_INTEL; @@ -28,7 +28,7 @@ struct IntelMotionEstimationTest : public api_tests { } void TearDown() override { - api_tests::TearDown(); + ApiTests::TearDown(); } protected: diff --git a/opencl/test/unit_test/api/cl_intel_tracing_tests.inl b/opencl/test/unit_test/api/cl_intel_tracing_tests.inl index 1b3619a511..b9559a5f06 100644 --- a/opencl/test/unit_test/api/cl_intel_tracing_tests.inl +++ b/opencl/test/unit_test/api/cl_intel_tracing_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,16 +13,16 @@ using namespace NEO; namespace ULT { -struct IntelTracingTest : public api_tests { +struct IntelTracingTest : public ApiTests { public: IntelTracingTest() {} void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); } void TearDown() override { - api_tests::TearDown(); + ApiTests::TearDown(); } protected: diff --git a/opencl/test/unit_test/api/cl_link_program_tests.inl b/opencl/test/unit_test/api/cl_link_program_tests.inl index f823fcd10e..6ec5741c98 100644 --- a/opencl/test/unit_test/api/cl_link_program_tests.inl +++ b/opencl/test/unit_test/api/cl_link_program_tests.inl @@ -19,9 +19,9 @@ using namespace NEO; namespace ULT { -typedef api_tests clLinkProgramTests; +using ClLinkProgramTests = ApiTests; -TEST_F(clLinkProgramTests, GivenValidParamsWhenLinkingProgramThenSuccessIsReturned) { +TEST_F(ClLinkProgramTests, GivenValidParamsWhenLinkingProgramThenSuccessIsReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; @@ -81,7 +81,7 @@ TEST_F(clLinkProgramTests, GivenValidParamsWhenLinkingProgramThenSuccessIsReturn EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clLinkProgramTests, GivenCreateLibraryOptionWhenLinkingProgramThenSuccessIsReturned) { +TEST_F(ClLinkProgramTests, GivenCreateLibraryOptionWhenLinkingProgramThenSuccessIsReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; @@ -141,7 +141,7 @@ TEST_F(clLinkProgramTests, GivenCreateLibraryOptionWhenLinkingProgramThenSuccess EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clLinkProgramTests, GivenNullContextWhenLinkingProgramThenClInvalidContextErrorIsReturned) { +TEST_F(ClLinkProgramTests, GivenNullContextWhenLinkingProgramThenClInvalidContextErrorIsReturned) { cl_program program = {0}; cl_program oprog; oprog = clLinkProgram( @@ -165,7 +165,7 @@ std::vector asVec(const uint8_t *src, size_t size) { return std::vector(beg, end); } -TEST_F(clLinkProgramTests, GivenProgramsWithSpecConstantsThenSpecConstantsAreEmbeddedIntoElf) { +TEST_F(ClLinkProgramTests, GivenProgramsWithSpecConstantsThenSpecConstantsAreEmbeddedIntoElf) { uint8_t ir1[] = {15, 17, 19, 23}; uint8_t ir2[] = {29, 31, 37, 41}; uint8_t ir3[] = {43, 47, 53, 59}; @@ -248,7 +248,7 @@ TEST_F(clLinkProgramTests, GivenProgramsWithSpecConstantsThenSpecConstantsAreEmb EXPECT_EQ(0, memcmp(ir3, elf.sectionHeaders[7].data.begin(), sizeof(ir3))); } -TEST_F(clLinkProgramTests, GivenInvalidCallbackInputWhenLinkProgramThenInvalidValueErrorIsReturned) { +TEST_F(ClLinkProgramTests, GivenInvalidCallbackInputWhenLinkProgramThenInvalidValueErrorIsReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; @@ -306,7 +306,7 @@ TEST_F(clLinkProgramTests, GivenInvalidCallbackInputWhenLinkProgramThenInvalidVa EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clLinkProgramTests, GivenValidCallbackInputWhenLinkProgramThenCallbackIsInvoked) { +TEST_F(ClLinkProgramTests, GivenValidCallbackInputWhenLinkProgramThenCallbackIsInvoked) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; @@ -369,7 +369,7 @@ TEST_F(clLinkProgramTests, GivenValidCallbackInputWhenLinkProgramThenCallbackIsI EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clLinkProgramTests, givenMultiDeviceProgramWhenLinkingForInvalidDevicesInputThenInvalidDeviceErrorIsReturned) { +TEST_F(ClLinkProgramTests, givenMultiDeviceProgramWhenLinkingForInvalidDevicesInputThenInvalidDeviceErrorIsReturned) { cl_program pProgram = nullptr; size_t sourceSize = 0; std::string testFile; diff --git a/opencl/test/unit_test/api/cl_release_command_queue_tests.inl b/opencl/test/unit_test/api/cl_release_command_queue_tests.inl index eaaa344bc7..19d2742f97 100644 --- a/opencl/test/unit_test/api/cl_release_command_queue_tests.inl +++ b/opencl/test/unit_test/api/cl_release_command_queue_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -23,9 +23,9 @@ TEST(clReleaseCommandQueueTest, GivenNullCmdQueueWhenReleasingCmdQueueThenClInva EXPECT_EQ(CL_INVALID_COMMAND_QUEUE, retVal); } -typedef api_tests clReleaseCommandQueueTests; +using ClReleaseCommandQueueTests = ApiTests; -TEST_F(clReleaseCommandQueueTests, givenBlockedEnqueueWithOutputEventStoredAsVirtualEventWhenReleasingCmdQueueThenInternalRefCountIsDecrementedAndQueueDeleted) { +TEST_F(ClReleaseCommandQueueTests, givenBlockedEnqueueWithOutputEventStoredAsVirtualEventWhenReleasingCmdQueueThenInternalRefCountIsDecrementedAndQueueDeleted) { cl_command_queue cmdQ = nullptr; cl_queue_properties properties = 0; ClDevice *device = (ClDevice *)testedClDevice; diff --git a/opencl/test/unit_test/api/cl_release_context_tests.inl b/opencl/test/unit_test/api/cl_release_context_tests.inl index 82212d20ca..a6ee711948 100644 --- a/opencl/test/unit_test/api/cl_release_context_tests.inl +++ b/opencl/test/unit_test/api/cl_release_context_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clReleaseContextTests; +using ClReleaseContextTests = ApiTests; namespace ULT { -TEST_F(clReleaseContextTests, GivenValidContextWhenReleasingContextThenSuccessIsReturned) { +TEST_F(ClReleaseContextTests, GivenValidContextWhenReleasingContextThenSuccessIsReturned) { auto context = clCreateContext( nullptr, 1u, @@ -29,7 +29,7 @@ TEST_F(clReleaseContextTests, GivenValidContextWhenReleasingContextThenSuccessIs EXPECT_EQ(CL_SUCCESS, retVal); } -TEST_F(clReleaseContextTests, GivenNullContextWhenReleasingContextThenClInvalidContextIsReturned) { +TEST_F(ClReleaseContextTests, GivenNullContextWhenReleasingContextThenClInvalidContextIsReturned) { auto retVal = clReleaseContext(nullptr); EXPECT_EQ(CL_INVALID_CONTEXT, retVal); } diff --git a/opencl/test/unit_test/api/cl_release_kernel_tests.inl b/opencl/test/unit_test/api/cl_release_kernel_tests.inl index ecc28d1c73..ac73cc4cde 100644 --- a/opencl/test/unit_test/api/cl_release_kernel_tests.inl +++ b/opencl/test/unit_test/api/cl_release_kernel_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -14,16 +14,16 @@ using namespace NEO; -typedef api_tests clReleaseKernelTests; +using ClReleaseKernelTests = ApiTests; namespace ULT { -TEST_F(clReleaseKernelTests, GivenNullKernelWhenReleasingKernelThenClInvalidKernelErrorIsReturned) { +TEST_F(ClReleaseKernelTests, GivenNullKernelWhenReleasingKernelThenClInvalidKernelErrorIsReturned) { retVal = clReleaseKernel(nullptr); EXPECT_EQ(CL_INVALID_KERNEL, retVal); } -TEST_F(clReleaseKernelTests, GivenRetainedKernelWhenReleasingKernelThenKernelIsCorrectlyReleased) { +TEST_F(ClReleaseKernelTests, GivenRetainedKernelWhenReleasingKernelThenKernelIsCorrectlyReleased) { cl_kernel kernel = nullptr; cl_program program = nullptr; cl_int binaryStatus = CL_SUCCESS; diff --git a/opencl/test/unit_test/api/cl_release_mem_obj_tests.inl b/opencl/test/unit_test/api/cl_release_mem_obj_tests.inl index 36c5f365c5..38dd9f0fa2 100644 --- a/opencl/test/unit_test/api/cl_release_mem_obj_tests.inl +++ b/opencl/test/unit_test/api/cl_release_mem_obj_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,11 +11,11 @@ using namespace NEO; -typedef api_tests clReleaseMemObjectTests; +using ClReleaseMemObjectTests = ApiTests; namespace ULT { -TEST_F(clReleaseMemObjectTests, GivenValidBufferWhenReleasingMemObjectThenSuccessIsReturned) { +TEST_F(ClReleaseMemObjectTests, GivenValidBufferWhenReleasingMemObjectThenSuccessIsReturned) { cl_mem_flags flags = CL_MEM_USE_HOST_PTR; static const unsigned int bufferSize = 16; cl_mem buffer = nullptr; diff --git a/opencl/test/unit_test/api/cl_release_program_tests.inl b/opencl/test/unit_test/api/cl_release_program_tests.inl index f1d7856a53..40a5bdf33b 100644 --- a/opencl/test/unit_test/api/cl_release_program_tests.inl +++ b/opencl/test/unit_test/api/cl_release_program_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,16 +11,16 @@ using namespace NEO; -typedef api_tests clReleaseProgramTests; +using ClReleaseProgramTests = ApiTests; -TEST_F(clReleaseProgramTests, GivenNullProgramWhenReleasingProgramThenClInvalidProgramIsReturned) { +TEST_F(ClReleaseProgramTests, GivenNullProgramWhenReleasingProgramThenClInvalidProgramIsReturned) { auto retVal = clReleaseProgram(nullptr); EXPECT_EQ(CL_INVALID_PROGRAM, retVal); } static const char fakeSrc[] = "__kernel void func(void) { }"; -TEST_F(clReleaseProgramTests, GivenRetainedProgramWhenReleasingProgramThenProgramIsReleasedAndProgramReferenceCountDecrementedCorrectly) { +TEST_F(ClReleaseProgramTests, GivenRetainedProgramWhenReleasingProgramThenProgramIsReleasedAndProgramReferenceCountDecrementedCorrectly) { size_t srcLen = sizeof(fakeSrc); const char *src = fakeSrc; cl_int retVal; diff --git a/opencl/test/unit_test/api/cl_retain_mem_obj_tests.inl b/opencl/test/unit_test/api/cl_retain_mem_obj_tests.inl index be1c31fa0a..c1fdc82593 100644 --- a/opencl/test/unit_test/api/cl_retain_mem_obj_tests.inl +++ b/opencl/test/unit_test/api/cl_retain_mem_obj_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,10 +11,10 @@ using namespace NEO; -typedef api_tests clRetainMemObjectTests; +using ClRetainMemObjectTests = ApiTests; namespace ULT { -TEST_F(clRetainMemObjectTests, GivenValidParamsWhenRetainingMemObjectThenRefCountIsIncremented) { +TEST_F(ClRetainMemObjectTests, GivenValidParamsWhenRetainingMemObjectThenRefCountIsIncremented) { cl_mem_flags flags = CL_MEM_USE_HOST_PTR; static const unsigned int bufferSize = 16; cl_mem buffer = nullptr; diff --git a/opencl/test/unit_test/api/cl_retain_release_context_tests.inl b/opencl/test/unit_test/api/cl_retain_release_context_tests.inl index 8a1850fb2c..892c190de4 100644 --- a/opencl/test/unit_test/api/cl_retain_release_context_tests.inl +++ b/opencl/test/unit_test/api/cl_retain_release_context_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,11 +11,11 @@ using namespace NEO; -typedef api_tests clRetainReleaseContextTests; +using ClRetainReleaseContextTests = ApiTests; namespace ULT { -TEST_F(clRetainReleaseContextTests, GivenValidContextWhenRetainingAndReleasingThenContextReferenceCountIsUpdatedCorrectly) { +TEST_F(ClRetainReleaseContextTests, GivenValidContextWhenRetainingAndReleasingThenContextReferenceCountIsUpdatedCorrectly) { cl_context context = clCreateContext(nullptr, 1, &testedClDevice, nullptr, nullptr, &retVal); EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_NE(nullptr, context); diff --git a/opencl/test/unit_test/api/cl_retain_release_sampler_tests.inl b/opencl/test/unit_test/api/cl_retain_release_sampler_tests.inl index a6c5a38d15..4c63fbd860 100644 --- a/opencl/test/unit_test/api/cl_retain_release_sampler_tests.inl +++ b/opencl/test/unit_test/api/cl_retain_release_sampler_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,10 +11,10 @@ using namespace NEO; -typedef api_tests clRetainReleaseSamplerTests; +using ClRetainReleaseSamplerTests = ApiTests; namespace ULT { -TEST_F(clRetainReleaseSamplerTests, GivenValidSamplerWhenRetainingThenSamplerReferenceCountIsIncremented) { +TEST_F(ClRetainReleaseSamplerTests, GivenValidSamplerWhenRetainingThenSamplerReferenceCountIsIncremented) { cl_int retVal = CL_SUCCESS; auto sampler = clCreateSampler(pContext, CL_TRUE, CL_ADDRESS_CLAMP, CL_FILTER_NEAREST, &retVal); diff --git a/opencl/test/unit_test/api/cl_set_context_destructor_callback.inl b/opencl/test/unit_test/api/cl_set_context_destructor_callback.inl index 096b2bece2..a1b151ddcb 100644 --- a/opencl/test/unit_test/api/cl_set_context_destructor_callback.inl +++ b/opencl/test/unit_test/api/cl_set_context_destructor_callback.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,7 +16,7 @@ TEST(clSetContextDestructorCallbackTest, givenNullptrContextWhenSettingContextDe EXPECT_EQ(CL_INVALID_CONTEXT, retVal); } -using clSetContextDestructorCallbackTests = api_tests; +using clSetContextDestructorCallbackTests = ApiTests; TEST_F(clSetContextDestructorCallbackTests, givenPfnNotifyNullptrWhenSettingContextDestructorCallbackThenInvalidValueErrorIsReturned) { auto retVal = clSetContextDestructorCallback(pContext, nullptr, nullptr); diff --git a/opencl/test/unit_test/api/cl_set_mem_object_destructor_callback_tests.inl b/opencl/test/unit_test/api/cl_set_mem_object_destructor_callback_tests.inl index 33fa19d75c..4efacbf618 100644 --- a/opencl/test/unit_test/api/cl_set_mem_object_destructor_callback_tests.inl +++ b/opencl/test/unit_test/api/cl_set_mem_object_destructor_callback_tests.inl @@ -12,7 +12,7 @@ using namespace NEO; -typedef api_tests ClCreateBufferTests; +using ClCreateBufferTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/cl_set_program_release_callback.inl b/opencl/test/unit_test/api/cl_set_program_release_callback.inl index 89f9e3d82a..cb0ee2647d 100644 --- a/opencl/test/unit_test/api/cl_set_program_release_callback.inl +++ b/opencl/test/unit_test/api/cl_set_program_release_callback.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,7 +16,7 @@ TEST(clSetProgramReleaseCallbackTest, givenNullptrProgramWhenSettingProgramRelea EXPECT_EQ(CL_INVALID_PROGRAM, retVal); } -using clSetProgramReleaseCallbackTests = api_tests; +using clSetProgramReleaseCallbackTests = ApiTests; TEST_F(clSetProgramReleaseCallbackTests, givenPfnNotifyNullptrWhenSettingProgramReleaseCallbackThenInvalidValueErrorIsReturned) { auto retVal = clSetProgramReleaseCallback(pProgram, nullptr, nullptr); diff --git a/opencl/test/unit_test/api/cl_set_program_specialization_constant_tests.inl b/opencl/test/unit_test/api/cl_set_program_specialization_constant_tests.inl index 52db1fddf7..71f814fd05 100644 --- a/opencl/test/unit_test/api/cl_set_program_specialization_constant_tests.inl +++ b/opencl/test/unit_test/api/cl_set_program_specialization_constant_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,7 +16,7 @@ TEST(clSetProgramSpecializationConstantTest, givenNullptrProgramWhenSetProgramSp EXPECT_EQ(CL_INVALID_PROGRAM, retVal); } -using clSetProgramSpecializationConstantTests = api_tests; +using clSetProgramSpecializationConstantTests = ApiTests; TEST_F(clSetProgramSpecializationConstantTests, givenNonSpirVProgramWhenSetProgramSpecializationConstantThenErrorIsReturned) { pProgram->isSpirV = false; diff --git a/opencl/test/unit_test/api/cl_svm_alloc_tests.inl b/opencl/test/unit_test/api/cl_svm_alloc_tests.inl index 5c05621e09..40693a50a7 100644 --- a/opencl/test/unit_test/api/cl_svm_alloc_tests.inl +++ b/opencl/test/unit_test/api/cl_svm_alloc_tests.inl @@ -17,7 +17,7 @@ using namespace NEO; -typedef api_tests clSVMAllocTests; +using ClSVMAllocTests = ApiTests; namespace ULT { @@ -172,19 +172,19 @@ INSTANTIATE_TEST_CASE_P( ClSVMAllocInvalidFlagsTests, testing::ValuesIn(SVMAllocInvalidFlags)); -TEST_F(clSVMAllocTests, GivenNullContextWhenAllocatingSvmThenSvmIsNotAllocated) { +TEST_F(ClSVMAllocTests, GivenNullContextWhenAllocatingSvmThenSvmIsNotAllocated) { cl_mem_flags flags = CL_MEM_READ_WRITE; auto svmPtr = clSVMAlloc(nullptr /* cl_context */, flags, 4096 /* Size*/, 128 /* alignment */); EXPECT_EQ(nullptr, svmPtr); } -TEST_F(clSVMAllocTests, GivenZeroSizeWhenAllocatingSvmThenSvmIsNotAllocated) { +TEST_F(ClSVMAllocTests, GivenZeroSizeWhenAllocatingSvmThenSvmIsNotAllocated) { cl_mem_flags flags = CL_MEM_READ_WRITE; auto svmPtr = clSVMAlloc(pContext /* cl_context */, flags, 0 /* Size*/, 128 /* alignment */); EXPECT_EQ(nullptr, svmPtr); } -TEST_F(clSVMAllocTests, GivenZeroAlignmentWhenAllocatingSvmThenSvmIsAllocated) { +TEST_F(ClSVMAllocTests, GivenZeroAlignmentWhenAllocatingSvmThenSvmIsAllocated) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { cl_mem_flags flags = CL_MEM_READ_WRITE; @@ -194,7 +194,7 @@ TEST_F(clSVMAllocTests, GivenZeroAlignmentWhenAllocatingSvmThenSvmIsAllocated) { } } -TEST_F(clSVMAllocTests, givenUnrestrictedFlagWhenCreatingSvmAllocThenAllowSizeBiggerThanMaxMemAllocSize) { +TEST_F(ClSVMAllocTests, givenUnrestrictedFlagWhenCreatingSvmAllocThenAllowSizeBiggerThanMaxMemAllocSize) { REQUIRE_SVM_OR_SKIP(pDevice); const size_t maxMemAllocSize = 128; @@ -239,7 +239,7 @@ TEST_F(clSVMAllocTests, givenUnrestrictedFlagWhenCreatingSvmAllocThenAllowSizeBi } } -TEST_F(clSVMAllocTests, GivenUnalignedSizeAndDefaultAlignmentWhenAllocatingSvmThenSvmIsAllocated) { +TEST_F(ClSVMAllocTests, GivenUnalignedSizeAndDefaultAlignmentWhenAllocatingSvmThenSvmIsAllocated) { const ClDeviceInfo &devInfo = pDevice->getDeviceInfo(); if (devInfo.svmCapabilities != 0) { cl_mem_flags flags = CL_MEM_READ_WRITE; @@ -249,18 +249,18 @@ TEST_F(clSVMAllocTests, GivenUnalignedSizeAndDefaultAlignmentWhenAllocatingSvmTh } } -TEST_F(clSVMAllocTests, GivenAlignmentNotPowerOfTwoWhenAllocatingSvmThenSvmIsNotAllocated) { +TEST_F(ClSVMAllocTests, GivenAlignmentNotPowerOfTwoWhenAllocatingSvmThenSvmIsNotAllocated) { cl_mem_flags flags = CL_MEM_READ_WRITE; auto svmPtr = clSVMAlloc(pContext /* cl_context */, flags, 4096 /* Size*/, 129 /* alignment */); EXPECT_EQ(nullptr, svmPtr); } -TEST_F(clSVMAllocTests, GivenAlignmentTooLargeWhenAllocatingSvmThenSvmIsNotAllocated) { +TEST_F(ClSVMAllocTests, GivenAlignmentTooLargeWhenAllocatingSvmThenSvmIsNotAllocated) { auto svmPtr = clSVMAlloc(pContext, CL_MEM_READ_WRITE, 4096 /* Size */, 4096 /* alignment */); EXPECT_EQ(nullptr, svmPtr); }; -TEST_F(clSVMAllocTests, GivenForcedFineGrainedSvmWhenCreatingSvmAllocThenAllocationIsCreated) { +TEST_F(ClSVMAllocTests, GivenForcedFineGrainedSvmWhenCreatingSvmAllocThenAllocationIsCreated) { REQUIRE_SVM_OR_SKIP(pDevice); DebugManagerStateRestore restore{}; HardwareInfo *hwInfo = pDevice->getExecutionEnvironment()->rootDeviceEnvironments[testedRootDeviceIndex]->getMutableHardwareInfo(); diff --git a/opencl/test/unit_test/api/cl_svm_free_tests.inl b/opencl/test/unit_test/api/cl_svm_free_tests.inl index 7cd4864fff..0292553215 100644 --- a/opencl/test/unit_test/api/cl_svm_free_tests.inl +++ b/opencl/test/unit_test/api/cl_svm_free_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,18 +9,18 @@ using namespace NEO; -typedef api_tests clSVMFreeTests; +using ClSVMFreeTests = ApiTests; namespace ULT { -TEST_F(clSVMFreeTests, GivenNullPtrWhenFreeingSvmThenNoAction) { +TEST_F(ClSVMFreeTests, GivenNullPtrWhenFreeingSvmThenNoAction) { clSVMFree( nullptr, // cl_context context nullptr // void *svm_pointer ); } -TEST_F(clSVMFreeTests, GivenContextWithDeviceNotSupportingSvmWhenFreeingSvmThenNoAction) { +TEST_F(ClSVMFreeTests, GivenContextWithDeviceNotSupportingSvmWhenFreeingSvmThenNoAction) { HardwareInfo hwInfo = *defaultHwInfo; hwInfo.capabilityTable.ftrSvm = false; auto clDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(&hwInfo)); diff --git a/opencl/test/unit_test/api/cl_unload_platform_compiler_tests.inl b/opencl/test/unit_test/api/cl_unload_platform_compiler_tests.inl index af875aa6e7..2724987aef 100644 --- a/opencl/test/unit_test/api/cl_unload_platform_compiler_tests.inl +++ b/opencl/test/unit_test/api/cl_unload_platform_compiler_tests.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,7 +9,7 @@ using namespace NEO; -using clUnloadPlatformCompilerTests = api_tests; +using clUnloadPlatformCompilerTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/api/gl/cl_create_from_gl_buffer_tests.cpp b/opencl/test/unit_test/api/gl/cl_create_from_gl_buffer_tests.cpp index 8629308efa..f596478c90 100644 --- a/opencl/test/unit_test/api/gl/cl_create_from_gl_buffer_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_create_from_gl_buffer_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clCreateFromGLBuffer_; +using ClCreateFromGLBuffer_ = ApiTests; namespace ULT { -TEST_F(clCreateFromGLBuffer_, givenNullConxtextWhenCreateFromGLIsCalledThenErrorIsReturned) { +TEST_F(ClCreateFromGLBuffer_, givenNullConxtextWhenCreateFromGLIsCalledThenErrorIsReturned) { int errCode = CL_SUCCESS; auto retVal = clCreateFromGLBuffer(nullptr, // cl_context context CL_MEM_READ_WRITE, // cl_mem_flags flags diff --git a/opencl/test/unit_test/api/gl/cl_create_from_gl_renderbuffer_tests.cpp b/opencl/test/unit_test/api/gl/cl_create_from_gl_renderbuffer_tests.cpp index 57db1e6b49..446f39d744 100644 --- a/opencl/test/unit_test/api/gl/cl_create_from_gl_renderbuffer_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_create_from_gl_renderbuffer_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clCreateFromGLRenderbuffer_; +using ClCreateFromGLRenderbuffer_ = ApiTests; namespace ULT { -TEST_F(clCreateFromGLRenderbuffer_, givenNullContextWhenCreateIsCalledThenErrorIsReturned) { +TEST_F(ClCreateFromGLRenderbuffer_, givenNullContextWhenCreateIsCalledThenErrorIsReturned) { int errCode = CL_SUCCESS; auto retVal = clCreateFromGLRenderbuffer(nullptr, // cl_context context CL_MEM_READ_WRITE, // cl_mem_flags flags diff --git a/opencl/test/unit_test/api/gl/cl_create_from_gl_texture2d_tests.cpp b/opencl/test/unit_test/api/gl/cl_create_from_gl_texture2d_tests.cpp index 08c077c9db..9e78ad26bf 100644 --- a/opencl/test/unit_test/api/gl/cl_create_from_gl_texture2d_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_create_from_gl_texture2d_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clCreateFromGLTexture2D_; +using ClCreateFromGLTexture2D_ = ApiTests; namespace ULT { -TEST_F(clCreateFromGLTexture2D_, givenNullConxtextWhenClCreateFromGlTexture2DIsCalledThenInvalidContextIsReturned) { +TEST_F(ClCreateFromGLTexture2D_, givenNullConxtextWhenClCreateFromGlTexture2DIsCalledThenInvalidContextIsReturned) { int errCode = CL_SUCCESS; auto retVal = clCreateFromGLTexture2D(nullptr, // cl_context context CL_MEM_READ_WRITE, // cl_mem_flags flags diff --git a/opencl/test/unit_test/api/gl/cl_create_from_gl_texture3d_tests.cpp b/opencl/test/unit_test/api/gl/cl_create_from_gl_texture3d_tests.cpp index b529cae986..a6c28befa3 100644 --- a/opencl/test/unit_test/api/gl/cl_create_from_gl_texture3d_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_create_from_gl_texture3d_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clCreateFromGLTexture3D_; +using ClCreateFromGLTexture3D_ = ApiTests; namespace ULT { -TEST_F(clCreateFromGLTexture3D_, givenNullConxtextWhenClCreateFromGlTexture2DIsCalledThenInvalidContextIsReturned) { +TEST_F(ClCreateFromGLTexture3D_, givenNullConxtextWhenClCreateFromGlTexture2DIsCalledThenInvalidContextIsReturned) { int errCode = CL_SUCCESS; auto retVal = clCreateFromGLTexture3D(nullptr, // cl_context context CL_MEM_READ_WRITE, // cl_mem_flags flags diff --git a/opencl/test/unit_test/api/gl/cl_create_from_gl_texture_tests.cpp b/opencl/test/unit_test/api/gl/cl_create_from_gl_texture_tests.cpp index e496971e95..2de6f4d94d 100644 --- a/opencl/test/unit_test/api/gl/cl_create_from_gl_texture_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_create_from_gl_texture_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,10 +11,10 @@ using namespace NEO; -typedef api_tests clCreateFromGLTexture_; +using ClCreateFromGLTexture_ = ApiTests; namespace ULT { -TEST_F(clCreateFromGLTexture_, givenNullContextWhenCreateIsCalledThenErrorIsReturned) { +TEST_F(ClCreateFromGLTexture_, givenNullContextWhenCreateIsCalledThenErrorIsReturned) { int errCode = CL_SUCCESS; auto image = clCreateFromGLTexture(nullptr, CL_MEM_READ_WRITE, GL_TEXTURE_1D, 0, 0, &errCode); EXPECT_EQ(nullptr, image); diff --git a/opencl/test/unit_test/api/gl/cl_enqueue_acquire_gl_objects_tests.cpp b/opencl/test/unit_test/api/gl/cl_enqueue_acquire_gl_objects_tests.cpp index c524a63f3d..0397f9702d 100644 --- a/opencl/test/unit_test/api/gl/cl_enqueue_acquire_gl_objects_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_enqueue_acquire_gl_objects_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clEnqueueAcquireGLObjects_; +using ClEnqueueAcquireGLObjects_ = ApiTests; namespace ULT { -TEST_F(clEnqueueAcquireGLObjects_, givenNullCommandQueueWhenAcquireIsCalledThenInvalidCommandQueueIsReturned) { +TEST_F(ClEnqueueAcquireGLObjects_, givenNullCommandQueueWhenAcquireIsCalledThenInvalidCommandQueueIsReturned) { auto retVal = clEnqueueAcquireGLObjects(nullptr, // cl_command_queue command_queue 0, // cl_uint num_objects nullptr, // const cl_mem *mem_objects diff --git a/opencl/test/unit_test/api/gl/cl_enqueue_release_gl_objects_tests.cpp b/opencl/test/unit_test/api/gl/cl_enqueue_release_gl_objects_tests.cpp index d57f291369..b7e4a84374 100644 --- a/opencl/test/unit_test/api/gl/cl_enqueue_release_gl_objects_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_enqueue_release_gl_objects_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clEnqueueReleaseGLObjects_; +using ClEnqueueReleaseGLObjects_ = ApiTests; namespace ULT { -TEST_F(clEnqueueReleaseGLObjects_, givenNullCommandQueueWhenReleaseGlObjectsIsCalledThenInvalidCommandQueueIsReturned) { +TEST_F(ClEnqueueReleaseGLObjects_, givenNullCommandQueueWhenReleaseGlObjectsIsCalledThenInvalidCommandQueueIsReturned) { auto retVal = clEnqueueReleaseGLObjects(nullptr, // cl_command_queue command_queue 0, // cl_uint num_objects nullptr, // const cl_mem *mem_objects diff --git a/opencl/test/unit_test/api/gl/cl_get_gl_object_info_tests.cpp b/opencl/test/unit_test/api/gl/cl_get_gl_object_info_tests.cpp index 406f358a26..9b6680fba5 100644 --- a/opencl/test/unit_test/api/gl/cl_get_gl_object_info_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_get_gl_object_info_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clGetGLObjectInfo_; +using ClGetGLObjectInfo_ = ApiTests; namespace ULT { -TEST_F(clGetGLObjectInfo_, givenNullMemObjectWhenGetGlObjectInfoIsCalledThenInvalidMemObjectIsReturned) { +TEST_F(ClGetGLObjectInfo_, givenNullMemObjectWhenGetGlObjectInfoIsCalledThenInvalidMemObjectIsReturned) { auto retVal = clGetGLObjectInfo(nullptr, // cl_mem memobj nullptr, // cl_gl_object_type *gl_object_type nullptr // GLuint *gl_object_name diff --git a/opencl/test/unit_test/api/gl/cl_get_gl_texture_info_tests.cpp b/opencl/test/unit_test/api/gl/cl_get_gl_texture_info_tests.cpp index 5a81425e54..de5d9bffc1 100644 --- a/opencl/test/unit_test/api/gl/cl_get_gl_texture_info_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_get_gl_texture_info_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,11 +9,11 @@ using namespace NEO; -typedef api_tests clGetGLTextureInfo_; +using ClGetGLTextureInfo_ = ApiTests; namespace ULT { -TEST_F(clGetGLTextureInfo_, givenNullMemObjectWhenGetGLTextureInfoIsCalledThenInvalidMemObjectIsReturned) { +TEST_F(ClGetGLTextureInfo_, givenNullMemObjectWhenGetGLTextureInfoIsCalledThenInvalidMemObjectIsReturned) { auto retVal = clGetGLTextureInfo(nullptr, // cl_mem memobj CL_GL_TEXTURE_TARGET, // cl_gl_texture_info param_name 0, // size_t param_value_size diff --git a/opencl/test/unit_test/api/gl/cl_gl_intel_tracing_tests.cpp b/opencl/test/unit_test/api/gl/cl_gl_intel_tracing_tests.cpp index e5c74a6efc..5c08c703c2 100644 --- a/opencl/test/unit_test/api/gl/cl_gl_intel_tracing_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_gl_intel_tracing_tests.cpp @@ -13,12 +13,12 @@ using namespace NEO; namespace ULT { -struct IntelGlTracingTest : public api_tests { +struct IntelGlTracingTest : public ApiTests { public: IntelGlTracingTest() {} void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); status = clCreateTracingHandleINTEL(testedClDevice, callback, this, &handle); ASSERT_NE(nullptr, handle); @@ -40,7 +40,7 @@ struct IntelGlTracingTest : public api_tests { status = clDestroyTracingHandleINTEL(handle); ASSERT_EQ(CL_SUCCESS, status); - api_tests::TearDown(); + ApiTests::TearDown(); } protected: diff --git a/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp index 676fa27420..4952d1a39d 100644 --- a/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -29,7 +29,7 @@ using namespace NEO; -using clEnqueueCopyBufferTests = api_tests; +using clEnqueueCopyBufferTests = ApiTests; HWTEST_F(clEnqueueCopyBufferTests, GivenNullSrcMemObjWhenCopyingBufferThenClInvalidMemObjectErrorIsReturned) { MockBuffer dstBuffer{}; diff --git a/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp index 090b8c9765..90be01a26b 100644 --- a/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_kernel_1_tests.cpp @@ -312,7 +312,7 @@ TEST_F(EnqueueKernelTest, GivenNullKernelWhenEnqueuingNDCountKernelINTELThenInva EXPECT_EQ(CL_INVALID_KERNEL, retVal); } -using clEnqueueNDCountKernelTests = api_tests; +using clEnqueueNDCountKernelTests = ApiTests; TEST_F(clEnqueueNDCountKernelTests, GivenQueueIncapableWhenEnqueuingNDCountKernelINTELThenInvalidOperationIsReturned) { diff --git a/opencl/test/unit_test/gen9/cl_get_platform_ids_tests_gen9.cpp b/opencl/test/unit_test/gen9/cl_get_platform_ids_tests_gen9.cpp index 3edbbd35ab..ba01d73d1a 100644 --- a/opencl/test/unit_test/gen9/cl_get_platform_ids_tests_gen9.cpp +++ b/opencl/test/unit_test/gen9/cl_get_platform_ids_tests_gen9.cpp @@ -14,7 +14,7 @@ using namespace NEO; -typedef api_tests clGetPlatformIDsTests; +using ClGetPlatformIDsTests = ApiTests; TEST(clGetPlatformIDsMultiPlatformTest, whenCreateDevicesWithDifferentProductFamilyThenClGetPlatformIdsCreatesMultiplePlatformsProperlySorted) { diff --git a/opencl/test/unit_test/mt_tests/api/cl_create_user_event_tests_mt.inl b/opencl/test/unit_test/mt_tests/api/cl_create_user_event_tests_mt.inl index 08dbf283b0..07e1424846 100644 --- a/opencl/test/unit_test/mt_tests/api/cl_create_user_event_tests_mt.inl +++ b/opencl/test/unit_test/mt_tests/api/cl_create_user_event_tests_mt.inl @@ -10,11 +10,11 @@ using namespace NEO; -typedef api_tests clCreateUserEventMtTests; +using ClCreateUserEventMtTests = ApiTests; namespace ULT { -TEST_F(clCreateUserEventMtTests, GivenClCompleteEventWhenWaitingForEventThenWaitForEventsIsCompleted) { +TEST_F(ClCreateUserEventMtTests, GivenClCompleteEventWhenWaitingForEventThenWaitForEventsIsCompleted) { auto userEvent = clCreateUserEvent( pContext, &retVal); diff --git a/opencl/test/unit_test/mt_tests/api/cl_set_mem_object_destructor_callback_tests_mt.inl b/opencl/test/unit_test/mt_tests/api/cl_set_mem_object_destructor_callback_tests_mt.inl index fcafaa44c2..93392f43d6 100644 --- a/opencl/test/unit_test/mt_tests/api/cl_set_mem_object_destructor_callback_tests_mt.inl +++ b/opencl/test/unit_test/mt_tests/api/cl_set_mem_object_destructor_callback_tests_mt.inl @@ -10,7 +10,7 @@ using namespace NEO; -typedef api_tests ClCreateBufferTests; +using ClCreateBufferTests = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/os_interface/mock_performance_counters.h b/opencl/test/unit_test/os_interface/mock_performance_counters.h index b0c314a1cb..94f3725c52 100644 --- a/opencl/test/unit_test/os_interface/mock_performance_counters.h +++ b/opencl/test/unit_test/os_interface/mock_performance_counters.h @@ -34,7 +34,7 @@ using MetricsLibraryApi::QueryHandle_1_0; ////////////////////////////////////////////////////// // MI_REPORT_PERF_COUNT definition for all GENs ////////////////////////////////////////////////////// -struct MI_REPORT_PERF_COUNT { +struct MI_REPORT_PERF_COUNT { // NOLINT(readability-identifier-naming) uint32_t DwordLength : BITFIELD_RANGE(0, 5); uint32_t Reserved_6 : BITFIELD_RANGE(6, 22); uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28); diff --git a/opencl/test/unit_test/os_interface/windows/gl/cl_get_gl_context_info_khr_tests.cpp b/opencl/test/unit_test/os_interface/windows/gl/cl_get_gl_context_info_khr_tests.cpp index e18be4b4ff..12fafd33e9 100644 --- a/opencl/test/unit_test/os_interface/windows/gl/cl_get_gl_context_info_khr_tests.cpp +++ b/opencl/test/unit_test/os_interface/windows/gl/cl_get_gl_context_info_khr_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -18,7 +18,7 @@ using namespace NEO; -using clGetGLContextInfoKhrTest = api_tests; +using clGetGLContextInfoKhrTest = ApiTests; namespace ULT { diff --git a/opencl/test/unit_test/sharings/d3d/context_d3d_tests.cpp b/opencl/test/unit_test/sharings/d3d/context_d3d_tests.cpp index 0f806684ab..3cbe8cad24 100644 --- a/opencl/test/unit_test/sharings/d3d/context_d3d_tests.cpp +++ b/opencl/test/unit_test/sharings/d3d/context_d3d_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -35,7 +35,7 @@ TEST(D3DContextTest, givenDispatchTableThenItContainsValidEntries) { EXPECT_EQ(&clEnqueueReleaseDX9ObjectsINTEL, context.dispatch.crtDispatch->clEnqueueReleaseDX9ObjectsINTEL); } -struct clIntelSharingFormatQueryDX9 : public api_tests { +struct clIntelSharingFormatQueryDX9 : public ApiTests { std::vector supportedNonPlanarFormats; std::vector supportedPlanarFormats; std::vector supportedPlane1Formats; @@ -45,7 +45,7 @@ struct clIntelSharingFormatQueryDX9 : public api_tests { cl_uint numImageFormats; void SetUp() override { - api_tests::SetUp(); + ApiTests::SetUp(); supportedNonPlanarFormats = {D3DFMT_R32F, D3DFMT_R16F, D3DFMT_L16, D3DFMT_A8, D3DFMT_L8, D3DFMT_G32R32F, D3DFMT_G16R16F, D3DFMT_G16R16, D3DFMT_A8L8, D3DFMT_A32B32G32R32F, D3DFMT_A16B16G16R16F, D3DFMT_A16B16G16R16, @@ -65,7 +65,7 @@ struct clIntelSharingFormatQueryDX9 : public api_tests { } void TearDown() override { - api_tests::TearDown(); + ApiTests::TearDown(); } }; diff --git a/opencl/test/unit_test/sharings/va/cl_create_from_va_media_surface_tests.cpp b/opencl/test/unit_test/sharings/va/cl_create_from_va_media_surface_tests.cpp index 8a15e78eb0..dc7d02b62b 100644 --- a/opencl/test/unit_test/sharings/va/cl_create_from_va_media_surface_tests.cpp +++ b/opencl/test/unit_test/sharings/va/cl_create_from_va_media_surface_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,11 +11,11 @@ using namespace NEO; -typedef api_tests clCreateFromVaMediaSurfaceTests; +using ClCreateFromVaMediaSurfaceTests = ApiTests; namespace ULT { -TEST_F(clCreateFromVaMediaSurfaceTests, givenNullContextWhenCreateIsCalledThenErrorIsReturned) { +TEST_F(ClCreateFromVaMediaSurfaceTests, givenNullContextWhenCreateIsCalledThenErrorIsReturned) { auto memObj = clCreateFromVA_APIMediaSurfaceINTEL(nullptr, CL_MEM_READ_WRITE, nullptr, 0, &retVal); EXPECT_EQ(nullptr, memObj); EXPECT_EQ(CL_INVALID_CONTEXT, retVal); diff --git a/opencl/test/unit_test/sharings/va/cl_enqueue_acquire_va_media_surfaces_tests.cpp b/opencl/test/unit_test/sharings/va/cl_enqueue_acquire_va_media_surfaces_tests.cpp index 164c3e023e..d3bad96547 100644 --- a/opencl/test/unit_test/sharings/va/cl_enqueue_acquire_va_media_surfaces_tests.cpp +++ b/opencl/test/unit_test/sharings/va/cl_enqueue_acquire_va_media_surfaces_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,11 +11,11 @@ using namespace NEO; -typedef api_tests clEnqueueAcquireVaMediaSurfacesTests; +using ClEnqueueAcquireVaMediaSurfacesTests = ApiTests; namespace ULT { -TEST_F(clEnqueueAcquireVaMediaSurfacesTests, givenNullCommandQueueWhenAcquireIsCalledThenInvalidCommandQueueIsReturned) { +TEST_F(ClEnqueueAcquireVaMediaSurfacesTests, givenNullCommandQueueWhenAcquireIsCalledThenInvalidCommandQueueIsReturned) { retVal = clEnqueueAcquireVA_APIMediaSurfacesINTEL(nullptr, 0, nullptr, 0, nullptr, nullptr); EXPECT_EQ(retVal, CL_INVALID_COMMAND_QUEUE); } diff --git a/opencl/test/unit_test/sharings/va/cl_enqueue_release_va_media_surfaces_tests.cpp b/opencl/test/unit_test/sharings/va/cl_enqueue_release_va_media_surfaces_tests.cpp index e47f3a7451..25f5b8b914 100644 --- a/opencl/test/unit_test/sharings/va/cl_enqueue_release_va_media_surfaces_tests.cpp +++ b/opencl/test/unit_test/sharings/va/cl_enqueue_release_va_media_surfaces_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,11 +11,11 @@ using namespace NEO; -typedef api_tests clEnqueueReleaseVaMediaSurfacesTests; +using ClEnqueueReleaseVaMediaSurfacesTests = ApiTests; namespace ULT { -TEST_F(clEnqueueReleaseVaMediaSurfacesTests, givenNullCommandQueueWhenReleaseObjectsIsCalledThenInvalidCommandQueueIsReturned) { +TEST_F(ClEnqueueReleaseVaMediaSurfacesTests, givenNullCommandQueueWhenReleaseObjectsIsCalledThenInvalidCommandQueueIsReturned) { retVal = clEnqueueReleaseVA_APIMediaSurfacesINTEL(nullptr, 0, nullptr, 0, nullptr, nullptr); EXPECT_EQ(retVal, CL_INVALID_COMMAND_QUEUE); } diff --git a/opencl/test/unit_test/sharings/va/cl_get_extension_function_address_tests.cpp b/opencl/test/unit_test/sharings/va/cl_get_extension_function_address_tests.cpp index 46dc2256eb..928099cd45 100644 --- a/opencl/test/unit_test/sharings/va/cl_get_extension_function_address_tests.cpp +++ b/opencl/test/unit_test/sharings/va/cl_get_extension_function_address_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,31 +12,31 @@ using namespace NEO; -typedef api_tests clGetExtensionFunctionAddressTests; +using ClGetExtensionFunctionAddressTests = ApiTests; namespace ULT { -TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateFromVaMediaSurfaceIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateFromVaMediaSurfaceIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { auto retVal = clGetExtensionFunctionAddress("clCreateFromVA_APIMediaSurfaceINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clCreateFromVA_APIMediaSurfaceINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueAcquireVaApiMediaSurfacesIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueAcquireVaApiMediaSurfacesIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueAcquireVA_APIMediaSurfacesINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueAcquireVA_APIMediaSurfacesINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueReleaseVaApiMediaSurfacesIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueReleaseVaApiMediaSurfacesIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { auto retVal = clGetExtensionFunctionAddress("clEnqueueReleaseVA_APIMediaSurfacesINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clEnqueueReleaseVA_APIMediaSurfacesINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, GivenClGetDeviceIDsFromVaApiMediaAdapterIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetDeviceIDsFromVaApiMediaAdapterIntelWhenGettingFunctionAddressThenCorrectPointerReturned) { auto retVal = clGetExtensionFunctionAddress("clGetDeviceIDsFromVA_APIMediaAdapterINTEL"); EXPECT_EQ(retVal, reinterpret_cast(clGetDeviceIDsFromVA_APIMediaAdapterINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, givenEnabledFormatQueryWhenGettingFuncionAddressThenCorrectAddressIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, givenEnabledFormatQueryWhenGettingFuncionAddressThenCorrectAddressIsReturned) { DebugManagerStateRestore restorer; DebugManager.flags.EnableFormatQuery.set(true); @@ -44,7 +44,7 @@ TEST_F(clGetExtensionFunctionAddressTests, givenEnabledFormatQueryWhenGettingFun EXPECT_EQ(retVal, reinterpret_cast(clGetSupportedVA_APIMediaSurfaceFormatsINTEL)); } -TEST_F(clGetExtensionFunctionAddressTests, givenDisabledFormatQueryWhenGettingFuncionAddressThenNullptrIsReturned) { +TEST_F(ClGetExtensionFunctionAddressTests, givenDisabledFormatQueryWhenGettingFuncionAddressThenNullptrIsReturned) { DebugManagerStateRestore restorer; DebugManager.flags.EnableFormatQuery.set(false); diff --git a/opencl/test/unit_test/xe_hpc_core/api_tests_xe_hpc_core.cpp b/opencl/test/unit_test/xe_hpc_core/api_tests_xe_hpc_core.cpp index 63bbb436f5..7da26cfc6f 100644 --- a/opencl/test/unit_test/xe_hpc_core/api_tests_xe_hpc_core.cpp +++ b/opencl/test/unit_test/xe_hpc_core/api_tests_xe_hpc_core.cpp @@ -11,7 +11,7 @@ using namespace NEO; -using EnqueueKernelTestGenXeHpcCore = api_tests; +using EnqueueKernelTestGenXeHpcCore = ApiTests; XE_HPC_CORETEST_F(EnqueueKernelTestGenXeHpcCore, givenCommandQueueWithCCCSEngineAndRevisionBWhenCallingClEnqueueNDCountKernelINTELThenInvalidCommandQueueIsReturned) { size_t workgroupCount[3] = {2, 1, 1}; diff --git a/shared/source/debug_settings/debug_settings_manager.h b/shared/source/debug_settings/debug_settings_manager.h index a7bc3730fd..d45a931c29 100644 --- a/shared/source/debug_settings/debug_settings_manager.h +++ b/shared/source/debug_settings/debug_settings_manager.h @@ -82,8 +82,8 @@ struct DebugVarBase { T defaultValue; }; -struct DebugVariables { // NOLINT(clang-analyzer-optin.performance.Padding) - struct DEBUGGER_LOG_BITMASK { +struct DebugVariables { // NOLINT(clang-analyzer-optin.performance.Padding) + struct DEBUGGER_LOG_BITMASK { // NOLINT(readability-identifier-naming) constexpr static int32_t LOG_INFO{1}; // NOLINT(readability-identifier-naming) constexpr static int32_t LOG_ERROR{1 << 1}; // NOLINT(readability-identifier-naming) constexpr static int32_t LOG_THREADS{1 << 2}; // NOLINT(readability-identifier-naming) diff --git a/shared/source/device/device.cpp b/shared/source/device/device.cpp index e41fb63853..74450472a7 100644 --- a/shared/source/device/device.cpp +++ b/shared/source/device/device.cpp @@ -797,7 +797,7 @@ bool Device::generateUuidFromPciBusInfo(const PhysicalDevicePciBusInfo &pciBusIn * Consult other driver teams before changing this. */ - struct device_uuid { + struct DeviceUUID { uint16_t vendor_id; uint16_t device_id; uint16_t revision_id; @@ -809,7 +809,7 @@ bool Device::generateUuidFromPciBusInfo(const PhysicalDevicePciBusInfo &pciBusIn uint8_t sub_device_id; }; - device_uuid deviceUUID = {}; + DeviceUUID deviceUUID = {}; deviceUUID.vendor_id = 0x8086; // Intel deviceUUID.device_id = getHardwareInfo().platform.usDeviceID; deviceUUID.revision_id = getHardwareInfo().platform.usRevId; @@ -819,9 +819,9 @@ bool Device::generateUuidFromPciBusInfo(const PhysicalDevicePciBusInfo &pciBusIn deviceUUID.pci_func = static_cast(pciBusInfo.pciFunction); deviceUUID.sub_device_id = isSubDevice() ? static_cast(this)->getSubDeviceIndex() + 1 : 0; - static_assert(sizeof(device_uuid) == ProductHelper::uuidSize); + static_assert(sizeof(DeviceUUID) == ProductHelper::uuidSize); - memcpy_s(uuid.data(), ProductHelper::uuidSize, &deviceUUID, sizeof(device_uuid)); + memcpy_s(uuid.data(), ProductHelper::uuidSize, &deviceUUID, sizeof(DeviceUUID)); return true; } diff --git a/shared/source/generated/.clang-tidy b/shared/source/generated/.clang-tidy new file mode 100644 index 0000000000..595762be0d --- /dev/null +++ b/shared/source/generated/.clang-tidy @@ -0,0 +1,3 @@ +--- +Checks: '-*' +... diff --git a/shared/source/helpers/uint16_avx2.h b/shared/source/helpers/uint16_avx2.h index 00abf81ad8..acf90a33ae 100644 --- a/shared/source/helpers/uint16_avx2.h +++ b/shared/source/helpers/uint16_avx2.h @@ -15,7 +15,7 @@ namespace NEO { #if __AVX2__ -struct uint16x16_t { +struct uint16x16_t { // NOLINT(readability-identifier-naming) enum { numChannels = 16 }; __m256i value; diff --git a/shared/source/helpers/uint16_sse4.h b/shared/source/helpers/uint16_sse4.h index d9178ff39f..2909be51e6 100644 --- a/shared/source/helpers/uint16_sse4.h +++ b/shared/source/helpers/uint16_sse4.h @@ -18,7 +18,7 @@ namespace NEO { -struct uint16x8_t { +struct uint16x8_t { // NOLINT(readability-identifier-naming) enum { numChannels = 8 }; __m128i value; diff --git a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp index 3fb09bcf4f..17e2427286 100644 --- a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp @@ -40,7 +40,7 @@ namespace NEO { #define VMBIND_FENCE_TAG 0x123987 -struct xe_fake_ext_user_fence { +struct XeFakeExtUserFence { uint32_t tag; uint64_t addr; uint64_t value; @@ -382,7 +382,7 @@ int IoctlHelperXe::createGemExt(const MemRegionsVec &memClassInstances, size_t a { std::unique_lock lock(xeLock); - bind_info b = {create.handle, 0, 0, create.size}; + BindInfo b = {create.handle, 0, 0, create.size}; bindInfo.push_back(b); } @@ -628,7 +628,7 @@ void IoctlHelperXe::fillVmBindExtSetPat(VmBindExtSetPatT &vmBindExtSetPat, uint6 void IoctlHelperXe::fillVmBindExtUserFence(VmBindExtUserFenceT &vmBindExtUserFence, uint64_t fenceAddress, uint64_t fenceValue, uint64_t nextExtension) { xeLog(" -> IoctlHelperXe::%s 0x%lx 0x%lx\n", __FUNCTION__, fenceAddress, fenceValue); - auto xeBindExtUserFence = reinterpret_cast(vmBindExtUserFence); + auto xeBindExtUserFence = reinterpret_cast(vmBindExtUserFence); UNRECOVERABLE_IF(!xeBindExtUserFence); xeBindExtUserFence->tag = VMBIND_FENCE_TAG; xeBindExtUserFence->addr = fenceAddress; @@ -895,7 +895,7 @@ int IoctlHelperXe::ioctl(DrmIoctl request, void *arg) { d->handle = userPtrHandle++ | XE_USERPTR_FAKE_FLAG; { std::unique_lock lock(xeLock); - bind_info b = {d->handle, d->userPtr, 0, d->userSize}; + BindInfo b = {d->handle, d->userPtr, 0, d->userSize}; bindInfo.push_back(b); } ret = 0; @@ -1189,7 +1189,7 @@ int IoctlHelperXe::xeVmBind(const VmBindParams &vmBindParams, bool bindOp) { struct drm_xe_sync sync[1] = {}; sync[0].flags = DRM_XE_SYNC_USER_FENCE | DRM_XE_SYNC_SIGNAL; extraBindFlag = XE_VM_BIND_FLAG_ASYNC; - auto xeBindExtUserFence = reinterpret_cast(vmBindParams.extensions); + auto xeBindExtUserFence = reinterpret_cast(vmBindParams.extensions); UNRECOVERABLE_IF(!xeBindExtUserFence); UNRECOVERABLE_IF(xeBindExtUserFence->tag != VMBIND_FENCE_TAG); sync[0].addr = xeBindExtUserFence->addr; diff --git a/shared/source/os_interface/linux/xe/ioctl_helper_xe.h b/shared/source/os_interface/linux/xe/ioctl_helper_xe.h index 2006ff6664..661b01f3fd 100644 --- a/shared/source/os_interface/linux/xe/ioctl_helper_xe.h +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe.h @@ -25,7 +25,7 @@ struct drm_xe_engine_class_instance; namespace NEO { -struct bind_info { +struct BindInfo { uint32_t handle; uint64_t userptr; uint64_t addr; @@ -127,7 +127,7 @@ class IoctlHelperXe : public IoctlHelper { std::unique_ptr hwEngines; int xe_fileHandle = 0; std::mutex xeLock; - std::vector bindInfo; + std::vector bindInfo; int instance = 0; uint64_t xeMemoryRegions = 0; uint32_t xeTimestampFrequency = 0; diff --git a/shared/source/os_interface/windows/gfx_escape_wrapper.h b/shared/source/os_interface/windows/gfx_escape_wrapper.h index 35c28758c6..848579987e 100644 --- a/shared/source/os_interface/windows/gfx_escape_wrapper.h +++ b/shared/source/os_interface/windows/gfx_escape_wrapper.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,7 +12,7 @@ #ifdef _WIN32 #include "gfxEscape.h" #else // !_WIN32 -typedef struct GFX_ESCAPE_HEADER { +typedef struct GFX_ESCAPE_HEADER { // NOLINT(readability-identifier-naming) union { struct { diff --git a/shared/source/os_interface/windows/sharedata_wrapper.h b/shared/source/os_interface/windows/sharedata_wrapper.h index 2a20844ebc..a7a4d2d841 100644 --- a/shared/source/os_interface/windows/sharedata_wrapper.h +++ b/shared/source/os_interface/windows/sharedata_wrapper.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -47,7 +47,7 @@ static constexpr COMMAND_BUFFER_HEADER initCommandBufferHeader(uint32_t umdConte #endif #else -struct SKU_FEATURE_TABLE_KMD : SKU_FEATURE_TABLE_GMM { +struct SKU_FEATURE_TABLE_KMD : SKU_FEATURE_TABLE_GMM { // NOLINT(readability-identifier-naming) bool FtrGpGpuMidBatchPreempt : 1; bool FtrGpGpuThreadGroupLevelPreempt : 1; bool FtrGpGpuMidThreadLevelPreempt : 1; @@ -94,7 +94,7 @@ struct SKU_FEATURE_TABLE_KMD : SKU_FEATURE_TABLE_GMM { bool FtrLocalMemoryAllows4KB : 1; }; -struct WA_TABLE_KMD : WA_TABLE_GMM { +struct WA_TABLE_KMD : WA_TABLE_GMM { // NOLINT(readability-identifier-naming) bool WaSendMIFLUSHBeforeVFE = false; bool WaDisableLSQCROPERFforOCL = false; @@ -118,7 +118,7 @@ struct WA_TABLE_KMD : WA_TABLE_GMM { bool WaDisableFusedThreadScheduling = false; }; -typedef struct COMMAND_BUFFER_HEADER_REC { +typedef struct COMMAND_BUFFER_HEADER_REC { // NOLINT(readability-identifier-naming) uint32_t UmdContextType : 4; uint32_t UmdPatchList : 1; @@ -149,7 +149,7 @@ typedef struct __GMM_GFX_PARTITIONING { Heap32[4]; } GMM_GFX_PARTITIONING; -struct CREATECONTEXT_PVTDATA { +struct CREATECONTEXT_PVTDATA { // NOLINT(readability-identifier-naming) unsigned long *pHwContextId; uint32_t NumberOfHwContextIds; @@ -161,7 +161,7 @@ struct CREATECONTEXT_PVTDATA { BOOLEAN NoRingFlushes; }; -struct ADAPTER_INFO_KMD : ADAPTER_INFO_GMM { +struct ADAPTER_INFO_KMD : ADAPTER_INFO_GMM { // NOLINT(readability-identifier-naming) SKU_FEATURE_TABLE_KMD SkuTable; WA_TABLE_KMD WaTable; GMM_GFX_PARTITIONING GfxPartition; diff --git a/shared/source/tbx/tbx_proto.h b/shared/source/tbx/tbx_proto.h index c39e13862c..54b8224fbf 100644 --- a/shared/source/tbx/tbx_proto.h +++ b/shared/source/tbx/tbx_proto.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -47,7 +47,7 @@ enum HAS_MSG_TYPE { NUM_OF_MSG_TYPE }; -struct HAS_HDR { +struct HasHdr { union { uint32_t msg_type; HAS_MSG_TYPE type; @@ -62,7 +62,7 @@ enum { MSG_TYPE_FUNNY_IO }; -struct HAS_MMIO_REQ { +struct HasMmioReq { uint32_t write : 1; uint32_t size : 3; uint32_t dev_idx : 2; @@ -78,8 +78,8 @@ struct HAS_MMIO_REQ { }; }; -struct HAS_MMIO_EXT_REQ { - struct HAS_MMIO_REQ mmio_req; +struct HasMmioExtReq { + struct HasMmioReq mmio_req; uint32_t sourceid : 8; uint32_t reserved1 : 24; enum { @@ -87,7 +87,7 @@ struct HAS_MMIO_EXT_REQ { }; }; -struct HAS_MMIO_RES { +struct HasMmioRes { uint32_t data; enum { @@ -95,7 +95,7 @@ struct HAS_MMIO_RES { }; }; -struct HAS_GTT32_REQ { +struct HasGtt32Req { uint32_t write : 1; uint32_t reserved : 31; @@ -107,7 +107,7 @@ struct HAS_GTT32_REQ { }; }; -struct HAS_GTT32_RES { +struct HasGtt32Res { uint32_t data; enum { @@ -115,7 +115,7 @@ struct HAS_GTT32_RES { }; }; -struct HAS_GTT64_REQ { +struct HasGtt64Req { uint32_t write : 1; uint32_t reserved : 31; @@ -128,7 +128,7 @@ struct HAS_GTT64_REQ { }; }; -struct HAS_GTT64_RES { +struct HasGtt64Res { uint32_t data; uint32_t data_h; @@ -137,7 +137,7 @@ struct HAS_GTT64_RES { }; }; -struct HAS_WRITE_DATA_REQ { +struct HasWriteDataReq { uint32_t addr_type : 1; uint32_t mask_exist : 1; uint32_t frontdoor : 1; @@ -155,7 +155,7 @@ struct HAS_WRITE_DATA_REQ { }; }; -struct HAS_READ_DATA_REQ { +struct HasReadDataReq { uint32_t addr_type : 1; uint32_t frontdoor : 1; uint32_t ownership_req : 1; @@ -171,7 +171,7 @@ struct HAS_READ_DATA_REQ { }; }; -struct HAS_READ_DATA_RES { +struct HasReadDataRes { uint32_t addr_type : 1; uint32_t mask_exist : 1; uint32_t last_page : 1; @@ -186,7 +186,7 @@ struct HAS_READ_DATA_RES { }; }; -struct HAS_CONTROL_REQ { +struct HasControlReq { uint32_t reset : 1; // [0:0] uint32_t has : 1; // [1:1] uint32_t rd_on_demand : 1; // [2:2] @@ -222,7 +222,7 @@ struct HAS_CONTROL_REQ { }; }; -struct HAS_REPORT_REND_END_REQ { +struct HasReportRendEndReq { uint32_t timeout; enum { @@ -230,7 +230,7 @@ struct HAS_REPORT_REND_END_REQ { }; }; -struct HAS_REPORT_REND_END_RES { +struct HasReportRendEndRes { uint32_t timeout : 1; uint32_t reserved : 31; @@ -239,7 +239,7 @@ struct HAS_REPORT_REND_END_RES { }; }; -struct HAS_PCICFG_REQ { +struct HasPcicfgReq { uint32_t write : 1; uint32_t size : 3; uint32_t bus : 8; @@ -254,11 +254,11 @@ struct HAS_PCICFG_REQ { }; }; -struct HAS_PCICFG_RES { +struct HasPcicfgRes { uint32_t data; }; -struct HAS_GTT_PARAMS_REQ { +struct HasGttParamsReq { uint32_t base; uint32_t base_h : 8; uint32_t size : 24; @@ -268,7 +268,7 @@ struct HAS_GTT_PARAMS_REQ { }; }; -struct HAS_EVENT_OBSOLETE_REQ { +struct HasEventObsoleteReq { uint32_t offset; uint32_t data; @@ -277,7 +277,7 @@ struct HAS_EVENT_OBSOLETE_REQ { }; }; -struct HAS_EVENT_REQ { +struct HasEventReq { uint32_t offset; uint32_t data; uint32_t dev_idx : 2; @@ -288,7 +288,7 @@ struct HAS_EVENT_REQ { }; }; -struct HAS_INNER_VAR_REQ { +struct HasInnerVarReq { uint32_t write : 1; uint32_t non_dword : 16; uint32_t reserved : 15; @@ -300,7 +300,7 @@ struct HAS_INNER_VAR_REQ { }; }; -struct HAS_INNER_VAR_RES { +struct HasInnerVarRes { uint32_t data; enum { @@ -308,7 +308,7 @@ struct HAS_INNER_VAR_RES { }; }; -struct HAS_INNER_VAR_LIST_RES { +struct HasInnerVarListRes { uint32_t size; enum { @@ -316,14 +316,14 @@ struct HAS_INNER_VAR_LIST_RES { }; }; -struct HAS_INTERNAL_VAR_LIST_ENTRY_RES { +struct HasInternalVarListEntryRes { uint32_t id; uint32_t min; uint32_t max; uint32_t desc_size; }; -struct HAS_FUNNY_IO_REQ { +struct HasFunnyIoReq { uint32_t write : 1; uint32_t reserved : 28; uint32_t size : 3; @@ -335,7 +335,7 @@ struct HAS_FUNNY_IO_REQ { }; }; -struct HAS_FUNNY_IO_RES { +struct HasFunnyIoRes { uint32_t data; enum { @@ -343,7 +343,7 @@ struct HAS_FUNNY_IO_RES { }; }; -struct HAS_IO_REQ { +struct HasIoReq { uint32_t write : 1; uint32_t dev_idx : 2; uint32_t reserved : 26; @@ -356,7 +356,7 @@ struct HAS_IO_REQ { }; }; -struct HAS_IO_RES { +struct HasIoRes { uint32_t data; enum { @@ -364,7 +364,7 @@ struct HAS_IO_RES { }; }; -struct HAS_RPC_REQ { +struct HasRpcReq { uint32_t size; enum { @@ -372,7 +372,7 @@ struct HAS_RPC_REQ { }; }; -struct HAS_RPC_RES { +struct HasRpcRes { uint32_t status; uint32_t size; @@ -381,7 +381,7 @@ struct HAS_RPC_RES { }; }; -struct HAS_CL_FLUSH_REQ { +struct HasClFlushReq { uint32_t reserved : 23; uint32_t ignore : 1; uint32_t address_h : 8; @@ -394,7 +394,7 @@ struct HAS_CL_FLUSH_REQ { }; }; -struct HAS_CL_FLUSH_RES { +struct HasClFlushRes { uint32_t data; enum { @@ -402,7 +402,7 @@ struct HAS_CL_FLUSH_RES { }; }; -struct HAS_SIMTIME_RES { +struct HasSimtimeRes { uint32_t data_l; uint32_t data_h; @@ -411,7 +411,7 @@ struct HAS_SIMTIME_RES { }; }; -struct HAS_GD2_MESSAGE { +struct HasGd2Message { uint32_t subOpcode; uint32_t data[1]; @@ -420,41 +420,41 @@ struct HAS_GD2_MESSAGE { }; }; -union HAS_MSG_BODY { - struct HAS_MMIO_REQ mmio_req; - struct HAS_MMIO_EXT_REQ mmio_req_ext; - struct HAS_MMIO_RES mmio_res; - struct HAS_GTT32_REQ gtt32_req; - struct HAS_GTT32_RES gtt32_res; - struct HAS_GTT64_REQ gtt64_req; - struct HAS_GTT64_RES gtt64_res; - struct HAS_WRITE_DATA_REQ write_req; - struct HAS_READ_DATA_REQ read_req; - struct HAS_READ_DATA_RES read_res; - struct HAS_CONTROL_REQ control_req; - struct HAS_REPORT_REND_END_REQ render_req; - struct HAS_REPORT_REND_END_RES render_res; - struct HAS_PCICFG_REQ pcicfg_req; - struct HAS_PCICFG_RES pcicfg_res; - struct HAS_GTT_PARAMS_REQ gtt_params_req; - struct HAS_EVENT_REQ event_req; - struct HAS_EVENT_OBSOLETE_REQ event_obsolete_req; - struct HAS_INNER_VAR_REQ inner_var_req; - struct HAS_INNER_VAR_RES inner_var_res; - struct HAS_INNER_VAR_LIST_RES inner_var_list_res; - struct HAS_IO_REQ io_req; - struct HAS_IO_RES io_res; - struct HAS_RPC_REQ rpc_req; - struct HAS_RPC_RES rpc_res; - struct HAS_CL_FLUSH_REQ flush_req; - struct HAS_CL_FLUSH_RES flush_res; - struct HAS_SIMTIME_RES stime_res; - struct HAS_GD2_MESSAGE gd2_message_req; +union HasMsgBody { + struct HasMmioReq mmio_req; + struct HasMmioExtReq mmio_req_ext; + struct HasMmioRes mmio_res; + struct HasGtt32Req gtt32_req; + struct HasGtt32Res gtt32_res; + struct HasGtt64Req gtt64_req; + struct HasGtt64Res gtt64_res; + struct HasWriteDataReq write_req; + struct HasReadDataReq read_req; + struct HasReadDataRes read_res; + struct HasControlReq control_req; + struct HasReportRendEndReq render_req; + struct HasReportRendEndRes render_res; + struct HasPcicfgReq pcicfg_req; + struct HasPcicfgRes pcicfg_res; + struct HasGttParamsReq gtt_params_req; + struct HasEventReq event_req; + struct HasEventObsoleteReq event_obsolete_req; + struct HasInnerVarReq inner_var_req; + struct HasInnerVarRes inner_var_res; + struct HasInnerVarListRes inner_var_list_res; + struct HasIoReq io_req; + struct HasIoRes io_res; + struct HasRpcReq rpc_req; + struct HasRpcRes rpc_res; + struct HasClFlushReq flush_req; + struct HasClFlushRes flush_res; + struct HasSimtimeRes stime_res; + struct HasGd2Message gd2_message_req; }; -struct HAS_MSG { - struct HAS_HDR hdr; - union HAS_MSG_BODY u; +struct HasMsg { + struct HasHdr hdr; + union HasMsgBody u; }; enum mem_types : uint32_t { diff --git a/shared/source/tbx/tbx_sockets_imp.cpp b/shared/source/tbx/tbx_sockets_imp.cpp index b48bcdf318..1f84df011f 100644 --- a/shared/source/tbx/tbx_sockets_imp.cpp +++ b/shared/source/tbx/tbx_sockets_imp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -81,10 +81,10 @@ bool TbxSocketsImp::init(const std::string &hostNameOrIp, uint16_t port) { break; } - HAS_MSG cmd; + HasMsg cmd; memset(&cmd, 0, sizeof(cmd)); cmd.hdr.msg_type = HAS_CONTROL_REQ_TYPE; - cmd.hdr.size = sizeof(HAS_CONTROL_REQ); + cmd.hdr.size = sizeof(HasControlReq); cmd.hdr.trans_id = transID++; cmd.u.control_req.time_adv_mask = 1; @@ -96,7 +96,7 @@ bool TbxSocketsImp::init(const std::string &hostNameOrIp, uint16_t port) { cmd.u.control_req.has_mask = 1; cmd.u.control_req.has = 1; - sendWriteData(&cmd, sizeof(HAS_HDR) + cmd.hdr.size); + sendWriteData(&cmd, sizeof(HasHdr) + cmd.hdr.size); } while (false); return m_socket != INVALID_SOCKET; @@ -134,10 +134,10 @@ bool TbxSocketsImp::connectToServer(const std::string &hostNameOrIp, uint16_t po bool TbxSocketsImp::readMMIO(uint32_t offset, uint32_t *data) { bool success; do { - HAS_MSG cmd; + HasMsg cmd; memset(&cmd, 0, sizeof(cmd)); cmd.hdr.msg_type = HAS_MMIO_REQ_TYPE; - cmd.hdr.size = sizeof(HAS_MMIO_REQ); + cmd.hdr.size = sizeof(HasMmioReq); cmd.hdr.trans_id = transID++; cmd.u.mmio_req.offset = offset; cmd.u.mmio_req.data = 0; @@ -146,13 +146,13 @@ bool TbxSocketsImp::readMMIO(uint32_t offset, uint32_t *data) { cmd.u.mmio_req.msg_type = MSG_TYPE_MMIO; cmd.u.mmio_req.size = sizeof(uint32_t); - success = sendWriteData(&cmd, sizeof(HAS_HDR) + cmd.hdr.size); + success = sendWriteData(&cmd, sizeof(HasHdr) + cmd.hdr.size); if (!success) { break; } - HAS_MSG resp; - success = getResponseData((char *)(&resp), sizeof(HAS_HDR) + sizeof(HAS_MMIO_RES)); + HasMsg resp; + success = getResponseData((char *)(&resp), sizeof(HasHdr) + sizeof(HasMmioRes)); if (!success) { break; } @@ -172,10 +172,10 @@ bool TbxSocketsImp::readMMIO(uint32_t offset, uint32_t *data) { } bool TbxSocketsImp::writeMMIO(uint32_t offset, uint32_t value) { - HAS_MSG cmd; + HasMsg cmd; memset(&cmd, 0, sizeof(cmd)); cmd.hdr.msg_type = HAS_MMIO_REQ_TYPE; - cmd.hdr.size = sizeof(HAS_MMIO_REQ); + cmd.hdr.size = sizeof(HasMmioReq); cmd.hdr.trans_id = transID++; cmd.u.mmio_req.msg_type = MSG_TYPE_MMIO; cmd.u.mmio_req.offset = offset; @@ -183,15 +183,15 @@ bool TbxSocketsImp::writeMMIO(uint32_t offset, uint32_t value) { cmd.u.mmio_req.write = 1; cmd.u.mmio_req.size = sizeof(uint32_t); - return sendWriteData(&cmd, sizeof(HAS_HDR) + cmd.hdr.size); + return sendWriteData(&cmd, sizeof(HasHdr) + cmd.hdr.size); } bool TbxSocketsImp::readMemory(uint64_t addrOffset, void *data, size_t size) { - HAS_MSG cmd; + HasMsg cmd; memset(&cmd, 0, sizeof(cmd)); cmd.hdr.msg_type = HAS_READ_DATA_REQ_TYPE; cmd.hdr.trans_id = transID++; - cmd.hdr.size = sizeof(HAS_READ_DATA_REQ); + cmd.hdr.size = sizeof(HasReadDataReq); cmd.u.read_req.address = static_cast(addrOffset); cmd.u.read_req.address_h = static_cast(addrOffset >> 32); cmd.u.read_req.addr_type = 0; @@ -202,13 +202,13 @@ bool TbxSocketsImp::readMemory(uint64_t addrOffset, void *data, size_t size) { bool success; do { - success = sendWriteData(&cmd, sizeof(HAS_HDR) + sizeof(HAS_READ_DATA_REQ)); + success = sendWriteData(&cmd, sizeof(HasHdr) + sizeof(HasReadDataReq)); if (!success) { break; } - HAS_MSG resp; - success = getResponseData(&resp, sizeof(HAS_HDR) + sizeof(HAS_READ_DATA_RES)); + HasMsg resp; + success = getResponseData(&resp, sizeof(HasHdr) + sizeof(HasReadDataRes)); if (!success) { break; } @@ -227,11 +227,11 @@ bool TbxSocketsImp::readMemory(uint64_t addrOffset, void *data, size_t size) { } bool TbxSocketsImp::writeMemory(uint64_t physAddr, const void *data, size_t size, uint32_t type) { - HAS_MSG cmd; + HasMsg cmd; memset(&cmd, 0, sizeof(cmd)); cmd.hdr.msg_type = HAS_WRITE_DATA_REQ_TYPE; cmd.hdr.trans_id = transID++; - cmd.hdr.size = sizeof(HAS_WRITE_DATA_REQ); + cmd.hdr.size = sizeof(HasWriteDataReq); cmd.u.write_req.address = static_cast(physAddr); cmd.u.write_req.address_h = static_cast(physAddr >> 32); @@ -244,7 +244,7 @@ bool TbxSocketsImp::writeMemory(uint64_t physAddr, const void *data, size_t size bool success; do { - success = sendWriteData(&cmd, sizeof(HAS_HDR) + sizeof(HAS_WRITE_DATA_REQ)); + success = sendWriteData(&cmd, sizeof(HasHdr) + sizeof(HasWriteDataReq)); if (!success) { break; } @@ -261,17 +261,17 @@ bool TbxSocketsImp::writeMemory(uint64_t physAddr, const void *data, size_t size } bool TbxSocketsImp::writeGTT(uint32_t offset, uint64_t entry) { - HAS_MSG cmd; + HasMsg cmd; memset(&cmd, 0, sizeof(cmd)); cmd.hdr.msg_type = HAS_GTT_REQ_TYPE; - cmd.hdr.size = sizeof(HAS_GTT64_REQ); + cmd.hdr.size = sizeof(HasGtt64Req); cmd.hdr.trans_id = transID++; cmd.u.gtt64_req.write = 1; cmd.u.gtt64_req.offset = offset / sizeof(uint64_t); // the TBX server expects GTT index here, not offset cmd.u.gtt64_req.data = static_cast(entry & 0xffffffff); cmd.u.gtt64_req.data_h = static_cast(entry >> 32); - return sendWriteData(&cmd, sizeof(HAS_HDR) + cmd.hdr.size); + return sendWriteData(&cmd, sizeof(HasHdr) + cmd.hdr.size); } bool TbxSocketsImp::sendWriteData(const void *buffer, size_t sizeInBytes) { diff --git a/shared/wsl_compute_helper/.clang-tidy b/shared/wsl_compute_helper/.clang-tidy new file mode 100644 index 0000000000..595762be0d --- /dev/null +++ b/shared/wsl_compute_helper/.clang-tidy @@ -0,0 +1,3 @@ +--- +Checks: '-*' +...