Skip to content

Commit 3192df4

Browse files
committed
Fix tests
1 parent b4f1749 commit 3192df4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/sys/test_ptrace.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use nix::Error;
22
use nix::errno::*;
33
use nix::unistd::*;
4+
use nix::sys::ptrace;
45
use nix::sys::ptrace::*;
56
use nix::sys::ptrace::ptrace::*;
67

@@ -17,21 +18,21 @@ fn test_ptrace() {
1718
// Just make sure ptrace_setoptions can be called at all, for now.
1819
#[test]
1920
fn test_ptrace_setoptions() {
20-
let err = ptrace_setoptions(getpid(), PTRACE_O_TRACESYSGOOD).unwrap_err();
21+
let err = ptrace::setoptions(getpid(), PTRACE_O_TRACESYSGOOD).unwrap_err();
2122
assert!(err != Error::UnsupportedOperation);
2223
}
2324

2425
// Just make sure ptrace_getevent can be called at all, for now.
2526
#[test]
2627
fn test_ptrace_getevent() {
27-
let err = ptrace_getevent(getpid()).unwrap_err();
28+
let err = ptrace::getevent(getpid()).unwrap_err();
2829
assert!(err != Error::UnsupportedOperation);
2930
}
3031

3132
// Just make sure ptrace_getsiginfo can be called at all, for now.
3233
#[test]
3334
fn test_ptrace_getsiginfo() {
34-
match ptrace_getsiginfo(getpid()) {
35+
match ptrace::getsiginfo(getpid()) {
3536
Err(Error::UnsupportedOperation) => panic!("ptrace_getsiginfo returns Error::UnsupportedOperation!"),
3637
_ => (),
3738
}
@@ -41,7 +42,7 @@ fn test_ptrace_getsiginfo() {
4142
#[test]
4243
fn test_ptrace_setsiginfo() {
4344
let siginfo = unsafe { mem::uninitialized() };
44-
match ptrace_setsiginfo(getpid(), &siginfo) {
45+
match ptrace::setsiginfo(getpid(), &siginfo) {
4546
Err(Error::UnsupportedOperation) => panic!("ptrace_setsiginfo returns Error::UnsupportedOperation!"),
4647
_ => (),
4748
}

0 commit comments

Comments
 (0)