fix: set ParentDevice for subDevice only

Related-To: GSD-6609

Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com>
This commit is contained in:
Baj, Tomasz
2023-10-30 16:06:20 +00:00
committed by Compute-Runtime-Automation
parent 9c7f31620a
commit 28c6dbf8c1
5 changed files with 20 additions and 12 deletions

View File

@@ -170,6 +170,7 @@ TEST(SubDevicesTest, givenDeviceWithSubDevicesWhenSubDeviceInternalRefCountsAreC
TEST(SubDevicesTest, givenClDeviceWithSubDevicesWhenSubDeviceInternalRefCountsAreChangedThenChangeIsPropagatedToRootDevice) {
DebugManagerStateRestore restorer;
DebugManager.flags.CreateMultipleSubDevices.set(2);
DebugManager.flags.ReturnSubDevicesAsApiDevices.set(false);
VariableBackup<bool> mockDeviceFlagBackup(&MockDevice::createSingleDevice, false);
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
device->incRefInternal();