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>
This commit is contained in:
Emily Deng
2025-03-06 17:05:24 +08:00
کامیت شده توسط Deng, Emily
والد 85c4b0020a
کامیت 91ef44d3ec
@@ -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();