diff --git a/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp b/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp index 8ded8ac07c..63b5c3fea3 100644 --- a/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp +++ b/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp @@ -25,12 +25,19 @@ namespace L0 { namespace ult { void DeviceFixture::setUp() { - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(NEO::defaultHwInfo.get(), 0u); + hardwareInfo = defaultHwInfo.get(); + setUpImpl(hardwareInfo); +} + +void DeviceFixture::setUpImpl(NEO::HardwareInfo *hwInfo) { + hardwareInfo = hwInfo; + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(hardwareInfo, 0u); setupWithExecutionEnvironment(*executionEnvironment); } + void DeviceFixture::setupWithExecutionEnvironment(NEO::ExecutionEnvironment &executionEnvironment) { execEnv = &executionEnvironment; - neoDevice = NEO::MockDevice::createWithExecutionEnvironment(NEO::defaultHwInfo.get(), &executionEnvironment, rootDeviceIndex); + neoDevice = NEO::MockDevice::createWithExecutionEnvironment(hardwareInfo == nullptr ? defaultHwInfo.get() : hardwareInfo, &executionEnvironment, rootDeviceIndex); mockBuiltIns = new MockBuiltins(); neoDevice->executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns); NEO::DeviceVector devices; diff --git a/level_zero/core/test/unit_tests/fixtures/device_fixture.h b/level_zero/core/test/unit_tests/fixtures/device_fixture.h index ed0c2c545f..cf040e63e0 100644 --- a/level_zero/core/test/unit_tests/fixtures/device_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/device_fixture.h @@ -34,6 +34,7 @@ class MockBuiltins; struct DeviceFixture { void setUp(); + void setUpImpl(NEO::HardwareInfo *hwInfo); void tearDown(); void setupWithExecutionEnvironment(NEO::ExecutionEnvironment &executionEnvironment); @@ -43,6 +44,7 @@ struct DeviceFixture { L0::ContextImp *context = nullptr; MockBuiltins *mockBuiltIns = nullptr; NEO::ExecutionEnvironment *execEnv = nullptr; + HardwareInfo *hardwareInfo = nullptr; const uint32_t rootDeviceIndex = 0u; template diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index 6fdc0f840d..b8c7597877 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -2553,10 +2553,22 @@ HWTEST_F(ModuleTranslationUnitTest, WithNoCompilerWhenCallingStaticLinkSpirVThen Os::frontEndDllName = oldFclDllName; } -HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromZeBinaryWithoutSpirvDataIncludedAndLegacyDebuggerAttachedThenReturnError) { - if (false == device->getHwInfo().capabilityTable.debuggerSupported) { - GTEST_SKIP(); +class ModuleTranslationUnitDebuggerSupportedTest : public ModuleTranslationUnitTest { + public: + void SetUp() override { + NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; + hwInfo.capabilityTable.debuggerSupported = true; + DeviceFixture::setUpImpl(&hwInfo); } + + void TearDown() override { + DeviceFixture::tearDown(); + } + + DebugManagerStateRestore restorer; +}; + +HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, WhenCreatingFromZeBinaryWithoutSpirvDataIncludedAndLegacyDebuggerAttachedThenReturnError, HasSourceLevelDebuggerSupport) { ZebinTestData::ValidEmptyProgram<> zebin; const auto &hwInfo = device->getNEODevice()->getHardwareInfo(); zebin.elfHeader->machine = hwInfo.platform.eProductFamily; @@ -2688,12 +2700,7 @@ HWTEST_F(ModuleTranslationUnitTest, givenForceToStatelessRequiredWhenBuildingMod } } -HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) { - - if (device->getHwInfo().capabilityTable.debuggerSupported == false) { - GTEST_SKIP(); - } - +HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) { auto mockCompilerInterface = new MockCompilerInterface; neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger); auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]; @@ -2707,12 +2714,7 @@ HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuild EXPECT_EQ(result, ZE_RESULT_ERROR_MODULE_BUILD_FAILURE); } -HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) { - - if (device->getHwInfo().capabilityTable.debuggerSupported == false) { - GTEST_SKIP(); - } - +HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) { auto mockCompilerInterface = new MockCompilerInterface; neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger); auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]; @@ -2747,12 +2749,7 @@ HWTEST_F(ModuleTranslationUnitTest, givenEnableZebinBuildOptionWhenBuildWithSpir EXPECT_EQ(mockCompilerInterface->inputInternalOptions.find(NEO::CompilerOptions::disableZebin.str()), std::string::npos); } -HWTEST_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerWhenBuildWithSpirvThenModuleBuildsWithSuccess) { - - if (device->getHwInfo().capabilityTable.debuggerSupported == false) { - GTEST_SKIP(); - } - +HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerWhenBuildWithSpirvThenModuleBuildsWithSuccess, HasSourceLevelDebuggerSupport) { auto mockCompilerInterface = new MockCompilerInterface; neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger); auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]; @@ -3581,10 +3578,9 @@ TEST_F(ModuleTests, givenImplicitArgsRelocationAndStackCallsWhenLinkingModuleThe EXPECT_TRUE(kernelInfo->kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs); } -TEST_F(ModuleTests, givenImplicitArgsRelocationAndDebuggerEnabledWhenLinkingModuleThenSegmentIsPatchedAndImplicitArgsAreRequired) { - if (!defaultHwInfo->capabilityTable.debuggerSupported) { - GTEST_SKIP(); - } +using ModuleTestsDebuggingSupported = ModuleTranslationUnitDebuggerSupportedTest; + +HWTEST2_F(ModuleTestsDebuggingSupported, givenImplicitArgsRelocationAndDebuggerEnabledWhenLinkingModuleThenSegmentIsPatchedAndImplicitArgsAreRequired, HasSourceLevelDebuggerSupport) { DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); auto pModule = std::make_unique(device, nullptr, ModuleType::User); diff --git a/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp b/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp index 1cfa0806c8..10cf2267c9 100644 --- a/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp +++ b/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp @@ -15,6 +15,10 @@ using namespace NEO; using EhlTest = Test; +EHLTEST_F(EhlTest, givenEhlThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + EHLTEST_F(EhlTest, givenEhlWhenSlmSizeIsRequiredThenReturnCorrectValue) { EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); } diff --git a/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp b/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp index 704c7e15c1..a64befb677 100644 --- a/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp +++ b/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp @@ -16,6 +16,10 @@ using namespace NEO; using IcllpTest = Test; +ICLLPTEST_F(IcllpTest, givenIcllpThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + ICLLPTEST_F(IcllpTest, givenIcllpWhenSlmSizeIsRequiredThenReturnCorrectValue) { EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); } diff --git a/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp b/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp index e4df83788f..243200c4e5 100644 --- a/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp +++ b/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp @@ -16,6 +16,10 @@ using namespace NEO; using LkfTest = Test; +LKFTEST_F(LkfTest, givenLkfThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + LKFTEST_F(LkfTest, givenLkfWhenSlmSizeIsRequiredThenReturnCorrectValue) { EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); } diff --git a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp b/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp index f5497a632c..60d6cf930e 100644 --- a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp +++ b/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp @@ -17,6 +17,10 @@ using namespace NEO; typedef Test BxtDeviceCaps; +BXTTEST_F(BxtDeviceCaps, GivenBxtThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + BXTTEST_F(BxtDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { const auto &caps = pDevice->getDeviceInfo(); EXPECT_EQ(52u, caps.outProfilingTimerResolution); diff --git a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp b/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp index 9a03086f8d..923d3cd763 100644 --- a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp +++ b/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp @@ -16,6 +16,10 @@ using namespace NEO; typedef Test BxtDeviceCapsWindows; +BXTTEST_F(BxtDeviceCapsWindows, GivenBxtWindowsThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + BXTTEST_F(BxtDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp b/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp index 64c175f747..6eca3a6792 100644 --- a/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp +++ b/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp @@ -16,6 +16,10 @@ using namespace NEO; typedef Test CflDeviceCaps; +CFLTEST_F(CflDeviceCaps, GivenCFLThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + CFLTEST_F(CflDeviceCaps, GivenCFLWhenCheckftr64KBpagesThenTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); } diff --git a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp b/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp index 061326e60b..0a9cc5680b 100644 --- a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp +++ b/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp @@ -16,6 +16,10 @@ using namespace NEO; typedef Test CflDeviceCapsWindows; +CFLTEST_F(CflDeviceCapsWindows, GivenCflWindowsThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + CFLTEST_F(CflDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp b/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp index fdf523ec6a..2c07826181 100644 --- a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp +++ b/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp @@ -16,6 +16,10 @@ using namespace NEO; using GlkDeviceCaps = Test; +GLKTEST_F(GlkDeviceCaps, givenGlkThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + GLKTEST_F(GlkDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { const auto &caps = pDevice->getDeviceInfo(); EXPECT_EQ(52u, caps.outProfilingTimerResolution); diff --git a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp b/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp index 132e5365d7..9ab73a5e05 100644 --- a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp +++ b/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp @@ -16,6 +16,10 @@ using namespace NEO; typedef Test GlkDeviceCapsWindows; +GLKTEST_F(GlkDeviceCapsWindows, GivenGlkWindowsThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + GLKTEST_F(GlkDeviceCapsWindows, WhenCheckingKmdNotifyPropertiesThenKmdNotifyIsEnabledCorrectly) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(30000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp b/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp index 8baecc9255..89194e8f73 100644 --- a/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp +++ b/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp @@ -14,6 +14,10 @@ using namespace NEO; typedef Test KblDeviceCaps; +KBLTEST_F(KblDeviceCaps, GivenKBLThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + KBLTEST_F(KblDeviceCaps, GivenKBLWhenCheckftr64KBpagesThenTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); } diff --git a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp b/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp index 11a99f76f2..34b3a99978 100644 --- a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp +++ b/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp @@ -14,6 +14,10 @@ using namespace NEO; typedef Test KblDeviceCapsWindows; +KBLTEST_F(KblDeviceCapsWindows, givenKblWindowsThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + KBLTEST_F(KblDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp b/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp index e34280e76b..12de1f3316 100644 --- a/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp +++ b/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp @@ -17,6 +17,10 @@ using namespace NEO; typedef Test SklDeviceCaps; +SKLTEST_F(SklDeviceCaps, givenSklThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + SKLTEST_F(SklDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { const auto &caps = pDevice->getDeviceInfo(); EXPECT_EQ(83u, caps.outProfilingTimerResolution); diff --git a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp b/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp index 8d23bdee4b..5ba9747964 100644 --- a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp +++ b/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp @@ -16,6 +16,10 @@ using namespace NEO; typedef Test SklDeviceCapsWindows; +SKLTEST_F(SklDeviceCapsWindows, GivenSklWindowsThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + SKLTEST_F(SklDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/mocks/mock_context.cpp b/opencl/test/unit_test/mocks/mock_context.cpp index 433422edba..67c26d98e0 100644 --- a/opencl/test/unit_test/mocks/mock_context.cpp +++ b/opencl/test/unit_test/mocks/mock_context.cpp @@ -165,6 +165,20 @@ MockUnrestrictiveContext::MockUnrestrictiveContext() : MockContext(nullptr, null initializeWithDevices(ClDeviceVector{deviceIds, 3}, true); } +MockUnrestrictiveDebuggingSupportedContext::MockUnrestrictiveDebuggingSupportedContext() : MockContext(nullptr, nullptr) { + NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; + hwInfo.capabilityTable.debuggerSupported = true; + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + + ultClDeviceFactory = std::make_unique(1, 2, static_cast(executionEnvironment)); + + pRootDevice = ultClDeviceFactory->rootDevices[0]; + pSubDevice0 = ultClDeviceFactory->subDevices[0]; + pSubDevice1 = ultClDeviceFactory->subDevices[1]; + cl_device_id deviceIds[] = {pRootDevice, pSubDevice0, pSubDevice1}; + initializeWithDevices(ClDeviceVector{deviceIds, 3}, true); +} + MockUnrestrictiveContextMultiGPU::MockUnrestrictiveContextMultiGPU() : MockContext(nullptr, nullptr) { pRootDevice0 = ultClDeviceFactory.rootDevices[0]; pSubDevice00 = ultClDeviceFactory.subDevices[0]; diff --git a/opencl/test/unit_test/mocks/mock_context.h b/opencl/test/unit_test/mocks/mock_context.h index 28112d28e2..92925f0a32 100644 --- a/opencl/test/unit_test/mocks/mock_context.h +++ b/opencl/test/unit_test/mocks/mock_context.h @@ -92,6 +92,15 @@ struct MockUnrestrictiveContext : MockContext { ClDevice *pSubDevice1 = nullptr; }; +struct MockUnrestrictiveDebuggingSupportedContext : MockContext { + MockUnrestrictiveDebuggingSupportedContext(); + + std::unique_ptr ultClDeviceFactory; + MockClDevice *pRootDevice; + ClDevice *pSubDevice0 = nullptr; + ClDevice *pSubDevice1 = nullptr; +}; + struct MockUnrestrictiveContextMultiGPU : MockContext { MockUnrestrictiveContextMultiGPU(); diff --git a/opencl/test/unit_test/program/program_data_tests.cpp b/opencl/test/unit_test/program/program_data_tests.cpp index ce59030694..0cd92b6083 100644 --- a/opencl/test/unit_test/program/program_data_tests.cpp +++ b/opencl/test/unit_test/program/program_data_tests.cpp @@ -18,6 +18,7 @@ #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_memory_manager.h" +#include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/test.h" #include "opencl/source/platform/platform.h" @@ -725,7 +726,9 @@ TEST(ProgramStringSectionTest, WhenConstStringBufferIsPresentThenUseItForLinking program.getKernelInfoArray(rootDeviceIndex).clear(); } -TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndStackCallsThenKernelRequiresImplicitArgs) { +using ProgramImplicitArgsTest = ::testing::Test; + +TEST_F(ProgramImplicitArgsTest, givenImplicitRelocationAndStackCallsThenKernelRequiresImplicitArgs) { auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); auto rootDeviceIndex = device->getRootDeviceIndex(); MockProgram program{nullptr, false, toClDeviceVector(*device)}; @@ -750,13 +753,14 @@ TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndStackCallsThenKernelRequ program.getKernelInfoArray(rootDeviceIndex).clear(); } -TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndEnabledDebuggerThenKernelRequiresImplicitArgs) { - if (!defaultHwInfo->capabilityTable.debuggerSupported) { - GTEST_SKIP(); - } +HWTEST2_F(ProgramImplicitArgsTest, givenImplicitRelocationAndEnabledDebuggerThenKernelRequiresImplicitArgs, HasSourceLevelDebuggerSupport) { DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); + + NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; + hwInfo.capabilityTable.debuggerSupported = true; + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + auto device = std::make_unique(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); EXPECT_NE(nullptr, device->getDebugger()); auto rootDeviceIndex = device->getRootDeviceIndex(); @@ -782,7 +786,7 @@ TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndEnabledDebuggerThenKerne program.getKernelInfoArray(rootDeviceIndex).clear(); } -TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndNoStackCallsAndDisabledDebuggerThenKernelDoesntRequireImplicitArgs) { +TEST_F(ProgramImplicitArgsTest, givenImplicitRelocationAndNoStackCallsAndDisabledDebuggerThenKernelDoesntRequireImplicitArgs) { auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); EXPECT_EQ(nullptr, device->getDebugger()); auto rootDeviceIndex = device->getRootDeviceIndex(); diff --git a/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp b/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp index 976976b4d7..f86b98f983 100644 --- a/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp +++ b/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp @@ -93,10 +93,6 @@ class ProgramWithKernelDebuggingFixture { void setUp() { pDevice = static_cast(&mockContext.getDevice(0)->getDevice()); - if (!pDevice->getHardwareInfo().capabilityTable.debuggerSupported) { - GTEST_SKIP(); - } - std::string filename; std::string kernelOption(CompilerOptions::debugKernelEnable); KernelFilenameHelper::getKernelFilenameFromInternalOption(kernelOption, filename); @@ -106,21 +102,21 @@ class ProgramWithKernelDebuggingFixture { void tearDown() {} - MockUnrestrictiveContext mockContext; + MockUnrestrictiveDebuggingSupportedContext mockContext; std::unique_ptr program = nullptr; MockDevice *pDevice = nullptr; }; using ProgramWithKernelDebuggingTest = Test; -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDebugFlag) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDebugFlag, HasSourceLevelDebuggerSupport) { cl_int retVal = program->compile(program->getDevices(), nullptr, 0, nullptr, nullptr); EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_TRUE(CompilerOptions::contains(program->compilerInterface->buildInternalOptions, CompilerOptions::debugKernelEnable)); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDashGFlag) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDashGFlag, HasSourceLevelDebuggerSupport) { cl_int retVal = program->compile(program->getDevices(), nullptr, 0, nullptr, nullptr); EXPECT_EQ(CL_SUCCESS, retVal); @@ -128,7 +124,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompi EXPECT_TRUE(hasSubstr(program->getOptions(), "-g")); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsCompiledThenOptionsIncludeClOptDisableFlag) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsCompiledThenOptionsIncludeClOptDisableFlag, HasSourceLevelDebuggerSupport) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->isOptDisabled = true; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -139,7 +135,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhen EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -TEST_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableZeroWhenOptDisableIsTrueFromDebuggerThenOptDisableIsNotAdded) { +HWTEST2_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableZeroWhenOptDisableIsTrueFromDebuggerThenOptDisableIsNotAdded, HasSourceLevelDebuggerSupport) { DebugManagerStateRestore dgbRestorer; NEO::DebugManager.flags.DebuggerOptDisable.set(0); @@ -153,7 +149,7 @@ TEST_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableZeroWhenOp EXPECT_FALSE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -TEST_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableOneWhenOptDisableIsFalseFromDebuggerThenOptDisableIsAdded) { +HWTEST2_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableOneWhenOptDisableIsFalseFromDebuggerThenOptDisableIsAdded, HasSourceLevelDebuggerSupport) { DebugManagerStateRestore dgbRestorer; NEO::DebugManager.flags.DebuggerOptDisable.set(1); @@ -167,7 +163,7 @@ TEST_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableOneWhenOpt EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenOptionsStartsWithDashSFilename) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenOptionsStartsWithDashSFilename, HasSourceLevelDebuggerSupport) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -178,7 +174,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompi EXPECT_TRUE(startsWith(program->getOptions(), "-s \"debugFileName\"")); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledWithCmCOptionThenDashSFilenameIsNotPrepended) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledWithCmCOptionThenDashSFilenameIsNotPrepended, HasSourceLevelDebuggerSupport) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -191,19 +187,21 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompi EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenInternalOptionsIncludeDebugFlag) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenInternalOptionsIncludeDebugFlag, HasSourceLevelDebuggerSupport) { cl_int retVal = program->build(program->getDevices(), nullptr); + EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_TRUE(CompilerOptions::contains(program->compilerInterface->buildInternalOptions, CompilerOptions::debugKernelEnable)); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsIncludeDashGFlag) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsIncludeDashGFlag, HasSourceLevelDebuggerSupport) { cl_int retVal = program->build(program->getDevices(), nullptr); + EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_TRUE(hasSubstr(program->getOptions(), "-g")); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsBuiltThenOptionsIncludeClOptDisableFlag) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsBuiltThenOptionsIncludeClOptDisableFlag, HasSourceLevelDebuggerSupport) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->isOptDisabled = true; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -213,7 +211,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhen EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsStartsWithDashSFilename) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsStartsWithDashSFilename, HasSourceLevelDebuggerSupport) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -223,7 +221,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuilt EXPECT_TRUE(startsWith(program->getOptions(), "-s \"debugFileName\"")); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltWithCmCOptionThenDashSFilenameIsNotPrepended) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltWithCmCOptionThenDashSFilenameIsNotPrepended, HasSourceLevelDebuggerSupport) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -234,7 +232,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuilt EXPECT_FALSE(startsWith(program->getOptions(), "-s debugFileName")); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenKernelDebugOptionsAreAppended) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenKernelDebugOptionsAreAppended, HasSourceLevelDebuggerSupport) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -253,7 +251,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinke EXPECT_EQ(static_cast(mockContext.getRootDeviceIndices().size()), newProgram->appendKernelDebugOptionsCalled); } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenDebuggerIsNotifiedWithKernelDebugData) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenDebuggerIsNotifiedWithKernelDebugData, HasSourceLevelDebuggerSupport) { const size_t rootDeviceIndicesSize = mockContext.getRootDeviceIndices().size(); std::vector sourceLevelDebugger(rootDeviceIndicesSize, nullptr); size_t i = 0; @@ -279,7 +277,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuilt } } -TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenDebuggerIsNotifiedWithKernelDebugData) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenDebuggerIsNotifiedWithKernelDebugData, HasSourceLevelDebuggerSupport) { const size_t rootDeviceIndicesSize = mockContext.getRootDeviceIndices().size(); std::vector sourceLevelDebugger(rootDeviceIndicesSize, nullptr); size_t i = 0; @@ -311,7 +309,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinke } } -TEST_F(ProgramWithKernelDebuggingTest, givenGtpinInitializedWhenCreatingProgramFromBinaryThenDebugDataIsAvailable) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenGtpinInitializedWhenCreatingProgramFromBinaryThenDebugDataIsAvailable, HasSourceLevelDebuggerSupport) { bool gtpinInitializedBackup = NEO::isGTPinInitialized; NEO::isGTPinInitialized = true; auto retVal = program->build(program->getDevices(), CompilerOptions::debugKernelEnable.data()); @@ -322,7 +320,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenGtpinInitializedWhenCreatingProgramF NEO::isGTPinInitialized = gtpinInitializedBackup; } -TEST_F(ProgramWithKernelDebuggingTest, givenGtpinNotInitializedWhenCreatingProgramFromBinaryThenDebugDataINullptr) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenGtpinNotInitializedWhenCreatingProgramFromBinaryThenDebugDataINullptr, HasSourceLevelDebuggerSupport) { bool gtpinInitializedBackup = NEO::isGTPinInitialized; NEO::isGTPinInitialized = false; program->kernelDebugEnabled = false; @@ -334,7 +332,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenGtpinNotInitializedWhenCreatingProgr NEO::isGTPinInitialized = gtpinInitializedBackup; } -TEST_F(ProgramWithKernelDebuggingTest, givenKernelDebugEnabledWhenProgramIsBuiltThenDebugDataIsStored) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenKernelDebugEnabledWhenProgramIsBuiltThenDebugDataIsStored, HasSourceLevelDebuggerSupport) { auto retVal = program->build(program->getDevices(), nullptr); EXPECT_EQ(CL_SUCCESS, retVal); @@ -343,7 +341,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenKernelDebugEnabledWhenProgramIsBuilt EXPECT_NE(0u, program->getDebugDataSize(pDevice->getRootDeviceIndex())); } -TEST_F(ProgramWithKernelDebuggingTest, givenProgramWithKernelDebugEnabledWhenProcessDebugDataIsCalledThenKernelInfosAreFilledWithDebugData) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenProgramWithKernelDebugEnabledWhenProcessDebugDataIsCalledThenKernelInfosAreFilledWithDebugData, HasSourceLevelDebuggerSupport) { iOpenCL::SProgramDebugDataHeaderIGC debugDataHeader{}; debugDataHeader.NumberOfKernels = 1u; @@ -381,7 +379,7 @@ TEST_F(ProgramWithKernelDebuggingTest, givenProgramWithKernelDebugEnabledWhenPro EXPECT_NE(nullptr, receivedKernelInfo->debugData.vIsa); } -TEST_F(ProgramWithKernelDebuggingTest, givenProgramWithNonZebinaryFormatAndKernelDebugEnabledWhenProgramIsBuiltThenProcessDebugDataIsCalledAndDebuggerNotified) { +HWTEST2_F(ProgramWithKernelDebuggingTest, givenProgramWithNonZebinaryFormatAndKernelDebugEnabledWhenProgramIsBuiltThenProcessDebugDataIsCalledAndDebuggerNotified, HasSourceLevelDebuggerSupport) { MockSourceLevelDebugger *sourceLevelDebugger = new MockSourceLevelDebugger; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); program->enableKernelDebug(); diff --git a/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp b/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp index 0ce35bd704..1d88aebb1d 100644 --- a/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp +++ b/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp @@ -32,6 +32,15 @@ using namespace NEO; using std::string; using std::unique_ptr; +class SourceLevelDebuggerSupportedFixture : public ::testing::Test { + public: + void SetUp() override { + hwInfo.capabilityTable.debuggerSupported = true; + } + + NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; +}; + TEST(SourceLevelDebugger, whenSourceLevelDebuggerIsCreatedThenLegacyModeIsTrue) { DebuggerLibraryRestore restore; DebuggerLibrary::setLibraryAvailable(true); @@ -40,54 +49,47 @@ TEST(SourceLevelDebugger, whenSourceLevelDebuggerIsCreatedThenLegacyModeIsTrue) EXPECT_TRUE(debugger.isLegacy()); } -TEST(SourceLevelDebugger, givenPlatformWhenItIsCreatedThenSourceLevelDebuggerIsCreatedInExecutionEnvironment) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenPlatformWhenItIsCreatedThenSourceLevelDebuggerIsCreatedInExecutionEnvironment, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - auto executionEnvironment = new ExecutionEnvironment(); - MockPlatform platform(*executionEnvironment); - platform.initializeWithNewDevices(); + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + MockPlatform platform(*executionEnvironment); + platform.initializeWithNewDevices(); - EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); - } + EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); } -TEST(SourceLevelDebugger, givenPlatformWhenSourceLevelDebuggerIsCreatedThenRuntimeCapabilityHasFusedEusDisabled) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenPlatformWhenSourceLevelDebuggerIsCreatedThenRuntimeCapabilityHasFusedEusDisabled, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - auto executionEnvironment = new ExecutionEnvironment(); - MockPlatform platform(*executionEnvironment); - platform.initializeWithNewDevices(); + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + MockPlatform platform(*executionEnvironment); + platform.initializeWithNewDevices(); - ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); - - EXPECT_FALSE(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); - } + ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); + EXPECT_FALSE(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); } -TEST(SourceLevelDebugger, givenPlatformWhenInitializingSourceLevelDebuggerFailsThenRuntimeCapabilityFusedEusAreNotModified) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenPlatformWhenInitializingSourceLevelDebuggerFailsThenRuntimeCapabilityFusedEusAreNotModified, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - interceptor.initRetVal = -1; - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - auto executionEnvironment = new ExecutionEnvironment(); - MockPlatform platform(*executionEnvironment); - platform.initializeWithNewDevices(); + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + interceptor.initRetVal = -1; + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + MockPlatform platform(*executionEnvironment); + platform.initializeWithNewDevices(); - bool defaultValue = defaultHwInfo->capabilityTable.fusedEuEnabled; + bool defaultValue = hwInfo.capabilityTable.fusedEuEnabled; - ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); - EXPECT_EQ(defaultValue, executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); - } + ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); + EXPECT_EQ(defaultValue, executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); } TEST(SourceLevelDebugger, givenNoKernelDebuggerLibraryWhenSourceLevelDebuggerIsCreatedThenLibraryIsNotLoaded) { @@ -533,65 +535,63 @@ TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenInitializeIsCal EXPECT_FALSE(interceptor.initCalled); } -TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceIsConstructedThenDebuggerIsInitialized) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenKernelDebuggerLibraryActiveWhenDeviceIsConstructedThenDebuggerIsInitialized, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(nullptr)); - EXPECT_TRUE(interceptor.initCalled); - } + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + auto device = std::make_unique(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); + EXPECT_TRUE(interceptor.initCalled); } -TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedThenDebuggerIsNotified) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedThenDebuggerIsNotified, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - unique_ptr device(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); - unique_ptr pClDevice(new MockClDevice{device.get()}); - EXPECT_TRUE(interceptor.newDeviceCalled); - uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface() != nullptr ? device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle() : 0; - EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); - pClDevice.reset(); - device.release(); - } + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + unique_ptr device(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); + unique_ptr pClDevice(new MockClDevice{device.get()}); + EXPECT_TRUE(interceptor.newDeviceCalled); + uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface() != nullptr ? device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle() : 0; + EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); + pClDevice.reset(); + device.release(); } -TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedWithOsCsrThenDebuggerIsNotifiedWithCorrectDeviceHandle) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedWithOsCsrThenDebuggerIsNotifiedWithCorrectDeviceHandle, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - VariableBackup backup(&ultHwConfig); - ultHwConfig.useHwCsr = true; + VariableBackup backup(&ultHwConfig); + ultHwConfig.useHwCsr = true; - HardwareInfo *hwInfo = nullptr; - ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1); + HardwareInfo *hwInfo = nullptr; + ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1); - hwInfo->capabilityTable.instrumentationEnabled = true; - unique_ptr device(Device::create(executionEnvironment, 0)); - unique_ptr pClDevice(new MockClDevice{device.get()}); + hwInfo->capabilityTable.debuggerSupported = true; + hwInfo->capabilityTable.instrumentationEnabled = true; - ASSERT_NE(nullptr, device->getGpgpuCommandStreamReceiver().getOSInterface()); + unique_ptr device(Device::create(executionEnvironment, 0)); + unique_ptr pClDevice(new MockClDevice{device.get()}); - EXPECT_TRUE(interceptor.newDeviceCalled); - uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle(); - EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); - device.release(); - } + ASSERT_NE(nullptr, device->getGpgpuCommandStreamReceiver().getOSInterface()); + + EXPECT_TRUE(interceptor.newDeviceCalled); + uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle(); + EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); + device.release(); } TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenDeviceIsCreatedThenDebuggerIsNotCreatedInitializedAndNotNotified) { @@ -609,6 +609,19 @@ TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenDeviceIsCreated EXPECT_FALSE(interceptor.newDeviceCalled); } +TEST(SourceLevelDebugger, givenDefaultStateWhenDeviceIsCreatedThenLoadDebuggerLibraryIsNotCalled) { + DebuggerLibraryRestore restore; + + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(false); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + + auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(nullptr)); + + EXPECT_FALSE(interceptor.loadCalled); +} + TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenGettingSourceLevelDebuggerThenNullptrIsReturned) { DebuggerLibraryRestore restore; @@ -638,50 +651,46 @@ TEST(SourceLevelDebugger, givenDeviceWithDebuggerActiveSetWhenSourceLevelDebugge EXPECT_FALSE(interceptor.deviceDestructionCalled); } -TEST(SourceLevelDebugger, givenTwoRootDevicesWhenSecondIsCreatedThenCreatingNewSourceLevelDebugger) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenTwoRootDevicesWhenSecondIsCreatedThenCreatingNewSourceLevelDebugger, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); - executionEnvironment->prepareRootDeviceEnvironments(2); - for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { - executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[i]->initGmm(); - } - auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); - EXPECT_NE(nullptr, executionEnvironment->memoryManager); - EXPECT_TRUE(interceptor.initCalled); - - interceptor.initCalled = false; - auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); - EXPECT_NE(nullptr, executionEnvironment->memoryManager); - EXPECT_TRUE(interceptor.initCalled); + ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); + executionEnvironment->prepareRootDeviceEnvironments(2); + for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { + executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(&hwInfo); + executionEnvironment->rootDeviceEnvironments[i]->initGmm(); } + auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); + EXPECT_NE(nullptr, executionEnvironment->memoryManager); + EXPECT_TRUE(interceptor.initCalled); + + interceptor.initCalled = false; + auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); + EXPECT_NE(nullptr, executionEnvironment->memoryManager); + EXPECT_TRUE(interceptor.initCalled); } -TEST(SourceLevelDebugger, givenMultipleRootDevicesWhenCreatedThenUseDedicatedSourceLevelDebugger) { +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenMultipleRootDevicesWhenCreatedThenUseDedicatedSourceLevelDebugger, HasSourceLevelDebuggerSupport) { DebuggerLibraryRestore restore; - if (defaultHwInfo->capabilityTable.debuggerSupported) { - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); - ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); - executionEnvironment->prepareRootDeviceEnvironments(2); - for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { - executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get()); - executionEnvironment->rootDeviceEnvironments[i]->initGmm(); - } - auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); - auto sourceLevelDebugger = device1->getDebugger(); - auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); - EXPECT_NE(sourceLevelDebugger, device2->getDebugger()); + ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); + executionEnvironment->prepareRootDeviceEnvironments(2); + for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { + executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(&hwInfo); + executionEnvironment->rootDeviceEnvironments[i]->initGmm(); } + auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); + auto sourceLevelDebugger = device1->getDebugger(); + auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); + EXPECT_NE(sourceLevelDebugger, device2->getDebugger()); } TEST(SourceLevelDebugger, whenCaptureSBACalledThenNoCommandsAreAddedToStream) { @@ -703,16 +712,13 @@ TEST(SourceLevelDebugger, whenGetSbaTrackingCommandsSizeQueriedThenZeroIsReturne EXPECT_EQ(0u, size); } -TEST(SourceLevelDebugger, givenEnableMockSourceLevelDebuggerWhenInitializingExecEnvThenActiveDebuggerWithEmptyInterfaceIsCreated) { - if (!defaultHwInfo->capabilityTable.debuggerSupported) { - GTEST_SKIP_("Source Level Debugger not supported"); - } +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenEnableMockSourceLevelDebuggerWhenInitializingExecEnvThenActiveDebuggerWithEmptyInterfaceIsCreated, HasSourceLevelDebuggerSupport) { DebugManagerStateRestore stateRestore; DebuggerLibraryRestore restore; DebuggerLibrary::setLibraryAvailable(false); DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - auto executionEnvironment = new ExecutionEnvironment(); + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); MockPlatform platform(*executionEnvironment); platform.initializeWithNewDevices(); @@ -751,10 +757,7 @@ TEST(SourceLevelDebugger, givenEnableMockSourceLevelDebuggerWhenInitializingExec EXPECT_TRUE(debugger->notifyDeviceDestruction()); } -TEST(SourceLevelDebugger, givenMode1InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsTrue) { - if (!defaultHwInfo->capabilityTable.debuggerSupported) { - GTEST_SKIP_("Source Level Debugger not supported"); - } +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenMode1InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsTrue, HasSourceLevelDebuggerSupport) { DebugManagerStateRestore stateRestore; DebuggerLibraryRestore restore; DebuggerLibrary::setLibraryAvailable(false); @@ -765,10 +768,7 @@ TEST(SourceLevelDebugger, givenMode1InEnableMockSourceLevelDebuggerWhenDebuggerC EXPECT_TRUE(sld->isOptimizationDisabled()); } -TEST(SourceLevelDebugger, givenMode2InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsFalse) { - if (!defaultHwInfo->capabilityTable.debuggerSupported) { - GTEST_SKIP_("Source Level Debugger not supported"); - } +HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenMode2InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsFalse, HasSourceLevelDebuggerSupport) { DebugManagerStateRestore stateRestore; DebuggerLibraryRestore restore; DebuggerLibrary::setLibraryAvailable(false); @@ -889,7 +889,11 @@ HWTEST2_F(LegacyDebuggerTest, givenNotXeHpOrXeHpgCoreAndDebugIsActiveThenDisable HWTEST2_F(LegacyDebuggerTest, givenXeHpOrXeHpgCoreAndDebugIsActiveThenDisableL3CacheInGmmHelperIsSet, IsXeHpOrXeHpgCore) { DebugManagerStateRestore stateRestore; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - auto executionEnvironment = new ExecutionEnvironment(); + + auto hwInfo = *NEO::defaultHwInfo; + hwInfo.capabilityTable.debuggerSupported = true; + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + MockPlatform platform(*executionEnvironment); platform.initializeWithNewDevices(); diff --git a/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp b/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp index ad13ae74eb..2b498fa05c 100644 --- a/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp +++ b/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp @@ -30,6 +30,10 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XE_HP_COREDeviceCaps, givenKernelThatDoesStatelessW EXPECT_EQ(statelessWritesEmitted, mockKernel.mockKernel->areStatelessWritesUsed()); } +XE_HP_CORE_TEST_F(XE_HP_COREDeviceCaps, givenXE_HP_COREThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + XE_HP_CORE_TEST_F(XE_HP_COREDeviceCaps, givenXE_HP_COREWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl b/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl index d3326155b8..2efbc89844 100644 --- a/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl +++ b/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl @@ -16,6 +16,10 @@ using namespace NEO; typedef Test XeHPUsDeviceIdTest; +XEHPTEST_F(XeHPUsDeviceIdTest, givenXeHPThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + XEHPTEST_F(XeHPUsDeviceIdTest, WhenGettingHardwareInfoThenProductFamilyIsXeHpSdv) { EXPECT_EQ(IGFX_XE_HP_SDV, pDevice->getHardwareInfo().platform.eProductFamily); } diff --git a/shared/source/gen11/hw_info_ehl.cpp b/shared/source/gen11/hw_info_ehl.cpp index 396461c381..92e00ba761 100644 --- a/shared/source/gen11/hw_info_ehl.cpp +++ b/shared/source/gen11/hw_info_ehl.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable EHL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen11/hw_info_icllp.cpp b/shared/source/gen11/hw_info_icllp.cpp index 8085ed8367..54048cbe2d 100644 --- a/shared/source/gen11/hw_info_icllp.cpp +++ b/shared/source/gen11/hw_info_icllp.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen11/hw_info_lkf.cpp b/shared/source/gen11/hw_info_lkf.cpp index 3579984e16..277b4afd41 100644 --- a/shared/source/gen11/hw_info_lkf.cpp +++ b/shared/source/gen11/hw_info_lkf.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable LKF::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_adln.cpp b/shared/source/gen12lp/hw_info_adln.cpp index 668ce987a6..3dd172e8bd 100644 --- a/shared/source/gen12lp/hw_info_adln.cpp +++ b/shared/source/gen12lp/hw_info_adln.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable ADLN::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_adlp.cpp b/shared/source/gen12lp/hw_info_adlp.cpp index 35647d00ee..8dd947d1c7 100644 --- a/shared/source/gen12lp/hw_info_adlp.cpp +++ b/shared/source/gen12lp/hw_info_adlp.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable ADLP::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_adls.cpp b/shared/source/gen12lp/hw_info_adls.cpp index 0c82e526be..0000beef47 100644 --- a/shared/source/gen12lp/hw_info_adls.cpp +++ b/shared/source/gen12lp/hw_info_adls.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable ADLS::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_dg1.cpp b/shared/source/gen12lp/hw_info_dg1.cpp index e08773499d..b72a959179 100644 --- a/shared/source/gen12lp/hw_info_dg1.cpp +++ b/shared/source/gen12lp/hw_info_dg1.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable DG1::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages, diff --git a/shared/source/gen12lp/hw_info_rkl.cpp b/shared/source/gen12lp/hw_info_rkl.cpp index 412193a692..f9197a1765 100644 --- a/shared/source/gen12lp/hw_info_rkl.cpp +++ b/shared/source/gen12lp/hw_info_rkl.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable RKL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_tgllp.cpp b/shared/source/gen12lp/hw_info_tgllp.cpp index 0b01215a9b..f76b8cdfdb 100644 --- a/shared/source/gen12lp/hw_info_tgllp.cpp +++ b/shared/source/gen12lp/hw_info_tgllp.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_bxt.cpp b/shared/source/gen9/hw_info_bxt.cpp index 288673f8ff..72771bd69b 100644 --- a/shared/source/gen9/hw_info_bxt.cpp +++ b/shared/source/gen9/hw_info_bxt.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_cfl.cpp b/shared/source/gen9/hw_info_cfl.cpp index 8e1db4d059..4a027ac675 100644 --- a/shared/source/gen9/hw_info_cfl.cpp +++ b/shared/source/gen9/hw_info_cfl.cpp @@ -63,7 +63,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_glk.cpp b/shared/source/gen9/hw_info_glk.cpp index d612dbad26..5af8cb8b64 100644 --- a/shared/source/gen9/hw_info_glk.cpp +++ b/shared/source/gen9/hw_info_glk.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_kbl.cpp b/shared/source/gen9/hw_info_kbl.cpp index e38b0437c3..e766a7b3f6 100644 --- a/shared/source/gen9/hw_info_kbl.cpp +++ b/shared/source/gen9/hw_info_kbl.cpp @@ -63,7 +63,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_skl.cpp b/shared/source/gen9/hw_info_skl.cpp index 2f63cb884b..7b799aba9a 100644 --- a/shared/source/gen9/hw_info_skl.cpp +++ b/shared/source/gen9/hw_info_skl.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp index 56fe209103..b5d4050fa1 100644 --- a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp +++ b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp @@ -64,7 +64,7 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index 7c5f44e4e3..776c43f808 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -68,7 +68,7 @@ const RuntimeCapabilityTable DG2::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/xe_hpg_core/hw_info_mtl.cpp b/shared/source/xe_hpg_core/hw_info_mtl.cpp index e6f7b6db53..8c2a30e58e 100644 --- a/shared/source/xe_hpg_core/hw_info_mtl.cpp +++ b/shared/source/xe_hpg_core/hw_info_mtl.cpp @@ -64,7 +64,7 @@ const RuntimeCapabilityTable MTL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - true, // sourceLevelDebuggerSupported + false, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/test/common/libult/source_level_debugger_library.cpp b/shared/test/common/libult/source_level_debugger_library.cpp index c67006bba5..e58a96d62d 100644 --- a/shared/test/common/libult/source_level_debugger_library.cpp +++ b/shared/test/common/libult/source_level_debugger_library.cpp @@ -35,6 +35,9 @@ void *DebuggerLibrary::getProcAddress(const std::string &procName) { } OsLibrary *DebuggerLibrary::load(const std::string &name) { + if (interceptor) { + interceptor->loadCalled = true; + } if (isLibraryAvailable) { return new DebuggerLibrary(); } diff --git a/shared/test/common/libult/source_level_debugger_library.h b/shared/test/common/libult/source_level_debugger_library.h index ed440f30ca..4c0dd6306a 100644 --- a/shared/test/common/libult/source_level_debugger_library.h +++ b/shared/test/common/libult/source_level_debugger_library.h @@ -36,6 +36,7 @@ struct DebuggerLibraryInterceptor { bool kernelDebugDataCalled = false; bool initCalled = false; bool deviceDestructionCalled = false; + bool loadCalled = false; int newDeviceRetVal = 0; int sourceCodeRetVal = 0; diff --git a/shared/test/common/test_macros/header/common_matchers.h b/shared/test/common/test_macros/header/common_matchers.h index f79bbd1ec7..7a75567de8 100644 --- a/shared/test/common/test_macros/header/common_matchers.h +++ b/shared/test/common/test_macros/header/common_matchers.h @@ -85,3 +85,21 @@ using IsNotPvcOrDg2 = IsNotWithinProducts; using HasStatefulSupport = IsNotAnyGfxCores; using HasNoStatefulSupport = IsAnyGfxCores; + +using HasSourceLevelDebuggerSupport = IsAnyProducts; \ No newline at end of file diff --git a/shared/test/unit_test/compiler_interface/linker_tests.cpp b/shared/test/unit_test/compiler_interface/linker_tests.cpp index 7352a6dd43..c20af15471 100644 --- a/shared/test/unit_test/compiler_interface/linker_tests.cpp +++ b/shared/test/unit_test/compiler_interface/linker_tests.cpp @@ -22,6 +22,7 @@ #include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/mocks/mock_modules_zebin.h" #include "shared/test/common/mocks/ult_device_factory.h" +#include "shared/test/common/test_macros/hw_test.h" #include "RelocationInfo.h" #include "gtest/gtest.h" @@ -1987,10 +1988,9 @@ TEST(LinkerTests, givenImplicitArgRelocationAndStackCallsThenPatchRelocationWith EXPECT_TRUE(kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs); } -TEST(LinkerTests, givenImplicitArgRelocationAndEnabledDebuggerThenPatchRelocationWithSizeOfImplicitArgStructAndUpdateKernelDescriptor) { - if (!defaultHwInfo->capabilityTable.debuggerSupported) { - GTEST_SKIP(); - } +using LinkerDebuggingSupportedTests = ::testing::Test; + +HWTEST2_F(LinkerDebuggingSupportedTests, givenImplicitArgRelocationAndEnabledDebuggerThenPatchRelocationWithSizeOfImplicitArgStructAndUpdateKernelDescriptor, HasSourceLevelDebuggerSupport) { NEO::LinkerInput linkerInput; vISA::GenRelocEntry reloc = {}; @@ -2022,7 +2022,10 @@ TEST(LinkerTests, givenImplicitArgRelocationAndEnabledDebuggerThenPatchRelocatio DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - UltDeviceFactory deviceFactory{1, 0}; + NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; + hwInfo.capabilityTable.debuggerSupported = true; + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + UltDeviceFactory deviceFactory{1, 0, *executionEnvironment}; auto device = deviceFactory.rootDevices[0]; EXPECT_NE(nullptr, device->getDebugger()); @@ -2149,10 +2152,7 @@ TEST(LinkerTests, givenNoImplicitArgRelocationAndStackCallsThenImplicitArgsAreNo EXPECT_FALSE(kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs); } -TEST(LinkerTests, givenNoImplicitArgRelocationAndEnabledDebuggerThenImplicitArgsAreNotRequired) { - if (!defaultHwInfo->capabilityTable.debuggerSupported) { - GTEST_SKIP(); - } +HWTEST2_F(LinkerDebuggingSupportedTests, givenNoImplicitArgRelocationAndEnabledDebuggerThenImplicitArgsAreNotRequired, HasSourceLevelDebuggerSupport) { NEO::LinkerInput linkerInput; NEO::Linker linker(linkerInput); @@ -2173,7 +2173,10 @@ TEST(LinkerTests, givenNoImplicitArgRelocationAndEnabledDebuggerThenImplicitArgs DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - UltDeviceFactory deviceFactory{1, 0}; + NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; + hwInfo.capabilityTable.debuggerSupported = true; + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + UltDeviceFactory deviceFactory{1, 0, *executionEnvironment}; auto device = deviceFactory.rootDevices[0]; EXPECT_NE(nullptr, device->getDebugger()); diff --git a/shared/test/unit_test/gen11/test_device_caps_gen11.cpp b/shared/test/unit_test/gen11/test_device_caps_gen11.cpp index 55b463485c..f07141f635 100644 --- a/shared/test/unit_test/gen11/test_device_caps_gen11.cpp +++ b/shared/test/unit_test/gen11/test_device_caps_gen11.cpp @@ -16,6 +16,10 @@ using namespace NEO; using Gen11DeviceCaps = Test; +GEN11TEST_F(Gen11DeviceCaps, givenGen11ThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + GEN11TEST_F(Gen11DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsReturned) { EXPECT_TRUE(PreemptionMode::MidThread == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp b/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp index c66661c133..28450b55ea 100644 --- a/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp +++ b/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp @@ -16,6 +16,10 @@ using namespace NEO; using AdlnUsDeviceIdTest = Test; +ADLNTEST_F(AdlnUsDeviceIdTest, givenAdlnThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + ADLNTEST_F(AdlnUsDeviceIdTest, givenAdlnWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp index 3cf3a734ec..d281cfe774 100644 --- a/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp +++ b/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp @@ -16,6 +16,10 @@ using namespace NEO; using AdlpUsDeviceIdTest = Test; +ADLPTEST_F(AdlpUsDeviceIdTest, givenADLPThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + ADLPTEST_F(AdlpUsDeviceIdTest, givenADLPWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp b/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp index fe9e2102cf..44f2271c5a 100644 --- a/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp +++ b/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp @@ -16,6 +16,10 @@ using namespace NEO; using AdlsUsDeviceIdTest = Test; +ADLSTEST_F(AdlsUsDeviceIdTest, givenAdlsThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + ADLSTEST_F(AdlsUsDeviceIdTest, givenAdlsWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp b/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp index 86dbcb9661..71a313a10b 100644 --- a/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp +++ b/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp @@ -16,6 +16,10 @@ using namespace NEO; using Dg1DeviceCaps = Test; +DG1TEST_F(Dg1DeviceCaps, givenDg1ThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + DG1TEST_F(Dg1DeviceCaps, givenDg1WhenCheckSupportCacheFlushAfterWalkerThenFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportCacheFlushAfterWalker); } diff --git a/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl b/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl index 248cc3f217..7b29f8e521 100644 --- a/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl +++ b/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl @@ -14,6 +14,10 @@ using namespace NEO; using Gen12LpDeviceCaps = Test; +GEN12LPTEST_F(Gen12LpDeviceCaps, givenGen12LpThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + GEN12LPTEST_F(Gen12LpDeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsReported) { EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/gen8/test_device_caps_gen8.cpp b/shared/test/unit_test/gen8/test_device_caps_gen8.cpp index 1a63cb7b75..81db34db3e 100644 --- a/shared/test/unit_test/gen8/test_device_caps_gen8.cpp +++ b/shared/test/unit_test/gen8/test_device_caps_gen8.cpp @@ -16,6 +16,10 @@ using namespace NEO; using Gen8DeviceCaps = Test; +GEN8TEST_F(Gen8DeviceCaps, GivenGen8ThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + GEN8TEST_F(Gen8DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenDisabledIsReported) { EXPECT_TRUE(PreemptionMode::Disabled == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/gen9/test_device_caps_gen9.cpp b/shared/test/unit_test/gen9/test_device_caps_gen9.cpp index a050de6ad7..37865339cf 100644 --- a/shared/test/unit_test/gen9/test_device_caps_gen9.cpp +++ b/shared/test/unit_test/gen9/test_device_caps_gen9.cpp @@ -17,6 +17,10 @@ using namespace NEO; using Gen9DeviceCaps = Test; +GEN9TEST_F(Gen9DeviceCaps, givenGen9ThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + GEN9TEST_F(Gen9DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsSupported) { EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp index 65f11e46c2..4ec0b78d43 100644 --- a/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp @@ -18,6 +18,10 @@ using namespace NEO; using XeHpcCoreDeviceCaps = Test; +XE_HPC_CORETEST_F(XeHpcCoreDeviceCaps, givenXeHpcCoreThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + XE_HPC_CORETEST_F(XeHpcCoreDeviceCaps, givenXeHpcCoreWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp index 7a9c602a8b..2a11c6d9a0 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp @@ -15,6 +15,10 @@ using namespace NEO; using Dg2UsDeviceIdTest = Test; +DG2TEST_F(Dg2UsDeviceIdTest, givenDg2ThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + DG2TEST_F(Dg2UsDeviceIdTest, givenDg2ProductWhenCheckBlitterOperationsSupportThenReturnFalse) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.blitterOperationsSupported); } diff --git a/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp index d75ae646c1..9dcb3733fe 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp @@ -13,6 +13,10 @@ using namespace NEO; using MtlUsDeviceIdTest = Test; +MTLTEST_F(MtlUsDeviceIdTest, givenMtlThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + MTLTEST_F(MtlUsDeviceIdTest, givenMtlProductWhenCheckFp64SupportThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64); } diff --git a/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp index 8674ffdaf4..6f8d0b4f0c 100644 --- a/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp @@ -18,6 +18,10 @@ using namespace NEO; using XeHpgCoreDeviceCaps = Test; +XE_HPG_CORETEST_F(XeHpgCoreDeviceCaps, givenXeHpgCoreThenDebuggerIsNotSupported) { + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); +} + XE_HPG_CORETEST_F(XeHpgCoreDeviceCaps, givenXeHpgCoreWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); }