mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: don't query ipVersion if not supported
Related-To: NEO-7786 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8bc1fb1251
commit
0605716499
@@ -731,6 +731,11 @@ TEST(IoctlHelperPrelimTest, givenProgramDebuggingAndContextDebugSupportedWhenIni
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenInitializatedThenIpVersionIsSet) {
|
||||
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
||||
if (productHelper.isPlatformQuerySupported() == false) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
auto &ipVersion = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo()->ipVersion;
|
||||
ipVersion = {};
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
@@ -739,6 +744,21 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenInitializatedThenIpVersionI
|
||||
EXPECT_EQ(ipVersion.architecture, 3u);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperAndPlatformQueryNotSupportedWhenSetupIpVersionThenIpVersionIsSetFromHelper) {
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
||||
if (productHelper.isPlatformQuerySupported() == true) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
auto &ipVersion = hwInfo->ipVersion;
|
||||
ipVersion = {};
|
||||
drm->ioctlHelper->setupIpVersion();
|
||||
auto config = compilerProductHelper.getHwIpVersion(*hwInfo);
|
||||
EXPECT_EQ(config, ipVersion.value);
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenFailOnInitializationThenIpVersionIsCorrect) {
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo();
|
||||
auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<CompilerProductHelper>();
|
||||
@@ -751,6 +771,12 @@ TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenFailOnInitializationThenIpV
|
||||
}
|
||||
|
||||
TEST_F(IoctlHelperPrelimFixture, givenIoctlHelperWhenInvalidHwIpVersionSizeOnInitializationThenErrorIsPrinted) {
|
||||
|
||||
auto &productHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper<ProductHelper>();
|
||||
if (productHelper.isPlatformQuerySupported() == false) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.PrintDebugMessages.set(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user