mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
L0 Debug - Change interrupt return code to match linux
Signed-off-by: Yates, Brandon <brandon.yates@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3bf416212b
commit
43ddabd8e6
@@ -580,12 +580,12 @@ ze_result_t DebugSessionWindows::interruptImp(uint32_t deviceIndex) {
|
||||
auto status = runEscape(escapeInfo);
|
||||
if (STATUS_SUCCESS != status) {
|
||||
PRINT_DEBUGGER_ERROR_LOG("DBGUMD_ACTION_EU_CONTROL_INT_ALL: Failed - Status: 0x%llX EscapeReturnStatus: %d\n", status, escapeInfo.KmEuDbgL0EscapeInfo.EscapeReturnStatus);
|
||||
return DebugSessionWindows::translateNtStatusToZeResult(status);
|
||||
return ZE_RESULT_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
if (DBGUMD_RETURN_ESCAPE_SUCCESS != escapeInfo.KmEuDbgL0EscapeInfo.EscapeReturnStatus) {
|
||||
PRINT_DEBUGGER_ERROR_LOG("DBGUMD_ACTION_EU_CONTROL_INT_ALL: Failed - Status: 0x%llX EscapeReturnStatus: %d\n", status, escapeInfo.KmEuDbgL0EscapeInfo.EscapeReturnStatus);
|
||||
return DebugSessionWindows::translateEscapeReturnStatusToZeResult(escapeInfo.KmEuDbgL0EscapeInfo.EscapeReturnStatus);
|
||||
return ZE_RESULT_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
PRINT_DEBUGGER_INFO_LOG("DBGUMD_ACTION_EU_CONTROL_INT_ALL - Success\n");
|
||||
|
||||
@@ -1794,13 +1794,17 @@ TEST_F(DebugApiWindowsTest, GivenErrorCasesWhenInterruptImpIsCalledThenErrorIsRe
|
||||
session->debugHandle = MockDebugSessionWindows::mockDebugHandle;
|
||||
|
||||
mockWddm->ntStatus = STATUS_WAIT_1;
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_UNKNOWN, session->interruptImp(0));
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_NOT_AVAILABLE, session->interruptImp(0));
|
||||
EXPECT_EQ(1u, mockWddm->dbgUmdEscapeActionCalled[DBGUMD_ACTION_EU_CONTROL_INT_ALL]);
|
||||
|
||||
mockWddm->ntStatus = STATUS_SUCCESS;
|
||||
mockWddm->escapeReturnStatus = DBGUMD_RETURN_DEBUGGER_ATTACH_DEVICE_BUSY;
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_NOT_AVAILABLE, session->interruptImp(0));
|
||||
EXPECT_EQ(2u, mockWddm->dbgUmdEscapeActionCalled[DBGUMD_ACTION_EU_CONTROL_INT_ALL]);
|
||||
|
||||
mockWddm->escapeReturnStatus = DBGUMD_RETURN_KMD_DEBUG_ERROR;
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_NOT_AVAILABLE, session->interruptImp(0));
|
||||
EXPECT_EQ(3u, mockWddm->dbgUmdEscapeActionCalled[DBGUMD_ACTION_EU_CONTROL_INT_ALL]);
|
||||
}
|
||||
|
||||
TEST_F(DebugApiWindowsTest, GivenInterruptImpSucceededThenSuccessIsReturned) {
|
||||
|
||||
Reference in New Issue
Block a user