@@ -321,7 +321,7 @@ TEST_F(DeviceFactoryOverrideTest, givenFailedProductHelperSetupHardwareInfoWhenP
321321 EXPECT_EQ (1u , productHelper->setupHardwareInfoCalled );
322322}
323323
324- TEST_F (DeviceFactoryOverrideTest, givenTbxModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleard ) {
324+ TEST_F (DeviceFactoryOverrideTest, givenTbxModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared ) {
325325 DebugManagerStateRestore stateRestore;
326326 debugManager.flags .SetCommandStreamReceiver .set (static_cast <int >(CommandStreamReceiverType::tbx));
327327
@@ -342,6 +342,45 @@ TEST_F(DeviceFactoryOverrideTest, givenTbxModeWhenPreparingDeviceEnvironmentsFor
342342 EXPECT_EQ (0u , executionEnvironment.rootDeviceEnvironments [0 ]->getHardwareInfo ()->capabilityTable .sharedSystemMemCapabilities );
343343}
344344
345+ TEST_F (DeviceFactoryOverrideTest, givenTbxWithAubModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared) {
346+ DebugManagerStateRestore stateRestore;
347+ debugManager.flags .SetCommandStreamReceiver .set (static_cast <int >(CommandStreamReceiverType::tbxWithAub));
348+
349+ struct MyMockProductHelper : MockProductHelper {
350+ std::unique_ptr<DeviceCapsReader> getDeviceCapsReader (aub_stream::AubManager &aubManager) const override {
351+ std::vector<uint32_t > caps;
352+ return std::make_unique<DeviceCapsReaderMock>(caps);
353+ }
354+ };
355+
356+ auto productHelper = new MyMockProductHelper ();
357+ productHelper->setupHardwareInfoResult = true ;
358+
359+ executionEnvironment.rootDeviceEnvironments [0 ]->productHelper .reset (productHelper);
360+
361+ auto rc = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride (executionEnvironment);
362+ EXPECT_EQ (true , rc);
363+ EXPECT_EQ (0u , executionEnvironment.rootDeviceEnvironments [0 ]->getHardwareInfo ()->capabilityTable .sharedSystemMemCapabilities );
364+ }
365+
366+ TEST_F (DeviceFactoryOverrideTest, givenAubModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared) {
367+ DebugManagerStateRestore stateRestore;
368+ debugManager.flags .SetCommandStreamReceiver .set (static_cast <int >(CommandStreamReceiverType::aub));
369+
370+ auto rc = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride (executionEnvironment);
371+ EXPECT_EQ (true , rc);
372+ EXPECT_EQ (0u , executionEnvironment.rootDeviceEnvironments [0 ]->getHardwareInfo ()->capabilityTable .sharedSystemMemCapabilities );
373+ }
374+
375+ TEST_F (DeviceFactoryOverrideTest, givenNullAubModeWhenPreparingDeviceEnvironmentsForProductFamilyOverrideThenSharedSystemMemCapabilitiesCleared) {
376+ DebugManagerStateRestore stateRestore;
377+ debugManager.flags .SetCommandStreamReceiver .set (static_cast <int >(CommandStreamReceiverType::nullAub));
378+
379+ auto rc = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride (executionEnvironment);
380+ EXPECT_EQ (true , rc);
381+ EXPECT_EQ (0u , executionEnvironment.rootDeviceEnvironments [0 ]->getHardwareInfo ()->capabilityTable .sharedSystemMemCapabilities );
382+ }
383+
345384TEST_F (DeviceFactoryOverrideTest, givenDefaultHwInfoWhenPrepareDeviceEnvironmentsForProductFamilyOverrideIsCalledThenSlmSizeInKbEqualsMaxProgrammableSlmSize) {
346385 DebugManagerStateRestore restore;
347386 bool success = DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride (executionEnvironment);
0 commit comments