summaryrefslogtreecommitdiff
path: root/test/sys/test_ptrace.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-02-20 19:59:26 +0000
committerGitHub <noreply@github.com>2021-02-20 19:59:26 +0000
commit661738cceee4e479ded272a63e3082035b860351 (patch)
treecd7d5d6345777cef2c47561274ab04e7364762a7 /test/sys/test_ptrace.rs
parentde43d7641b351ff2582206798b68baeed42c3117 (diff)
parent7cdae09e2957f8578c9b8cd88934c669a2f3a13b (diff)
downloadnix-661738cceee4e479ded272a63e3082035b860351.zip
Merge #1366
1366: x32 port r=asomers a=nabijaczleweli I played pretty loose with the statfs bit, hoping for CI to tell me if I broke something. Co-authored-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Diffstat (limited to 'test/sys/test_ptrace.rs')
-rw-r--r--test/sys/test_ptrace.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/sys/test_ptrace.rs b/test/sys/test_ptrace.rs
index 38cf408b..b9793b39 100644
--- a/test/sys/test_ptrace.rs
+++ b/test/sys/test_ptrace.rs
@@ -100,7 +100,7 @@ fn test_ptrace_cont() {
ptrace::cont(child, Some(Signal::SIGKILL)).unwrap();
match waitpid(child, None) {
Ok(WaitStatus::Signaled(pid, Signal::SIGKILL, _)) if pid == child => {
- // FIXME It's been observed on some systems (apple) the
+ // FIXME It's been observed on some systems (apple) the
// tracee may not be killed but remain as a zombie process
// affecting other wait based tests. Add an extra kill just
// to make sure there are no zombies.
@@ -150,11 +150,11 @@ fn test_ptrace_syscall() {
// set this option to recognize syscall-stops
ptrace::setoptions(child, ptrace::Options::PTRACE_O_TRACESYSGOOD).unwrap();
- #[cfg(target_pointer_width = "64")]
- let get_syscall_id = || ptrace::getregs(child).unwrap().orig_rax as i64;
+ #[cfg(target_arch = "x86_64")]
+ let get_syscall_id = || ptrace::getregs(child).unwrap().orig_rax as libc::c_long;
- #[cfg(target_pointer_width = "32")]
- let get_syscall_id = || ptrace::getregs(child).unwrap().orig_eax as i32;
+ #[cfg(target_arch = "x86")]
+ let get_syscall_id = || ptrace::getregs(child).unwrap().orig_eax as libc::c_long;
// kill entry
ptrace::syscall(child, None).unwrap();