Skip to content

Commit

Permalink
Remove redundant platform detection in test
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Jul 1, 2019
1 parent ada82dc commit f43e9b4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/sys/test_ptrace.rs
Expand Up @@ -123,17 +123,6 @@ fn test_ptrace_syscall() {

let _m = ::FORK_MTX.lock().expect("Mutex got poisoned by another test");

// FIXME: qemu-user doesn't implement ptrace on all architectures
// and retunrs ENOSYS in this case.
// We (ab)use this behavior to detect the affected platforms
// and skip the test then.
// On valid platforms the ptrace call should return Errno::EPERM, this
// is already tested by `test_ptrace`.
let err = ptrace::attach(getpid()).unwrap_err();
if err == Error::Sys(Errno::ENOSYS) {
return;
}

match fork().expect("Error: Fork Failed") {
Child => {
ptrace::traceme().unwrap();
Expand Down

0 comments on commit f43e9b4

Please sign in to comment.