mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
[Sysman] Replace normal pointers with smart pointers (12/n)
Replacing normal pointers by smart pointers in engine module of LO sysman(zesinit). Related-To: LOCI-2810 Signed-off-by: Singh, Prasoon <prasoon.singh@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
afe99d7dbc
commit
88fe17e50a
@@ -45,10 +45,6 @@ class ZesEngineFixture : public SysmanDeviceFixture {
|
||||
pLinuxSysmanImp->pPmuInterface = pPmuInterface.get();
|
||||
pFsAccess->mockReadVal = 23;
|
||||
|
||||
for (auto handle : pSysmanDeviceImp->pEngineHandleContext->handleList) {
|
||||
delete handle;
|
||||
}
|
||||
|
||||
pSysmanDeviceImp->pEngineHandleContext->handleList.clear();
|
||||
pSysmanDeviceImp->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.isIntegratedDevice = true;
|
||||
device = pSysmanDevice;
|
||||
@@ -151,8 +147,6 @@ TEST_F(ZesEngineFixture, GivenTestDiscreteDevicesAndValidEngineHandleWhenCalling
|
||||
|
||||
auto pOsEngineTest2 = L0::Sysman::OsEngine::create(pOsSysman, ZES_ENGINE_GROUP_RENDER_SINGLE, 0u, 0u, false);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pOsEngineTest2->getActivity(&stats));
|
||||
delete pOsEngineTest1;
|
||||
delete pOsEngineTest2;
|
||||
}
|
||||
|
||||
TEST_F(ZesEngineFixture, GivenTestIntegratedDevicesAndValidEngineHandleWhenCallingZesEngineGetActivityAndPMUGetEventTypeFailsThenVerifyEngineGetActivityReturnsFailure) {
|
||||
@@ -162,7 +156,6 @@ TEST_F(ZesEngineFixture, GivenTestIntegratedDevicesAndValidEngineHandleWhenCalli
|
||||
|
||||
auto pOsEngineTest1 = L0::Sysman::OsEngine::create(pOsSysman, ZES_ENGINE_GROUP_RENDER_SINGLE, 0u, 0u, false);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pOsEngineTest1->getActivity(&stats));
|
||||
delete pOsEngineTest1;
|
||||
}
|
||||
|
||||
TEST_F(ZesEngineFixture, GivenValidEngineHandleWhenCallingZesEngineGetActivityAndPmuReadFailsThenVerifyEngineGetActivityReturnsFailure) {
|
||||
|
||||
@@ -48,10 +48,6 @@ class ZesEngineFixture : public SysmanDeviceFixture {
|
||||
pOriginalPmuInterface = pLinuxSysmanImp->pPmuInterface;
|
||||
pLinuxSysmanImp->pPmuInterface = pPmuInterface.get();
|
||||
|
||||
for (auto handle : pSysmanDeviceImp->pEngineHandleContext->handleList) {
|
||||
delete handle;
|
||||
}
|
||||
|
||||
pSysmanDeviceImp->pEngineHandleContext->handleList.clear();
|
||||
pSysmanDeviceImp->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.isIntegratedDevice = true;
|
||||
device = pSysmanDevice;
|
||||
@@ -185,8 +181,6 @@ TEST_F(ZesEngineFixture, GivenTestDiscreteDevicesAndValidEngineHandleWhenCalling
|
||||
|
||||
auto pOsEngineTest2 = L0::Sysman::OsEngine::create(pOsSysman, ZES_ENGINE_GROUP_RENDER_SINGLE, 0u, 0u, false);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pOsEngineTest2->getActivity(&stats));
|
||||
delete pOsEngineTest1;
|
||||
delete pOsEngineTest2;
|
||||
}
|
||||
|
||||
TEST_F(ZesEngineFixture, GivenUnknownEngineTypeThengetEngineGroupFromTypeReturnsGroupAllEngineGroup) {
|
||||
@@ -201,7 +195,6 @@ TEST_F(ZesEngineFixture, GivenTestIntegratedDevicesAndValidEngineHandleWhenCalli
|
||||
|
||||
auto pOsEngineTest1 = L0::Sysman::OsEngine::create(pOsSysman, ZES_ENGINE_GROUP_RENDER_SINGLE, 0u, 0u, false);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, pOsEngineTest1->getActivity(&stats));
|
||||
delete pOsEngineTest1;
|
||||
}
|
||||
|
||||
TEST_F(ZesEngineFixture, GivenValidEngineHandleWhenCallingZesEngineGetActivityAndPmuReadFailsThenVerifyEngineGetActivityReturnsFailure) {
|
||||
@@ -245,10 +238,6 @@ TEST_F(ZesEngineFixture, GivenHandleQueryItemCalledWhenPmuInterfaceOpenFailsThen
|
||||
|
||||
pFsAccess->mockReadVal = true;
|
||||
|
||||
for (auto handle : pSysmanDeviceImp->pEngineHandleContext->handleList) {
|
||||
delete handle;
|
||||
}
|
||||
|
||||
pSysmanDeviceImp->pEngineHandleContext->handleList.clear();
|
||||
pSysmanDeviceImp->pEngineHandleContext->init(pOsSysman->getSubDeviceCount());
|
||||
uint32_t count = 0;
|
||||
@@ -270,9 +259,6 @@ TEST_F(ZesEngineFixture, GivenValidEngineHandleAndHandleCountZeroWhenCallingReIn
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zesDeviceEnumEngineGroups(device->toHandle(), &count, NULL));
|
||||
EXPECT_EQ(count, handleComponentCount);
|
||||
|
||||
for (auto handle : pSysmanDeviceImp->pEngineHandleContext->handleList) {
|
||||
delete handle;
|
||||
}
|
||||
pSysmanDeviceImp->pEngineHandleContext->handleList.clear();
|
||||
pSysmanDeviceImp->pEngineHandleContext->init(pOsSysman->getSubDeviceCount());
|
||||
|
||||
@@ -313,10 +299,6 @@ class ZesEngineMultiFixture : public SysmanMultiDeviceFixture {
|
||||
pDrm->mockReadSysmanQueryEngineInfoMultiDevice = true;
|
||||
pSysfsAccess->mockReadSymLinkSuccess = true;
|
||||
|
||||
for (auto handle : pSysmanDeviceImp->pEngineHandleContext->handleList) {
|
||||
delete handle;
|
||||
}
|
||||
|
||||
pSysmanDeviceImp->pEngineHandleContext->handleList.clear();
|
||||
pSysmanDeviceImp->getRootDeviceEnvironment().getMutableHardwareInfo()->capabilityTable.isIntegratedDevice = true;
|
||||
device = pSysmanDevice;
|
||||
@@ -395,10 +377,6 @@ TEST_F(ZesEngineMultiFixture, GivenHandleQueryItemCalledWhenPmuInterfaceOpenFail
|
||||
|
||||
pFsAccess->mockReadVal = true;
|
||||
|
||||
for (auto handle : pSysmanDeviceImp->pEngineHandleContext->handleList) {
|
||||
delete handle;
|
||||
}
|
||||
|
||||
pSysmanDeviceImp->pEngineHandleContext->handleList.clear();
|
||||
pSysmanDeviceImp->pEngineHandleContext->init(pOsSysman->getSubDeviceCount());
|
||||
uint32_t count = 0;
|
||||
|
||||
Reference in New Issue
Block a user