@@ -51,8 +51,7 @@ mod ptrace {
51
51
use libc:: _exit;
52
52
53
53
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 ( ) ;
56
55
// As recommended by ptrace(2), raise SIGTRAP to pause the child
57
56
// until the parent is ready to continue
58
57
let _ = raise ( SIGTRAP ) ;
@@ -66,11 +65,9 @@ mod ptrace {
66
65
assert ! ( ptrace:: setoptions( child, PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXIT ) . is_ok( ) ) ;
67
66
68
67
// First, stop on the next system call, which will be exit()
69
- // TODO ptrace::syscall will be added in #666
70
68
assert ! ( ptrace:: ptrace( PTRACE_SYSCALL , child, ptr:: null_mut( ) , ptr:: null_mut( ) ) . is_ok( ) ) ;
71
69
assert_eq ! ( waitpid( child, None ) , Ok ( WaitStatus :: PtraceSyscall ( child) ) ) ;
72
70
// Then get the ptrace event for the process exiting
73
- // TODO ptrace::cont will be added in #666
74
71
assert ! ( ptrace:: ptrace( PTRACE_CONT , child, ptr:: null_mut( ) , ptr:: null_mut( ) ) . is_ok( ) ) ;
75
72
assert_eq ! ( waitpid( child, None ) , Ok ( WaitStatus :: PtraceEvent ( child, SIGTRAP , PTRACE_EVENT_EXIT ) ) ) ;
76
73
// Finally get the normal wait() result, now that the process has exited
0 commit comments