Skip to content

Commit c0b1b79

Browse files
Add missing unit test
Signed-off-by: Maciej Dziuban <[email protected]>
1 parent d2dd2df commit c0b1b79

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

opencl/test/unit_test/device/device_tests.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,16 @@ HWTEST_F(DeviceTest, givenNoHwCsrTypeAndModifiedDefaultEngineIndexWhenIsSimulati
189189
}
190190
}
191191

192+
TEST_F(DeviceTest, givenRootDeviceWithSubDevicesWhenCreatingThenRootDeviceContextIsInitialized) {
193+
DebugManagerStateRestore restore{};
194+
DebugManager.flags.DeferOsContextInitialization.set(1);
195+
196+
UltDeviceFactory factory(1, 2);
197+
MockDevice &device = *factory.rootDevices[0];
198+
199+
EXPECT_TRUE(device.getDefaultEngine().osContext->isInitialized());
200+
}
201+
192202
HWTEST_F(DeviceTest, givenDeviceWithoutSubDevicesWhenCreatingContextsThenMemoryManagerDefaultContextIsSetCorrectly) {
193203
UltDeviceFactory factory(1, 1);
194204
MockDevice &device = *factory.rootDevices[0];

0 commit comments

Comments
 (0)