kfdtest: Fix the childStatus is 0x7f error for KFDDBGTest.HitMemoryViolation
For the case parent goes faster then child, and child hasn't call the second raise(SIGSTOP), then parent's "waitpid(childPid, &childStatus, 0)" will return, and the childStatus will be 0x137f, which is SIGSTOP signal id. Signed-off-by: Emily Deng <Emily.Deng@amd.com>
This commit is contained in:
@@ -599,6 +599,9 @@ TEST_F(KFDDBGTest, HitMemoryViolation) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
waitpid(childPid, &childStatus, 0);
|
||||
while (!WIFSTOPPED(childStatus));
|
||||
|
||||
// Assume tracee queue has died and halted process
|
||||
ptrace(PTRACE_CONT, childPid, NULL, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user