Revert "fix: Fail device init if kernel debugging is misconfigured"

This reverts commit c122bc51f9.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2025-03-26 12:41:27 +01:00
committed by Compute-Runtime-Automation
parent 214277125d
commit a89113fa1a
7 changed files with 10 additions and 44 deletions

View File

@@ -2094,7 +2094,7 @@ TEST_F(DeviceTests, GivenDebuggingEnabledWhenDeviceIsInitializedThenL0DebuggerIs
EXPECT_NE(nullptr, device->getL0Debugger());
}
TEST_F(DeviceTests, givenDebuggerRequestedByUserAndNotAvailableWhenDeviceIsInitializedThenDeviceIsNullAndErrorIsPrinted) {
TEST_F(DeviceTests, givenDebuggerRequestedByUserAndNotAvailableWhenDeviceIsInitializedThenErrorIsPrintedButNotReturned) {
extern bool forceCreateNullptrDebugger;
VariableBackup backupForceCreateNullptrDebugger{&forceCreateNullptrDebugger, true};
@@ -2109,7 +2109,7 @@ TEST_F(DeviceTests, givenDebuggerRequestedByUserAndNotAvailableWhenDeviceIsIniti
auto output = testing::internal::GetCapturedStderr();
EXPECT_EQ(std::string("Debug mode is not enabled in the system.\n"), output);
EXPECT_EQ(nullptr, device);
EXPECT_EQ(nullptr, device->getL0Debugger());
}
TEST_F(DeviceTests, givenDebuggerRequestedByUserWhenDeviceWithSubDevicesCreatedThenInitializeDebuggerOncePerRootDevice) {

View File

@@ -2269,23 +2269,6 @@ TEST(DrmTest, GivenProductSpecificIoctlHelperAvailableAndDebugFlagToIgnoreIsSetW
EXPECT_EQ(0u, customFuncCalled);
}
TEST(DrmTest, GivenSysFsPciPathWhenCallinggetSysFsPciPathBaseNameThenResultIsCorrect) {
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
class DrmMockPciPath : public DrmMock {
public:
DrmMockPciPath(RootDeviceEnvironment &rootDeviceEnvironment) : DrmMock(rootDeviceEnvironment) {}
std::string mockSysFsPciPath = "/sys/devices/pci0000:00/0000:00:02.0/drm/card0";
std::string getSysFsPciPath() override { return mockSysFsPciPath; }
};
DrmMockPciPath drm{*executionEnvironment->rootDeviceEnvironments[0]};
EXPECT_STREQ("card0", drm.getSysFsPciPathBaseName().c_str());
drm.mockSysFsPciPath = "/sys/devices/pci0000:00/0000:00:02.0/drm/card7";
EXPECT_STREQ("card7", drm.getSysFsPciPathBaseName().c_str());
drm.mockSysFsPciPath = "card8";
EXPECT_STREQ("card8", drm.getSysFsPciPathBaseName().c_str());
}
using DrmHwTest = ::testing::Test;
HWTEST_F(DrmHwTest, GivenDrmWhenSetupHardwareInfoCalledThenGfxCoreHelperIsInitializedFromProductHelper) {
DebugManagerStateRestore restore;
@@ -2308,4 +2291,4 @@ HWTEST_F(DrmHwTest, GivenDrmWhenSetupHardwareInfoCalledThenGfxCoreHelperIsInitia
drm.setupHardwareInfo(&device, false);
EXPECT_TRUE(raii.mockGfxCoreHelper->initFromProductHelperCalled);
}
}