kfdtest: Fix DeviceSnapshot return fail error for KFDDBGTest.HitMemoryViolation

For the case that the child goes to the second raise(SIGSTOP),
and parent sends PTRACE_CONT, than child exits. Parent will assert at
DeviceSnapshot, as in kfd_ioctl, couldn't get the mm from child pid.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>


[ROCm/ROCR-Runtime commit: 91ef44d3ec]
Этот коммит содержится в:
Emily Deng
2025-03-06 17:05:24 +08:00
коммит произвёл Deng, Emily
родитель 1e279a19c3
Коммит 46bb10ff2d
+2 -3
Просмотреть файл
@@ -584,9 +584,6 @@ TEST_F(KFDDBGTest, HitMemoryViolation) {
ASSERT_NE(deviceId, -1);
ASSERT_EQ(queryMask, memViolMask);
// Assume tracee queue has died and halted process
ptrace(PTRACE_CONT, childPid, NULL, NULL);
const std::vector<int> gpuNodes = m_NodeInfo.GetNodesWithGPU();
uint32_t snapshotSize = gpuNodes.size();
struct kfd_dbg_device_info_entry deviceInfo[snapshotSize];
@@ -602,6 +599,8 @@ TEST_F(KFDDBGTest, HitMemoryViolation) {
break;
}
}
// Assume tracee queue has died and halted process
ptrace(PTRACE_CONT, childPid, NULL, NULL);
debug->Detach();