Rename HwInfoConfig to ProductHelper

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-12-12 16:43:41 +00:00
committed by Compute-Runtime-Automation
parent a1cf7fb938
commit 232b886056
394 changed files with 1818 additions and 1787 deletions

View File

@@ -302,7 +302,7 @@ HWTEST_F(DrmDebugPrelimTest, givenAddedBindExtHandlesInBoWhenUnbindingThenExtens
EXPECT_NE(0u, drm.context.receivedVmBind.value().extensions);
bo.unbind(&osContext, 0);
if (HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported()) {
if (ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported()) {
EXPECT_NE(0u, drm.context.receivedVmUnbind.value().extensions);
} else {
EXPECT_EQ(0u, drm.context.receivedVmUnbind.value().extensions);

View File

@@ -3786,7 +3786,7 @@ TEST_F(DrmAllocationTests, givenDrmAllocationWhenCacheRegionIsSetSuccessfullyThe
MockDrmAllocation allocation(AllocationType::BUFFER, MemoryPool::LocalMemory);
if ((GfxCoreHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getNumCacheRegions() == 0) &&
HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported()) {
ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported()) {
EXPECT_ANY_THROW(allocation.setCacheAdvice(&drm, 1024, CacheRegion::Region1));
} else {
EXPECT_TRUE(allocation.setCacheAdvice(&drm, 1024, CacheRegion::Region1));
@@ -3803,7 +3803,7 @@ TEST_F(DrmAllocationTests, givenDrmAllocationWhenCacheRegionIsSetSuccessfullyThe
allocation.bufferObjects[0] = &bo;
if ((GfxCoreHelper::get(defaultHwInfo->platform.eRenderCoreFamily).getNumCacheRegions() == 0) &&
HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported()) {
ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported()) {
EXPECT_ANY_THROW(allocation.setCacheAdvice(&drm, 1024, CacheRegion::Region1));
} else {
EXPECT_TRUE(allocation.setCacheAdvice(&drm, 1024, CacheRegion::Region1));
@@ -5155,7 +5155,7 @@ TEST_F(DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest, givenPatIndex
auto drmAllocation = static_cast<DrmAllocation *>(allocation);
ASSERT_NE(nullptr, drmAllocation->getBO());
auto isVmBindPatIndexProgrammingSupported = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported();
auto isVmBindPatIndexProgrammingSupported = ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported();
EXPECT_EQ(isVmBindPatIndexProgrammingSupported, mock->isVmBindPatIndexProgrammingSupported());
@@ -5186,7 +5186,7 @@ TEST_F(DrmMemoryManagerWithLocalMemoryAndExplicitExpectationsTest, givenCompress
auto drmAllocation = static_cast<DrmAllocation *>(allocation);
ASSERT_NE(nullptr, drmAllocation->getBO());
auto isVmBindPatIndexProgrammingSupported = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported();
auto isVmBindPatIndexProgrammingSupported = ProductHelper::get(defaultHwInfo->platform.eProductFamily)->isVmBindPatIndexProgrammingSupported();
if (isVmBindPatIndexProgrammingSupported) {
auto mockClientContext = static_cast<MockGmmClientContextBase *>(executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->getGmmClientContext());

View File

@@ -877,10 +877,10 @@ HWTEST_F(DrmMemoryOperationsHandlerBindTest, givenPatIndexProgrammingEnabledWhen
csr->setupContext(*osContext);
auto &gfxCoreHelper = GfxCoreHelper::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eRenderCoreFamily);
auto hwInfoConfig = HwInfoConfig::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily);
auto productHelper = ProductHelper::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily);
bool closSupported = (gfxCoreHelper.getNumCacheRegions() > 0);
bool patIndexProgrammingSupported = hwInfoConfig->isVmBindPatIndexProgrammingSupported();
bool patIndexProgrammingSupported = productHelper->isVmBindPatIndexProgrammingSupported();
uint64_t gpuAddress = 0x123000;
size_t size = 1;
@@ -936,9 +936,9 @@ HWTEST_F(DrmMemoryOperationsHandlerBindTest, givenPatIndexErrorAndUncachedDebugF
auto osContext = memoryManager->createAndRegisterOsContext(csr.get(), EngineDescriptorHelper::getDefaultDescriptor());
csr->setupContext(*osContext);
auto &gfxCoreHelper = GfxCoreHelper::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eRenderCoreFamily);
auto hwInfoConfig = HwInfoConfig::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily);
auto productHelper = ProductHelper::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily);
bool closSupported = (gfxCoreHelper.getNumCacheRegions() > 0);
bool patIndexProgrammingSupported = hwInfoConfig->isVmBindPatIndexProgrammingSupported();
bool patIndexProgrammingSupported = productHelper->isVmBindPatIndexProgrammingSupported();
if (!closSupported || !patIndexProgrammingSupported) {
GTEST_SKIP();
}
@@ -964,9 +964,9 @@ HWTEST_F(DrmMemoryOperationsHandlerBindTest, givenUncachedDebugFlagSetWhenVmBind
auto timestampStorageAlloc = csr->getTimestampPacketAllocator()->getTag()->getBaseGraphicsAllocation()->getDefaultGraphicsAllocation();
auto hwInfoConfig = HwInfoConfig::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily);
auto productHelper = ProductHelper::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily);
if (!hwInfoConfig->isVmBindPatIndexProgrammingSupported()) {
if (!productHelper->isVmBindPatIndexProgrammingSupported()) {
GTEST_SKIP();
}
@@ -1152,11 +1152,11 @@ TEST(DrmResidencyHandlerTests, givenDebugFlagUseVmBindSetDefaultAndBindAvailable
EXPECT_FALSE(drm.bindAvailable);
auto hwInfo = drm.getRootDeviceEnvironment().getHardwareInfo();
auto hwInfoConfig = HwInfoConfig::get(hwInfo->platform.eProductFamily);
auto productHelper = ProductHelper::get(hwInfo->platform.eProductFamily);
EXPECT_EQ(0u, drm.context.vmBindQueryCalled);
EXPECT_EQ(drm.isVmBindAvailable(), hwInfoConfig->isNewResidencyModelSupported());
EXPECT_EQ(drm.bindAvailable, hwInfoConfig->isNewResidencyModelSupported());
EXPECT_EQ(drm.isVmBindAvailable(), productHelper->isNewResidencyModelSupported());
EXPECT_EQ(drm.bindAvailable, productHelper->isNewResidencyModelSupported());
EXPECT_EQ(1u, drm.context.vmBindQueryCalled);
}
@@ -1250,7 +1250,7 @@ TEST(DrmResidencyHandlerTests, whenQueryingForSetPairAvailableAndVmBindAvailable
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
DrmQueryMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
auto hwInfo = drm.getRootDeviceEnvironment().getHardwareInfo();
auto hwInfoConfig = HwInfoConfig::get(hwInfo->platform.eProductFamily);
auto productHelper = ProductHelper::get(hwInfo->platform.eProductFamily);
drm.context.setPairQueryValue = 1;
drm.context.setPairQueryReturn = 0;
@@ -1268,8 +1268,8 @@ TEST(DrmResidencyHandlerTests, whenQueryingForSetPairAvailableAndVmBindAvailable
EXPECT_EQ(1u, drm.context.setPairQueryCalled);
EXPECT_EQ(0u, drm.context.vmBindQueryCalled);
EXPECT_EQ(drm.isVmBindAvailable(), hwInfoConfig->isNewResidencyModelSupported());
EXPECT_EQ(drm.bindAvailable, hwInfoConfig->isNewResidencyModelSupported());
EXPECT_EQ(drm.isVmBindAvailable(), productHelper->isNewResidencyModelSupported());
EXPECT_EQ(drm.bindAvailable, productHelper->isNewResidencyModelSupported());
EXPECT_EQ(1u, drm.context.vmBindQueryCalled);
}

View File

@@ -563,7 +563,7 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenFailOnInitializationAndPlat
DebugManager.flags.PrintDebugMessages.set(false);
std::string output = testing::internal::GetCapturedStderr();
if (HwInfoConfig::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily)->isPlatformQuerySupported()) {
if (ProductHelper::get(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->platform.eProductFamily)->isPlatformQuerySupported()) {
EXPECT_STRNE(output.c_str(), "");
} else {
EXPECT_STREQ(output.c_str(), "");

View File

@@ -20,85 +20,85 @@
using namespace NEO;
struct ProductHelperTestLinux : HwInfoConfigTestLinux {
struct MockProductHelperTestLinux : ProductHelperTestLinux {
void SetUp() override {
HwInfoConfigTestLinux::SetUp();
ProductHelperTestLinux::SetUp();
testPlatform->eRenderCoreFamily = defaultHwInfo->platform.eRenderCoreFamily;
hwInfoConfigFactoryBackup = &productHelper;
productHelperFactoryBackup = &productHelper;
}
void TearDown() override {
HwInfoConfigTestLinux::TearDown();
ProductHelperTestLinux::TearDown();
}
VariableBackup<HwInfoConfig *> hwInfoConfigFactoryBackup{&NEO::hwInfoConfigFactory[static_cast<size_t>(IGFX_UNKNOWN)]};
MockHwInfoConfigHw<IGFX_UNKNOWN> productHelper;
VariableBackup<ProductHelper *> productHelperFactoryBackup{&NEO::productHelperFactory[static_cast<size_t>(IGFX_UNKNOWN)]};
MockProductHelperHw<IGFX_UNKNOWN> mockProductHelper;
};
TEST_F(ProductHelperTestLinux, GivenDummyConfigWhenConfiguringHwInfoThenSucceeds) {
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
TEST_F(MockProductHelperTestLinux, GivenDummyConfigWhenConfiguringHwInfoThenSucceeds) {
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
}
HWTEST2_F(ProductHelperTestLinux, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenIgnore, IsAtMostGen11) {
HWTEST2_F(MockProductHelperTestLinux, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenIgnore, IsAtMostGen11) {
DebugManagerStateRestore restore{};
HardwareInfo hardwareInfo = *defaultHwInfo;
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
productHelper.configureHardwareCustom(&hardwareInfo, nullptr);
mockProductHelper.configureHardwareCustom(&hardwareInfo, nullptr);
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
}
HWTEST2_F(ProductHelperTestLinux, givenUnsupportedChipsetUniqueUUIDWhenGettingUuidThenReturnFalse, IsAtMostGen11) {
HWTEST2_F(MockProductHelperTestLinux, givenUnsupportedChipsetUniqueUUIDWhenGettingUuidThenReturnFalse, IsAtMostGen11) {
HardwareInfo hardwareInfo = *defaultHwInfo;
auto hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
std::array<uint8_t, HwInfoConfig::uuidSize> id;
EXPECT_FALSE(hwInfoConfig->getUuid(nullptr, id));
auto productHelper = ProductHelper::get(hardwareInfo.platform.eProductFamily);
std::array<uint8_t, ProductHelper::uuidSize> id;
EXPECT_FALSE(productHelper->getUuid(nullptr, id));
}
TEST_F(ProductHelperTestLinux, GivenDummyConfigThenEdramIsDetected) {
productHelper.use128MbEdram = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
TEST_F(MockProductHelperTestLinux, GivenDummyConfigThenEdramIsDetected) {
mockProductHelper.use128MbEdram = true;
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(1u, outHwInfo.featureTable.flags.ftrEDram);
}
TEST_F(ProductHelperTestLinux, givenEnabledPlatformCoherencyWhenConfiguringHwInfoThenIgnoreAndSetAsDisabled) {
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
TEST_F(MockProductHelperTestLinux, givenEnabledPlatformCoherencyWhenConfiguringHwInfoThenIgnoreAndSetAsDisabled) {
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_FALSE(outHwInfo.capabilityTable.ftrSupportsCoherency);
}
TEST_F(ProductHelperTestLinux, givenDisabledPlatformCoherencyWhenConfiguringHwInfoThenSetValidCapability) {
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
TEST_F(MockProductHelperTestLinux, givenDisabledPlatformCoherencyWhenConfiguringHwInfoThenSetValidCapability) {
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_FALSE(outHwInfo.capabilityTable.ftrSupportsCoherency);
}
TEST_F(ProductHelperTestLinux, GivenFailGetEuCountWhenConfiguringHwInfoThenFails) {
TEST_F(MockProductHelperTestLinux, GivenFailGetEuCountWhenConfiguringHwInfoThenFails) {
drm->storedRetValForEUVal = -4;
drm->failRetTopology = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(-4, ret);
}
TEST_F(ProductHelperTestLinux, GivenFailGetSsCountWhenConfiguringHwInfoThenFails) {
TEST_F(MockProductHelperTestLinux, GivenFailGetSsCountWhenConfiguringHwInfoThenFails) {
drm->storedRetValForSSVal = -5;
drm->failRetTopology = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(-5, ret);
}
TEST_F(ProductHelperTestLinux, whenFailGettingTopologyThenFallbackToEuCountIoctl) {
TEST_F(MockProductHelperTestLinux, whenFailGettingTopologyThenFallbackToEuCountIoctl) {
drm->failRetTopology = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_NE(-1, ret);
}
TEST_F(ProductHelperTestLinux, givenInvalidTopologyDataWhenConfiguringThenReturnError) {
TEST_F(MockProductHelperTestLinux, givenInvalidTopologyDataWhenConfiguringThenReturnError) {
auto storedSVal = drm->storedSVal;
auto storedSSVal = drm->storedSSVal;
auto storedEUVal = drm->storedEUVal;
@@ -134,62 +134,62 @@ TEST_F(ProductHelperTestLinux, givenInvalidTopologyDataWhenConfiguringThenReturn
}
}
TEST_F(ProductHelperTestLinux, GivenFailingCustomConfigWhenConfiguringHwInfoThenFails) {
productHelper.failOnConfigureHardwareCustom = true;
TEST_F(MockProductHelperTestLinux, GivenFailingCustomConfigWhenConfiguringHwInfoThenFails) {
mockProductHelper.failOnConfigureHardwareCustom = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(-1, ret);
}
TEST_F(ProductHelperTestLinux, whenConfigureHwInfoIsCalledThenAreNonPersistentContextsSupportedReturnsTrue) {
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
TEST_F(MockProductHelperTestLinux, whenConfigureHwInfoIsCalledThenAreNonPersistentContextsSupportedReturnsTrue) {
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_TRUE(drm->areNonPersistentContextsSupported());
}
TEST_F(ProductHelperTestLinux, whenConfigureHwInfoIsCalledAndPersitentContextIsUnsupportedThenAreNonPersistentContextsSupportedReturnsFalse) {
TEST_F(MockProductHelperTestLinux, whenConfigureHwInfoIsCalledAndPersitentContextIsUnsupportedThenAreNonPersistentContextsSupportedReturnsFalse) {
drm->storedPersistentContextsSupport = 0;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_FALSE(drm->areNonPersistentContextsSupported());
}
HWTEST_F(ProductHelperTestLinux, GivenPreemptionDrmEnabledMidThreadOnWhenConfiguringHwInfoThenPreemptionIsSupported) {
HWTEST_F(MockProductHelperTestLinux, GivenPreemptionDrmEnabledMidThreadOnWhenConfiguringHwInfoThenPreemptionIsSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
drm->storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
productHelper.enableMidThreadPreemption = true;
mockProductHelper.enableMidThreadPreemption = true;
UnitTestHelper<FamilyType>::setExtraMidThreadPreemptionFlag(pInHwInfo, true);
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::MidThread, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_TRUE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, GivenPreemptionDrmEnabledThreadGroupOnWhenConfiguringHwInfoThenPreemptionIsSupported) {
TEST_F(MockProductHelperTestLinux, GivenPreemptionDrmEnabledThreadGroupOnWhenConfiguringHwInfoThenPreemptionIsSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
drm->storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
productHelper.enableThreadGroupPreemption = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
mockProductHelper.enableThreadGroupPreemption = true;
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::ThreadGroup, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_TRUE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, givenDebugFlagSetWhenConfiguringHwInfoThenPrintGetParamIoctlsOutput) {
TEST_F(MockProductHelperTestLinux, givenDebugFlagSetWhenConfiguringHwInfoThenPrintGetParamIoctlsOutput) {
DebugManagerStateRestore restore;
DebugManager.flags.PrintIoctlEntries.set(true);
testing::internal::CaptureStdout(); // start capturing
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
std::array<std::string, 1> expectedStrings = {{"DRM_IOCTL_I915_GETPARAM: param: I915_PARAM_HAS_SCHEDULER, output value: 7, retCode: 0"
@@ -205,143 +205,143 @@ TEST_F(ProductHelperTestLinux, givenDebugFlagSetWhenConfiguringHwInfoThenPrintGe
EXPECT_EQ(std::string::npos, output.find("UNKNOWN"));
}
TEST_F(ProductHelperTestLinux, GivenPreemptionDrmEnabledMidBatchOnWhenConfiguringHwInfoThenPreemptionIsSupported) {
TEST_F(MockProductHelperTestLinux, GivenPreemptionDrmEnabledMidBatchOnWhenConfiguringHwInfoThenPreemptionIsSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
drm->storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
productHelper.enableMidBatchPreemption = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
mockProductHelper.enableMidBatchPreemption = true;
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::MidBatch, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_TRUE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, WhenConfiguringHwInfoThenPreemptionIsSupportedPreemptionDrmEnabledNoPreemptionWhenConfiguringHwInfoThenPreemptionIsNotSupported) {
TEST_F(MockProductHelperTestLinux, WhenConfiguringHwInfoThenPreemptionIsSupportedPreemptionDrmEnabledNoPreemptionWhenConfiguringHwInfoThenPreemptionIsNotSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
drm->storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::Disabled, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_TRUE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, GivenPreemptionDrmDisabledAllPreemptionWhenConfiguringHwInfoThenPreemptionIsNotSupported) {
TEST_F(MockProductHelperTestLinux, GivenPreemptionDrmDisabledAllPreemptionWhenConfiguringHwInfoThenPreemptionIsNotSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::MidThread;
drm->storedPreemptionSupport = 0;
productHelper.enableMidThreadPreemption = true;
productHelper.enableMidBatchPreemption = true;
productHelper.enableThreadGroupPreemption = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
productHelper.enableMidThreadPreemption = true;
mockProductHelper.enableMidThreadPreemption = true;
mockProductHelper.enableMidBatchPreemption = true;
mockProductHelper.enableThreadGroupPreemption = true;
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
mockProductHelper.enableMidThreadPreemption = true;
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::Disabled, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_FALSE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, GivenPreemptionDrmEnabledAllPreemptionDriverThreadGroupWhenConfiguringHwInfoThenPreemptionIsSupported) {
TEST_F(MockProductHelperTestLinux, GivenPreemptionDrmEnabledAllPreemptionDriverThreadGroupWhenConfiguringHwInfoThenPreemptionIsSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::ThreadGroup;
drm->storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
productHelper.enableMidBatchPreemption = true;
productHelper.enableThreadGroupPreemption = true;
productHelper.enableMidThreadPreemption = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
mockProductHelper.enableMidBatchPreemption = true;
mockProductHelper.enableThreadGroupPreemption = true;
mockProductHelper.enableMidThreadPreemption = true;
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::ThreadGroup, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_TRUE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, GivenPreemptionDrmEnabledAllPreemptionDriverMidBatchWhenConfiguringHwInfoThenPreemptionIsSupported) {
TEST_F(MockProductHelperTestLinux, GivenPreemptionDrmEnabledAllPreemptionDriverMidBatchWhenConfiguringHwInfoThenPreemptionIsSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::MidBatch;
drm->storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
productHelper.enableMidBatchPreemption = true;
productHelper.enableThreadGroupPreemption = true;
productHelper.enableMidThreadPreemption = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
mockProductHelper.enableMidBatchPreemption = true;
mockProductHelper.enableThreadGroupPreemption = true;
mockProductHelper.enableMidThreadPreemption = true;
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::MidBatch, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_TRUE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, GivenConfigPreemptionDrmEnabledAllPreemptionDriverDisabledWhenConfiguringHwInfoThenPreemptionIsSupported) {
TEST_F(MockProductHelperTestLinux, GivenConfigPreemptionDrmEnabledAllPreemptionDriverDisabledWhenConfiguringHwInfoThenPreemptionIsSupported) {
pInHwInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::Disabled;
drm->storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
productHelper.enableMidBatchPreemption = true;
productHelper.enableThreadGroupPreemption = true;
productHelper.enableMidThreadPreemption = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
mockProductHelper.enableMidBatchPreemption = true;
mockProductHelper.enableThreadGroupPreemption = true;
mockProductHelper.enableMidThreadPreemption = true;
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(PreemptionMode::Disabled, outHwInfo.capabilityTable.defaultPreemptionMode);
EXPECT_TRUE(drm->isPreemptionSupported());
}
TEST_F(ProductHelperTestLinux, givenPlatformEnabledFtrCompressionWhenInitializingThenFlagsAreSet) {
TEST_F(MockProductHelperTestLinux, givenPlatformEnabledFtrCompressionWhenInitializingThenFlagsAreSet) {
pInHwInfo.capabilityTable.ftrRenderCompressedImages = true;
pInHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
}
TEST_F(ProductHelperTestLinux, givenPointerToHwInfoWhenConfigureHwInfoCalledThenRequiedSurfaceSizeIsSettedProperly) {
TEST_F(MockProductHelperTestLinux, givenPointerToHwInfoWhenConfigureHwInfoCalledThenRequiedSurfaceSizeIsSettedProperly) {
EXPECT_EQ(MemoryConstants::pageSize, pInHwInfo.capabilityTable.requiredPreemptionSurfaceSize);
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
auto expectedSize = static_cast<size_t>(outHwInfo.gtSystemInfo.CsrSizeInMb * MemoryConstants::megaByte);
GfxCoreHelper::get(outHwInfo.platform.eRenderCoreFamily).adjustPreemptionSurfaceSize(expectedSize);
EXPECT_EQ(expectedSize, outHwInfo.capabilityTable.requiredPreemptionSurfaceSize);
}
TEST_F(ProductHelperTestLinux, givenInstrumentationForHardwareIsEnabledOrDisabledWhenConfiguringHwInfoThenOverrideItUsingHaveInstrumentation) {
TEST_F(MockProductHelperTestLinux, givenInstrumentationForHardwareIsEnabledOrDisabledWhenConfiguringHwInfoThenOverrideItUsingHaveInstrumentation) {
int ret;
pInHwInfo.capabilityTable.instrumentationEnabled = false;
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
ASSERT_EQ(0, ret);
EXPECT_FALSE(outHwInfo.capabilityTable.instrumentationEnabled);
pInHwInfo.capabilityTable.instrumentationEnabled = true;
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
ASSERT_EQ(0, ret);
EXPECT_TRUE(outHwInfo.capabilityTable.instrumentationEnabled);
}
TEST_F(ProductHelperTestLinux, givenGttSizeReturnedWhenInitializingHwInfoThenSetSvmFtr) {
TEST_F(MockProductHelperTestLinux, givenGttSizeReturnedWhenInitializingHwInfoThenSetSvmFtr) {
drm->storedGTTSize = MemoryConstants::max64BitAppAddress;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_FALSE(outHwInfo.capabilityTable.ftrSvm);
drm->storedGTTSize = MemoryConstants::max64BitAppAddress + 1;
ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_TRUE(outHwInfo.capabilityTable.ftrSvm);
}
TEST_F(ProductHelperTestLinux, givenGttSizeReturnedWhenInitializingHwInfoThenSetGpuAddressSpace) {
TEST_F(MockProductHelperTestLinux, givenGttSizeReturnedWhenInitializingHwInfoThenSetGpuAddressSpace) {
drm->storedGTTSize = maxNBitValue(40) + 1;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_EQ(drm->storedGTTSize - 1, outHwInfo.capabilityTable.gpuAddressSpace);
}
TEST_F(ProductHelperTestLinux, givenFailingGttSizeIoctlWhenInitializingHwInfoThenSetDefaultValues) {
TEST_F(MockProductHelperTestLinux, givenFailingGttSizeIoctlWhenInitializingHwInfoThenSetDefaultValues) {
drm->storedRetValForGetGttSize = -1;
int ret = productHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
int ret = mockProductHelper.configureHwInfoDrm(&pInHwInfo, &outHwInfo, *executionEnvironment->rootDeviceEnvironments[0].get());
EXPECT_EQ(0, ret);
EXPECT_TRUE(outHwInfo.capabilityTable.ftrSvm);

View File

@@ -17,7 +17,7 @@
using namespace NEO;
struct HwInfoConfigTestLinux : public HwInfoConfigTest {
struct ProductHelperTestLinux : public ProductHelperTest {
static void mockCpuidex(int *cpuInfo, int functionId, int subfunctionId) {
if (subfunctionId == 0) {
cpuInfo[0] = 0x7F;
@@ -31,7 +31,7 @@ struct HwInfoConfigTestLinux : public HwInfoConfigTest {
}
void SetUp() override {
HwInfoConfigTest::SetUp();
ProductHelperTest::SetUp();
executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get());
@@ -51,7 +51,7 @@ struct HwInfoConfigTestLinux : public HwInfoConfigTest {
void TearDown() override {
CpuInfo::cpuidexFunc = rt_cpuidex_func;
HwInfoConfigTest::TearDown();
ProductHelperTest::TearDown();
}
template <typename HelperType>

View File

@@ -137,7 +137,7 @@ HWTEST2_F(MultipleDeviceUuidTest, whenRetrievingDeviceUuidThenCorrectUuidIsRecei
std::array<uint8_t, 16> uuid;
uint8_t expectedUuid[16] = {};
std::memcpy(expectedUuid, &expectedVal, sizeof(expectedVal));
EXPECT_EQ(true, HwInfoConfig::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_EQ(true, ProductHelper::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_TRUE(0 == std::memcmp(uuid.data(), expectedUuid, sizeof(expectedUuid)));
uint32_t subDeviceCount = numSubDevices;
@@ -148,7 +148,7 @@ HWTEST2_F(MultipleDeviceUuidTest, whenRetrievingDeviceUuidThenCorrectUuidIsRecei
uint8_t expectedUuid[16] = {0};
std::memcpy(expectedUuid, &expectedVal, sizeof(expectedVal));
expectedUuid[15] = i + 1;
EXPECT_EQ(true, HwInfoConfig::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_EQ(true, ProductHelper::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_TRUE(0 == std::memcmp(uuid.data(), expectedUuid, sizeof(expectedUuid)));
}
}
@@ -243,7 +243,7 @@ HWTEST2_F(MultipleDeviceUuidTest, whenRetrievingDeviceUuidThenCorrectUuidIsRecei
std::array<uint8_t, 16> uuid;
uint8_t expectedUuid[16] = {};
std::memcpy(expectedUuid, &expectedVal, sizeof(expectedVal));
EXPECT_EQ(true, HwInfoConfig::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_EQ(true, ProductHelper::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_TRUE(0 == std::memcmp(uuid.data(), expectedUuid, sizeof(expectedUuid)));
uint32_t subDeviceCount = numSubDevices;
@@ -254,7 +254,7 @@ HWTEST2_F(MultipleDeviceUuidTest, whenRetrievingDeviceUuidThenCorrectUuidIsRecei
uint8_t expectedUuid[16] = {0};
std::memcpy(expectedUuid, &expectedVal, sizeof(expectedVal));
expectedUuid[15] = i + 1;
EXPECT_EQ(true, HwInfoConfig::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_EQ(true, ProductHelper::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_TRUE(0 == std::memcmp(uuid.data(), expectedUuid, sizeof(expectedUuid)));
}
}
@@ -289,7 +289,7 @@ HWTEST2_F(MultipleDeviceUuidTest, givenTelemDirectoriesAreLessThanExpectedWhenRe
subDevices = devices[0]->getSubDevices();
for (auto i = 0u; i < subDeviceCount; i++) {
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(subDevices[i], uuid));
}
}
@@ -351,7 +351,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenMissingGuidWhenRetrievingUuidForSubDevice
subDevices = devices[0]->getSubDevices();
for (auto i = 0u; i < subDeviceCount; i++) {
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(subDevices[i], uuid));
}
}
@@ -397,7 +397,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenIncorrectGuidWhenRetrievingUuidForSubDevi
subDevices = devices[0]->getSubDevices();
for (auto i = 0u; i < subDeviceCount; i++) {
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(subDevices[i], uuid));
}
}
@@ -453,7 +453,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenMissingOffsetWhenRetrievingUuidForSubDevi
subDevices = devices[0]->getSubDevices();
for (auto i = 0u; i < subDeviceCount; i++) {
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(subDevices[i], uuid));
}
}
@@ -508,7 +508,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenIncorrectOffsetWhenRetrievingUuidForSubDe
subDevices = devices[0]->getSubDevices();
for (auto i = 0u; i < subDeviceCount; i++) {
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(subDevices[i], uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(subDevices[i], uuid));
}
}
@@ -560,7 +560,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenMissingTelemNodeWhenRetrievingUuidThenFai
});
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(devices[0].get(), uuid));
}
HWTEST2_F(MultipleDeviceUuidTest, GivenIncorrectTelemNodeWhenRetrievingUuidThenFailureIsReturned, IsXEHP) {
@@ -612,7 +612,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenIncorrectTelemNodeWhenRetrievingUuidThenF
});
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(devices[0].get(), uuid));
}
HWTEST2_F(MultipleDeviceUuidTest, GivenIncorrectGuidValueWhenRetrievingUuidThenFailureIsReturned, IsXEHP) {
@@ -665,7 +665,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenIncorrectGuidValueWhenRetrievingUuidThenF
});
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(devices[0].get(), uuid));
}
HWTEST2_F(MultipleDeviceUuidTest, GivenDeviceLinkIsNotAvailableWhenRetrievingUuidForRootDeviceThenFailureIsReturned, IsXEHP) {
@@ -683,7 +683,7 @@ HWTEST2_F(MultipleDeviceUuidTest, GivenDeviceLinkIsNotAvailableWhenRetrievingUui
});
std::array<uint8_t, 16> uuid;
EXPECT_EQ(false, HwInfoConfig::get(productFamily)->getUuid(devices[0].get(), uuid));
EXPECT_EQ(false, ProductHelper::get(productFamily)->getUuid(devices[0].get(), uuid));
}
TEST(PmtUtilTest, givenDataPtrIsNullWhenPmtUtilReadTelemIsCalledThenVerifyZeroIsReturned) {
@@ -736,7 +736,7 @@ HWTEST2_F(SysfsBasedUuidTest, whenRetrievingDeviceUuidThenCorrectUuidIsReceived,
// Prepare expected Uuid value
const uint64_t expectedUuidValue = 0x6769df256e271362;
std::array<uint8_t, 16> uuid;
EXPECT_TRUE(HwInfoConfig::get(productFamily)->getUuid(device, uuid));
EXPECT_TRUE(ProductHelper::get(productFamily)->getUuid(device, uuid));
EXPECT_TRUE(0 == std::memcmp(uuid.data(), &expectedUuidValue, sizeof(expectedUuidValue)));
NEO::directoryFilesMap.clear();
}
@@ -750,7 +750,7 @@ HWTEST2_F(SysfsBasedUuidTest, givenSysfsFileNotAvailableWhenRetrievingDeviceUuid
});
std::array<uint8_t, 16> uuid;
EXPECT_FALSE(HwInfoConfig::get(productFamily)->getUuid(device, uuid));
EXPECT_FALSE(ProductHelper::get(productFamily)->getUuid(device, uuid));
NEO::directoryFilesMap.clear();
}
@@ -769,7 +769,7 @@ HWTEST2_F(SysfsBasedUuidTest, givenIncorrectUuidWhenRetrievingDeviceUuidThenFail
});
std::array<uint8_t, 16> uuid;
EXPECT_FALSE(HwInfoConfig::get(productFamily)->getUuid(device, uuid));
EXPECT_FALSE(ProductHelper::get(productFamily)->getUuid(device, uuid));
NEO::directoryFilesMap.clear();
}
@@ -789,7 +789,7 @@ HWTEST2_F(SysfsBasedUuidTest, givenErrnoIsSetWhenRetrievingDeviceUuidThenFailure
});
std::array<uint8_t, 16> uuid;
EXPECT_FALSE(HwInfoConfig::get(productFamily)->getUuid(device, uuid));
EXPECT_FALSE(ProductHelper::get(productFamily)->getUuid(device, uuid));
NEO::directoryFilesMap.clear();
}
@@ -799,5 +799,5 @@ HWTEST2_F(SysfsBasedUuidTest, givenDriverModelIsNotDrmWhenRetrievingDeviceUuidTh
auto executionEnvironment = device->getExecutionEnvironment();
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::move(driverModelMock));
std::array<uint8_t, 16> uuid;
EXPECT_FALSE(HwInfoConfig::get(productFamily)->getUuid(device, uuid));
EXPECT_FALSE(ProductHelper::get(productFamily)->getUuid(device, uuid));
}