summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-11-12test_unistd: Add test for getgrouplist/initgroups()Jamie Hewland
2017-11-12test_unistd: Add test for getgroups/setgroups()Jamie Hewland
2017-11-08Add process_vm_readv and process_vm_writevGeoffrey Thomas
2017-10-20Merge #780bors[bot]
780: Add a test for ppoll r=Susurrus a=asomers
2017-10-14Add a test for ppollAlan Somers
2017-10-11added unistd::mkfifo #602Jakub Pastuszek
2017-10-07Add test for 'fallocate'Sanchayan Maity
2017-10-07Merge #773bors[bot]
773: Add more accessors for AioCb r=asomers a=asomers
2017-10-05Fix variable does not need to be mutable warning for aio testSanchayan Maity
This fixes the following warning during run of cargo test warning: variable does not need to be mutable --> test/sys/test_aio.rs:16:13 | 16 | fn poll_aio(mut aiocb: &mut AioCb) -> Result<()> { | ^^^^^^^^^ | = note: #[warn(unused_mut)] on by default
2017-10-02Add more accessors for AioCbAlan Somers
2017-09-06Merge pull request #762 from Mic92/stat-testsAlan Somers
test/test_stat.rs: test correct stat function
2017-09-04test/test_stat.rs: use matching tempdir name for test_fstatatJörg Thalheim
2017-09-04test/test_stat.rs: test correct stat functionJörg Thalheim
2017-09-03Fixed error handling in `AioCb::{fsync,read,write}`Alan Somers
Previously, the `AioCb`'s `in_progress` field would erroneously be set to `true`, even if the syscall had an error Fixes #714
2017-09-03AioCb::Drop will now panic for in-progress AioCbAlan Somers
Printing a warning message to stderr isn't really appropriate, because there's no way to guarantee that stderr is even valid. Nor is aio_suspend necessarily an appropriate action to take.
2017-09-03Merge #746bors[bot]
746: Replace socket FFI with libc versions r=asomers a=Susurrus Getting this up there to get some CI run on it. Replacing the `msghdr`, `cmsghdr`, and other FFI function declarations will be a little more involved so I wanted to run this through first.
2017-08-30Merge #745bors[bot]
745: Use upstream libc definitions for fcntl FFI r=asomers a=Susurrus
2017-08-29Use upstream libc definitions for fcntl FFIBryant Mairs
2017-08-28Moved ptrace constants into enum types added minor functionality.xd009642
Used the libc_enum! macro to create enums for the ptrace event, request, and libc_bitflags for options constants defined in libc. Also, replicated functionality to move from c_int to PtraceEvent enum in PR #728 as it appears to be abandoned. Added utility function for detaching from tracee. Updated names and removed ptrace::ptrace namespace
2017-08-26Fix unused variable in testsBryant Mairs
2017-08-24Mark and document pty::ptsname() as unsafeNelson Chen
`ptsname()` mutates global variables and mutating global variables is always considered `unsafe` by Rust. Reference: https://github.com/nix-rust/nix/pull/742#issuecomment-324385919
2017-08-18unistd: add fexecve()Luca Bruno
This adds fexecve() to `nix::unistd`. It is available in libc since 0.2.29. Ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html
2017-08-17Merge #700bors[bot]
700: Get rid of a lot of transmutes r=asomers Most could be replaced by simple raw pointer casts (or even perfectly safe coercions!). cc #373
2017-08-11Merge #701bors[bot]
701: Calculate `nfds` parameter for `select` r=asomers Doing this behind the scenes makes the API less error-prone and easier to use. It should also fix my issue in https://github.com/nix-rust/nix/issues/679#issuecomment-316838148
2017-08-11Get rid of a lot of transmutesJonas Schievink
Most could be replaced by simple raw pointer casts (or even perfectly safe coercions!). cc #373
2017-08-11Calculate `nfds` parameter for `select`Jonas Schievink
Doing this behind the scenes makes the API less error-prone and easier to use. It should also fix https://github.com/nix-rust/nix/issues/679#issuecomment-316838148
2017-08-10Merge remote-tracking branch 'upstream/master' into ptrace-noregMarcin Mielniczuk
2017-08-09Merge #688bors[bot]
688: Support for OpenBSD r=Susurrus Fixes #685 These changes get nix building on OpenBSD 6.1. There is one failing test that I want a little guidance on: ``` error[E0308]: mismatched types --> src/sys/event.rs:333:30 | 333 | assert!(expected.data == actual.data()); | ^^^^^^^^^^^^^ expected i64, found isize ``` `KEvent::data` is: ``` pub fn data(&self) -> intptr_t { self.kevent.data as intptr_t } ``` I assume the test should be updated to cast to the expected type but wanted to confirm that before making the change.
2017-08-08Add a convenience method .pid() to WaitStatus.Marcin Mielniczuk
2017-08-05Fix tests on OpenBSDWesley Moore
There appears to be some interaction with test_pathconf_limited and another one when they are run in parallel, causing it to return ENOENT so the path has been changed from . to /.
2017-08-03Merge remote-tracking branch 'upstream/master' into ptrace-noregMarcin Mielniczuk
2017-08-02Reword the comment.Marcin Mielniczuk
2017-08-01add SockProtocol type for third argument of socket and socketpairNicolas Dusart
2017-07-31Extra docMarcin Mielniczuk
2017-07-31Add a line break.Marcin Mielniczuk
2017-07-31Possibly fix tests failing on qemu architectures.Marcin Mielniczuk
2017-07-31Add tests for ptrace::contMarcin Mielniczuk
2017-07-31support delivering a signal with ptrace::contMarcin Mielniczuk
2017-07-30Merge #672bors[bot]
672: add poll module in Android r=Susurrus `poll` functions are defined in Android as well. libc is missing some constant, but once rust-lang/libc#663 is merged, it'll be good to merge here. Closes #711
2017-07-26add poll module for all platformsNicolas Dusart
2017-07-26Mark nix::sys::ptrace::ptrace as unsafe, add safe variants of source routines.Marcin Mielniczuk
These include: * PTRACE_TRACEME * PTRACE_CONT * PTRACE_ATTACH * PTRACE_SYSCALL
2017-07-25Remove the TODO comments, add unwrap() for ptrace.Marcin Mielniczuk
2017-07-25Fix the tests compilingMarcin Mielniczuk
2017-07-25Disable failing tests on mips64Bryant Mairs
These are assumed to be QEMU issues, as they also fail on mips.
2017-07-25Replace remaining process::exit with libc::_exitJonas Schievink
Note that ptrace isn't documented as signal-safe, but it's supposed to just be a light syscall wrapper, so it should be fine.
2017-07-25Remove unneeded localJonas Schievink
2017-07-25Document invariants of fork and fix testsJonas Schievink
Some tests were invoking non-async-signal-safe functions from the child process after a `fork`. Since they might be invoked in parallel, this could lead to problems.
2017-07-25Allow doc attributes in ioctl macroroblabla
2017-07-25use std::env::temp_dir() to retrieve the temp directory in test_mkstempNicolas Dusart
2017-07-25Add WaitStatus::PtraceSyscall for use with PTRACE_O_TRACESYSGOODGeoffrey Thomas
The recommended way to trace syscalls with ptrace is to set the PTRACE_O_TRACESYSGOOD option, to distinguish syscall stops from receiving an actual SIGTRAP. In C, this would cause WSTOPSIG to return SIGTRAP | 0x80, but nix wants to parse that as an actual signal. Add another wait status type for syscall stops (in the language of the ptrace(2) manpage, "PTRACE_EVENT stops" and "Syscall-stops" are different things), and mask out bit 0x80 from signals before trying to parse it. Closes #550