mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
feature(sysman): Create boilerplate for spec 1.7 in sysman
- Added new sysman APIs introduced in spec1.7 - Added ULTs to cover the new APIs Related-To: LOCI-4667 Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f5d683063b
commit
64bf895cf7
@@ -217,6 +217,16 @@ TEST_F(ZesEngineFixture, GivenValidEngineHandleWhenCallingZesEngineGetActivityAn
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ZesEngineFixture, GivenValidEngineHandleAndIntegratedDeviceWhenCallingZesEngineGetActivityExtThenUnsupportedFeatureErrorIsReturned) {
|
||||
zes_engine_stats_t stats = {};
|
||||
auto handles = getEngineHandles(handleComponentCount);
|
||||
EXPECT_EQ(handleComponentCount, handles.size());
|
||||
|
||||
for (auto handle : handles) {
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, zesEngineGetActivityExt(handle, nullptr, &stats));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ZesEngineFixture, GivenValidEngineHandleWhenCallingZesEngineGetActivityAndperfEventOpenFailsThenVerifyEngineGetActivityReturnsFailure) {
|
||||
|
||||
pPmuInterface->mockPerfEventOpenRead = true;
|
||||
|
||||
@@ -34,7 +34,7 @@ class SysmanDeviceEngineFixture : public SysmanDeviceFixture {
|
||||
SysmanDeviceFixture::TearDown();
|
||||
}
|
||||
|
||||
std::vector<zes_engine_handle_t> get_engine_handles(uint32_t count) {
|
||||
std::vector<zes_engine_handle_t> getEngineHandles(uint32_t count) {
|
||||
std::vector<zes_engine_handle_t> handles(count, nullptr);
|
||||
EXPECT_EQ(zesDeviceEnumEngineGroups(pSysmanDevice->toHandle(), &count, handles.data()), ZE_RESULT_SUCCESS);
|
||||
return handles;
|
||||
@@ -91,7 +91,7 @@ TEST_F(SysmanDeviceEngineFixture, GivenUnsupportedEngineHandleWhenGettingEngineA
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceEngineFixture, GivenValidHandleGetPropertiesThenCorrectEngineGroupIsReturned) {
|
||||
auto handles = get_engine_handles(engineHandleComponentCount);
|
||||
auto handles = getEngineHandles(engineHandleComponentCount);
|
||||
uint32_t engineGroupIndex = 0;
|
||||
for (auto handle : handles) {
|
||||
zes_engine_properties_t properties = {};
|
||||
@@ -106,7 +106,7 @@ TEST_F(SysmanDeviceEngineFixture, GivenValidHandleGetPropertiesThenCorrectEngine
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceEngineFixture, GivenValidHandleGetAvtivityThenCorrectValuesAreReturned) {
|
||||
auto handles = get_engine_handles(engineHandleComponentCount);
|
||||
auto handles = getEngineHandles(engineHandleComponentCount);
|
||||
uint32_t engineGroupIndex = 0;
|
||||
for (auto handle : handles) {
|
||||
zes_engine_stats_t stats;
|
||||
@@ -121,7 +121,7 @@ TEST_F(SysmanDeviceEngineFixture, GivenValidHandleGetAvtivityThenCorrectValuesAr
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceEngineFixture, GivenValidHandleWhenGettingEngineActivityAndRequestSingleFailsThenFailureIsReturned) {
|
||||
auto handles = get_engine_handles(engineHandleComponentCount);
|
||||
auto handles = getEngineHandles(engineHandleComponentCount);
|
||||
for (auto handle : handles) {
|
||||
pKmdSysManager->mockRequestSingle = true;
|
||||
pKmdSysManager->mockRequestSingleResult = ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
@@ -130,6 +130,14 @@ TEST_F(SysmanDeviceEngineFixture, GivenValidHandleWhenGettingEngineActivityAndRe
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceEngineFixture, GivenValidHandleWhenCallingZesEngineGetActivityExtThenUnsupportedFeatureErrorIsReturned) {
|
||||
auto handles = getEngineHandles(engineHandleComponentCount);
|
||||
for (auto handle : handles) {
|
||||
zes_engine_stats_t stats;
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, zesEngineGetActivityExt(handle, nullptr, &stats));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user