diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2017-08-28 13:18:42 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2017-08-28 13:18:42 +0000 |
commit | bc1cc08c077b2f67aa43f6219fedaf972dde5bcf (patch) | |
tree | 73ad7236d34cdf1bfc59832c4bbb77ea34a4ff36 /test | |
parent | 202f30e64df0e43493db28473d15048d686ea31f (diff) | |
parent | 178451910ee67ae226b8bdc5c01bf43ea8e5a9f8 (diff) | |
download | nix-bc1cc08c077b2f67aa43f6219fedaf972dde5bcf.zip |
Merge #749
749: Moved ptrace constants into enum types plus minor additions r=Susurrus a=xd009642
Reopening of #734 hence the branch name, changelog will be updated once the pr number of this new pull request is known.
Diffstat (limited to 'test')
-rw-r--r-- | test/sys/test_ptrace.rs | 3 | ||||
-rw-r--r-- | test/sys/test_wait.rs | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/test/sys/test_ptrace.rs b/test/sys/test_ptrace.rs index 16b24110..20cde1aa 100644 --- a/test/sys/test_ptrace.rs +++ b/test/sys/test_ptrace.rs @@ -16,8 +16,7 @@ fn test_ptrace() { // Just make sure ptrace_setoptions can be called at all, for now. #[test] fn test_ptrace_setoptions() { - use nix::sys::ptrace::ptrace::PTRACE_O_TRACESYSGOOD; - let err = ptrace::setoptions(getpid(), PTRACE_O_TRACESYSGOOD).unwrap_err(); + let err = ptrace::setoptions(getpid(), ptrace::PTRACE_O_TRACESYSGOOD).unwrap_err(); assert!(err != Error::UnsupportedOperation); } diff --git a/test/sys/test_wait.rs b/test/sys/test_wait.rs index 0193e262..0fcaa19c 100644 --- a/test/sys/test_wait.rs +++ b/test/sys/test_wait.rs @@ -55,7 +55,7 @@ fn test_waitstatus_pid() { #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] mod ptrace { use nix::sys::ptrace; - use nix::sys::ptrace::ptrace::*; + use nix::sys::ptrace::*; use nix::sys::signal::*; use nix::sys::wait::*; use nix::unistd::*; @@ -81,7 +81,7 @@ mod ptrace { assert_eq!(waitpid(child, None), Ok(WaitStatus::PtraceSyscall(child))); // Then get the ptrace event for the process exiting assert!(ptrace::cont(child, None).is_ok()); - assert_eq!(waitpid(child, None), Ok(WaitStatus::PtraceEvent(child, SIGTRAP, PTRACE_EVENT_EXIT))); + assert_eq!(waitpid(child, None), Ok(WaitStatus::PtraceEvent(child, SIGTRAP, Event::PTRACE_EVENT_EXIT as i32))); // Finally get the normal wait() result, now that the process has exited assert!(ptrace::cont(child, None).is_ok()); assert_eq!(waitpid(child, None), Ok(WaitStatus::Exited(child, 0))); |