Skip to content

Commit bf93180

Browse files
committed
Remove the TODO comments, add unwrap() for ptrace.
1 parent 6ce39a6 commit bf93180

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/sys/test_wait.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ mod ptrace {
5151
use libc::_exit;
5252

5353
fn ptrace_child() -> ! {
54-
// TODO ptrace::traceme will be added in #666
55-
let _ = ptrace::ptrace(PTRACE_TRACEME, Pid::from_raw(0), ptr::null_mut(), ptr::null_mut());
54+
ptrace::ptrace(PTRACE_TRACEME, Pid::from_raw(0), ptr::null_mut(), ptr::null_mut()).unwrap();
5655
// As recommended by ptrace(2), raise SIGTRAP to pause the child
5756
// until the parent is ready to continue
5857
let _ = raise(SIGTRAP);
@@ -66,11 +65,9 @@ mod ptrace {
6665
assert!(ptrace::setoptions(child, PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXIT).is_ok());
6766

6867
// First, stop on the next system call, which will be exit()
69-
// TODO ptrace::syscall will be added in #666
7068
assert!(ptrace::ptrace(PTRACE_SYSCALL, child, ptr::null_mut(), ptr::null_mut()).is_ok());
7169
assert_eq!(waitpid(child, None), Ok(WaitStatus::PtraceSyscall(child)));
7270
// Then get the ptrace event for the process exiting
73-
// TODO ptrace::cont will be added in #666
7471
assert!(ptrace::ptrace(PTRACE_CONT, child, ptr::null_mut(), ptr::null_mut()).is_ok());
7572
assert_eq!(waitpid(child, None), Ok(WaitStatus::PtraceEvent(child, SIGTRAP, PTRACE_EVENT_EXIT)));
7673
// Finally get the normal wait() result, now that the process has exited

0 commit comments

Comments
 (0)