Apply CamelCase for class and struct names 2/2

Additionally change .clang-tidy not to ignore struct names.

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-04-24 17:17:08 +00:00
committed by Compute-Runtime-Automation
parent e48bb5ad6a
commit 2022592f3d
122 changed files with 636 additions and 630 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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<size_t>(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<size_t2>(workGroupSize2));
return changeGetInfoStatusToCLResultType(info.set<SizeT2>(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<size_t3>(workGroupSize3));
return changeGetInfoStatusToCLResultType(info.set<SizeT3>(workGroupSize3));
}
}
case CL_KERNEL_MAX_NUM_SUB_GROUPS: {

View File

@@ -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;

View File

@@ -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<RootDeviceEnvironment> rootDeviceEnvironmentBackup;
};
struct api_tests : public ApiFixture<>,
public ::testing::Test {
struct ApiTests : public ApiFixture<>,
public ::testing::Test {
void SetUp() override {
ApiFixture::setUp();
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -16,7 +16,7 @@
using namespace NEO;
typedef api_tests ClCreateBufferTests;
using ClCreateBufferTests = ApiTests;
namespace ULT {

View File

@@ -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<int32_t>(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;

View File

@@ -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<MockPlatform>();
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<MockPlatform>();
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<MockPlatform>();
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<MockPlatform>();
auto platform2 = std::make_unique<MockPlatform>();
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<MockPlatform>();
auto platform2 = std::make_unique<MockPlatform>();
platform1->initializeWithNewDevices();
@@ -247,4 +247,4 @@ TEST_F(clCreateContextTests, GivenDevicesFromDifferentPlatformsWhenCreatingConte
EXPECT_EQ(CL_INVALID_DEVICE, retVal);
EXPECT_EQ(nullptr, clContext);
}
} // namespace ClCreateContextTests
} // namespace ULT

View File

@@ -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<MockProgram> pMockProg = std::make_unique<MockProgram>(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,

View File

@@ -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<ZebinTestData::ZebinCopyBufferSimdModule<numBits>>(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;

View File

@@ -17,7 +17,7 @@
using namespace NEO;
struct ClCreatePipeTests : api_tests {
struct ClCreatePipeTests : ApiTests {
VariableBackup<bool> supportsPipesBackup{&defaultHwInfo->capabilityTable.supportsPipes, true};
};

View File

@@ -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<ProgramFunctions::CreateFromILFunc> createFromIlBackup{&ProgramFunctions::createFromIL};
bool createFromIlCalled;

View File

@@ -22,7 +22,7 @@
using namespace NEO;
typedef api_tests ClCreateProgramWithBuiltInKernelsTests;
using ClCreateProgramWithBuiltInKernelsTests = ApiTests;
struct ClCreateProgramWithBuiltInVmeKernelsTests : ClCreateProgramWithBuiltInKernelsTests {
void SetUp() override {

View File

@@ -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,

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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,

View File

@@ -14,7 +14,7 @@
using namespace NEO;
typedef api_tests ClEnqueueCopyBufferToImageTests;
using ClEnqueueCopyBufferToImageTests = ApiTests;
namespace ULT {

View File

@@ -15,7 +15,7 @@
using namespace NEO;
typedef api_tests ClEnqueueCopyImageTests;
using ClEnqueueCopyImageTests = ApiTests;
namespace ULT {

View File

@@ -13,7 +13,7 @@
using namespace NEO;
typedef api_tests ClEnqueueCopyImageToBufferTests;
using ClEnqueueCopyImageToBufferTests = ApiTests;
namespace ULT {

View File

@@ -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;

View File

@@ -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<Image>(Image2dHelper<ImageUseHostPtr<Image2dDefaults>>::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<Image>(Image2dHelper<ImageUseHostPtr<Image2dDefaults>>::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<Image>(Image2dHelper<ImageUseHostPtr<Image2dDefaults>>::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<Image>(Image2dHelper<ImageUseHostPtr<Image2dDefaults>>::create(pContext));
uint32_t fillColor[4] = {0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc, 0xdddddddd};
size_t origin[3] = {0, 0, 0};

View File

@@ -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);

View File

@@ -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,

View File

@@ -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,

View File

@@ -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(

View File

@@ -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

View File

@@ -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};

View File

@@ -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,

View File

@@ -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) {

View File

@@ -14,7 +14,7 @@
using namespace NEO;
typedef api_tests ClEnqueueReadImageTests;
using ClEnqueueReadImageTests = ApiTests;
namespace ULT {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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<HelloWorldFixtureFactory> {
typedef HelloWorldTest<HelloWorldFixtureFactory> Parent;
@@ -31,7 +31,7 @@ struct EnqueueTaskWithRequiredWorkGroupSize : public HelloWorldTest<HelloWorldFi
namespace ULT {
TEST_F(clEnqueueTaskTests, GivenValidParametersWhenEnqueingTaskThenSuccessIsReturned) {
TEST_F(ClEnqueueTaskTests, GivenValidParametersWhenEnqueingTaskThenSuccessIsReturned) {
cl_uint numEventsInWaitList = 0;
cl_event *eventWaitList = nullptr;
cl_event *event = nullptr;

View File

@@ -15,7 +15,7 @@
using namespace NEO;
typedef api_tests ClEnqueueUnmapMemObjTests;
using ClEnqueueUnmapMemObjTests = ApiTests;
TEST_F(ClEnqueueUnmapMemObjTests, givenValidAddressWhenUnmappingThenReturnSuccess) {
auto buffer = std::unique_ptr<Buffer>(BufferHelper<BufferUseHostPtr<>>::create(pContext));

View File

@@ -31,7 +31,7 @@ struct ClEnqueueVerifyMemoryINTELSettings {
void *gpuAddress = expected;
};
class ClEnqueueVerifyMemoryIntelTests : public api_tests,
class ClEnqueueVerifyMemoryIntelTests : public ApiTests,
public ClEnqueueVerifyMemoryINTELSettings {
};

View File

@@ -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;

View File

@@ -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] = {};

View File

@@ -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(

View File

@@ -14,7 +14,7 @@
using namespace NEO;
typedef api_tests ClEnqueueWriteImageTests;
using ClEnqueueWriteImageTests = ApiTests;
namespace ULT {

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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<cl_device_id[]>(numDevices);
auto outputDevices = std::make_unique<cl_device_id[]>(numDevices);

View File

@@ -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;

View File

@@ -12,7 +12,7 @@
using namespace NEO;
using clGetDeviceInfoPvcAndLater = api_tests;
using clGetDeviceInfoPvcAndLater = ApiTests;
using matcherPvcAndLater = IsAtLeastXeHpcCore;
namespace ULT {
HWTEST2_F(clGetDeviceInfoPvcAndLater, givenClDeviceSupportedThreadArbitrationPolicyIntelWhenPvcAndLatereAndCallClGetDeviceInfoThenProperArrayIsReturned, matcherPvcAndLater) {

View File

@@ -16,7 +16,7 @@
using namespace NEO;
using clGetDeviceInfoTests = api_tests;
using clGetDeviceInfoTests = ApiTests;
namespace ULT {

View File

@@ -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<void *>(clIcdGetPlatformIDsKHR));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clCreateAcceleratorINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clCreateAcceleratorINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetAcceleratorInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetAcceleratorInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetAcceleratorInfoINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetAcceleratorInfoINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClRetainAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClRetainAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clRetainAcceleratorINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clRetainAcceleratorINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClReleaseAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClReleaseAcceleratorINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clReleaseAcceleratorINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clReleaseAcceleratorINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClCreatePerfCountersCommandQueueINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreatePerfCountersCommandQueueINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clCreatePerfCountersCommandQueueINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clCreatePerfCountersCommandQueueINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClSetPerformanceConfigurationINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClSetPerformanceConfigurationINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clSetPerformanceConfigurationINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clSetPerformanceConfigurationINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateBufferWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateBufferWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto functionPointer = clGetExtensionFunctionAddress("clCreateBufferWithPropertiesINTEL");
EXPECT_EQ(functionPointer, reinterpret_cast<void *>(clCreateBufferWithPropertiesINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateImageWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateImageWithPropertiesINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto functionPointer = clGetExtensionFunctionAddress("clCreateImageWithPropertiesINTEL");
EXPECT_EQ(functionPointer, reinterpret_cast<void *>(clCreateImageWithPropertiesINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, givenClAddCommentToAubIntelAsInputWhenFunctionIsCalledThenProperPointerIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, givenClAddCommentToAubIntelAsInputWhenFunctionIsCalledThenProperPointerIsReturned) {
auto functionPointer = clGetExtensionFunctionAddress("clAddCommentINTEL");
EXPECT_EQ(functionPointer, reinterpret_cast<void *>(clAddCommentINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClCreateTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClCreateTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clCreateTracingHandleINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clCreateTracingHandleINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClSetTracingPointINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClSetTracingPointINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clSetTracingPointINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clSetTracingPointINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClDestroyTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClDestroyTracingHandleINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clDestroyTracingHandleINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clDestroyTracingHandleINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClEnableTracingINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnableTracingINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clEnableTracingINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clEnableTracingINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClDisableTracingINTELLWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClDisableTracingINTELLWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clDisableTracingINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clDisableTracingINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetTracingStateINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetTracingStateINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetTracingStateINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetTracingStateINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClHostMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClHostMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clHostMemAllocINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clHostMemAllocINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClDeviceMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClDeviceMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clDeviceMemAllocINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clDeviceMemAllocINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClSharedMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClSharedMemAllocINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clSharedMemAllocINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clSharedMemAllocINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClMemFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClMemFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clMemFreeINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clMemFreeINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClMemBlockingFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClMemBlockingFreeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clMemBlockingFreeINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clMemBlockingFreeINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetMemAllocInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetMemAllocInfoINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetMemAllocInfoINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetMemAllocInfoINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClSetKernelArgMemPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClSetKernelArgMemPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clSetKernelArgMemPointerINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clSetKernelArgMemPointerINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemsetINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemsetINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clEnqueueMemsetINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clEnqueueMemsetINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemFillINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemFillINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clEnqueueMemFillINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clEnqueueMemFillINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemcpyINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemcpyINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clEnqueueMemcpyINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clEnqueueMemcpyINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMigrateMemINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMigrateMemINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clEnqueueMigrateMemINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clEnqueueMigrateMemINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueMemAdviseINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueMemAdviseINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clEnqueueMemAdviseINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clEnqueueMemAdviseINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetDeviceGlobalVariablePointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetDeviceGlobalVariablePointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetDeviceGlobalVariablePointerINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetDeviceGlobalVariablePointerINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetDeviceFunctionPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetDeviceFunctionPointerINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetDeviceFunctionPointerINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetDeviceFunctionPointerINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetKernelSuggestedLocalWorkSizeINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetKernelSuggestedLocalWorkSizeINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeKHRWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetKernelSuggestedLocalWorkSizeKHRWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetKernelSuggestedLocalWorkSizeKHR");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetKernelSuggestedLocalWorkSizeKHR));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClGetKernelMaxConcurrentWorkGroupCountINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClGetKernelMaxConcurrentWorkGroupCountINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clGetKernelMaxConcurrentWorkGroupCountINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clGetKernelMaxConcurrentWorkGroupCountINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenClEnqueueNDCountKernelINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenClEnqueueNDCountKernelINTELWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clEnqueueNDCountKernelINTEL");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clEnqueueNDCountKernelINTEL));
}
TEST_F(clGetExtensionFunctionAddressTests, GivenCSlSetProgramSpecializationConstantWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
TEST_F(ClGetExtensionFunctionAddressTests, GivenCSlSetProgramSpecializationConstantWhenGettingExtensionFunctionThenCorrectAddressIsReturned) {
auto retVal = clGetExtensionFunctionAddress("clSetProgramSpecializationConstant");
EXPECT_EQ(retVal, reinterpret_cast<void *>(clSetProgramSpecializationConstant));
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {

View File

@@ -13,7 +13,7 @@
using namespace NEO;
using clGetKernelSuggestedLocalWorkSizeTests = api_tests;
using clGetKernelSuggestedLocalWorkSizeTests = ApiTests;
namespace ULT {

View File

@@ -13,7 +13,7 @@
using namespace NEO;
using clGetKernelSuggestedLocalWorkSizeKHRTests = api_tests;
using clGetKernelSuggestedLocalWorkSizeKHRTests = ApiTests;
namespace ULT {

View File

@@ -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;

View File

@@ -13,7 +13,7 @@
using namespace NEO;
struct ClGetPipeInfoTests : api_tests {
struct ClGetPipeInfoTests : ApiTests {
VariableBackup<bool> supportsPipesBackup{&defaultHwInfo->capabilityTable.supportsPipes, true};
};

View File

@@ -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;

View File

@@ -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<char[]> 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);

View File

@@ -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<char[]> 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};

View File

@@ -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<cl_context>(device);

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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<T> asVec(const uint8_t *src, size_t size) {
return std::vector<T>(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;

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -12,7 +12,7 @@
using namespace NEO;
typedef api_tests ClCreateBufferTests;
using ClCreateBufferTests = ApiTests;
namespace ULT {

View File

@@ -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);

View File

@@ -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;

View File

@@ -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();

View File

@@ -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<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));

View File

@@ -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 {

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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{};

View File

@@ -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) {

View File

@@ -14,7 +14,7 @@
using namespace NEO;
typedef api_tests clGetPlatformIDsTests;
using ClGetPlatformIDsTests = ApiTests;
TEST(clGetPlatformIDsMultiPlatformTest, whenCreateDevicesWithDifferentProductFamilyThenClGetPlatformIdsCreatesMultiplePlatformsProperlySorted) {

Some files were not shown because too many files have changed in this diff Show More