ULT renaming: Device OS tests

Related-To: NEO-2236

Change-Id: I4cf9ca855b8c06f2cece5f91b8cff5b10d39afaf
Signed-off-by: Adam Cetnerowski <adam.cetnerowski@intel.com>
This commit is contained in:
Adam Cetnerowski 2020-06-29 15:21:12 +02:00 committed by sys_ocldev
parent 489521da97
commit 80b983d6d2
2 changed files with 8 additions and 8 deletions

View File

@ -41,7 +41,7 @@ TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCo
delete pClDevice;
}
TEST(DeviceOsTest, supportedSimultaneousInterops) {
TEST(DeviceOsTest, WhenDeviceIsCreatedThenSimultaneousInteropsIsSupported) {
auto pDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
std::vector<unsigned int> expected = {0};
@ -49,14 +49,14 @@ TEST(DeviceOsTest, supportedSimultaneousInterops) {
EXPECT_TRUE(pDevice->simultaneousInterops == expected);
}
TEST(DeviceOsTest, DeviceCreationFail) {
TEST(DeviceOsTest, GivenFailedDeviceWhenCreatingDeviceThenNullIsReturned) {
auto hwInfo = defaultHwInfo.get();
auto pDevice = MockDevice::createWithNewExecutionEnvironment<FailDevice>(hwInfo);
EXPECT_THAT(pDevice, nullptr);
}
TEST(ApiOsTest, notSupportedApiTokens) {
TEST(ApiOsTest, GivenUnupportedApiTokensWhenGettingInfoThenInvalidValueErrorIsReturned) {
MockContext context;
MockBuffer buffer;
@ -70,7 +70,7 @@ TEST(ApiOsTest, notSupportedApiTokens) {
EXPECT_EQ(CL_INVALID_VALUE, retVal);
}
TEST(ApiOsTest, notSupportedApiList) {
TEST(ApiOsTest, GivenUnsupportedApiWhenGettingDispatchThenNullIsReturned) {
MockContext context;
EXPECT_EQ(nullptr, context.dispatch.crtDispatch->clGetDeviceIDsFromDX9INTEL);
@ -98,7 +98,7 @@ TEST(ApiOsTest, notSupportedApiList) {
EXPECT_EQ(nullptr, context.dispatch.icdDispatch->clEnqueueReleaseD3D11ObjectsKHR);
}
TEST(DeviceOsTest, DeviceCreationFailMidThreadPreemption) {
TEST(DeviceOsTest, GivenMidThreadPreemptionAndFailedDeviceWhenCreatingDeviceThenNullIsReturned) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.ForcePreemptionMode.set(static_cast<int32_t>(PreemptionMode::MidThread));
auto pDevice = MockDevice::createWithNewExecutionEnvironment<FailDeviceAfterOne>(defaultHwInfo.get());

View File

@ -38,7 +38,7 @@ TEST(DeviceOsTest, GivenDefaultClDeviceWhenCheckingForOsSpecificExtensionsThenCo
delete pClDevice;
}
TEST(DeviceOsTest, supportedSimultaneousInterops) {
TEST(DeviceOsTest, WhenCreatingDeviceThenSimultaneousInteropsIsSupported) {
auto pDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
std::vector<unsigned int> expected = {CL_GL_CONTEXT_KHR,
@ -56,14 +56,14 @@ TEST(DeviceOsTest, supportedSimultaneousInterops) {
EXPECT_TRUE(pDevice->simultaneousInterops == expected);
}
TEST(DeviceOsTest, DeviceCreationFail) {
TEST(DeviceOsTest, GivenFailedDeviceWhenCreatingWithNewExecutionEnvironmentThenNullIsReturned) {
auto hwInfo = defaultHwInfo.get();
auto pDevice = MockDevice::createWithNewExecutionEnvironment<FailDevice>(hwInfo);
EXPECT_THAT(pDevice, nullptr);
}
TEST(DeviceOsTest, DeviceCreationFailMidThreadPreemption) {
TEST(DeviceOsTest, GivenMidThreadPreemptionAndFailedDeviceWhenCreatingDeviceThenNullIsReturned) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.ForcePreemptionMode.set(static_cast<int32_t>(PreemptionMode::MidThread));
auto pDevice = MockDevice::createWithNewExecutionEnvironment<FailDeviceAfterOne>(defaultHwInfo.get());