diff options
author | Marcin Mielniczuk <marmistrz.dev@zoho.eu> | 2017-07-31 17:04:59 +0200 |
---|---|---|
committer | Marcin Mielniczuk <marmistrz.dev@zoho.eu> | 2017-07-31 17:04:59 +0200 |
commit | 9e0d2413a2f4a1ae4c3abb2fd118a5c3b70427ae (patch) | |
tree | 38230bc45d2832e68e3912776e32c4acbe69464a /test/sys | |
parent | 5510bf2c737eea78e7ea938d62d6b4665cf08492 (diff) | |
download | nix-9e0d2413a2f4a1ae4c3abb2fd118a5c3b70427ae.zip |
Possibly fix tests failing on qemu architectures.
Diffstat (limited to 'test/sys')
-rw-r--r-- | test/sys/test_ptrace.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/sys/test_ptrace.rs b/test/sys/test_ptrace.rs index 02c86d88..953ea5fa 100644 --- a/test/sys/test_ptrace.rs +++ b/test/sys/test_ptrace.rs @@ -55,6 +55,12 @@ fn test_ptrace_cont() { use nix::sys::wait::{waitpid, WaitStatus}; use nix::unistd::fork; use nix::unistd::ForkResult::*; + // FIXME: qemu-user doesn't implement ptrace on all arches and gives ENOSYS then. + // use it to filter out the affected platforms + let err = ptrace::attach(getpid()).unwrap_err(); + if err == Error::Sys(Errno::ENOSYS) { + return; + } match fork() { Ok(Child) => { |