summaryrefslogtreecommitdiff
path: root/test/test.rs
AgeCommit message (Collapse)Author
2017-11-12groups tests: Add groups mutex and print message when tests skippedJamie Hewland
Fix groups mutex name
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-07-26add poll module for all platformsNicolas Dusart
2017-07-19Fix thread safety issues in pty and termios testsAlan Somers
ptsname(3) returns a pointer to a global variable, so it isn't thread-safe. Protect it with a mutex.
2017-07-18Remove signalfd feature in favor of conditional compilationBryant Mairs
Note that this is now only available for Linux as support is missing in libc for Android (see rust-lang/libc#671). As part of this work the SIGUSR2 signal mutex was altered to be a general signal mutex. This is because all signal handling is shared across all threads in the Rust test harness, so if you alter one signal, depending on whether it's additive or may overwrite the mask for other signals, it could break the other ones. Instead of putting this on the user, just broaden the scope of the mutex so that any altering of signal handling needs to use it.
2017-07-16Fix thread safety issues in aio, chdir, and wait testsAlan Somers
They have four problems: * The chdir tests change the process's cwd, which is global. Protect them all with a mutex. * The wait tests will reap any subprocess, and several tests create subprocesses. Protect them all with a mutex so only one subprocess-creating test will run at a time. * When a multithreaded test forks, the child process can sometimes block in the stack unwinding code. It blocks on a mutex that was held by a different thread in the parent, but that thread doesn't exist in the child, so a deadlock results. Fix this by immediately calling std::process:exit in the child processes. * My previous attempt at thread safety in the aio tests didn't work, because anonymous MutexGuards drop immediately. Fix this by naming the SIGUSR2_MTX MutexGuards. Fixes #251
2017-07-09Fix double close bugs in test_lseek and test_lseek64Alan Somers
std::fs::File closes the underlying file descriptor on Drop, without checking for errors. test_lseek and test_lseek64 also manually close the file descriptor. That works for single threaded test runs. But for multithreaded runs, it causes EBADF errors in other tests. Fix the tests by consuming the File with into_raw_fd(), so its drop method will never be called. Also, fix a potential short read bug in the same tests.
2017-06-12Add openpty()Kelvin Ly
2017-05-16Add various pty functionsBryant Mairs
* grantpt * ptsname/ptsname_r * posix_openpt * unlockpt
2017-04-15tests should protect concurrent access to signal handlersAlan Somers
Adds a mutex to protect access to SIGUSR2 signal handlers by the AIO tests. Fixes #578
2016-11-18Improve portability of test_getsocknameAlan Somers
test_getsockname used an IPv4 socket and assumed that localhost was "127.0.0.1". But that assumption doesn't hold on IPv6-only hosts or on shared-IP FreeBSD jails. Unfortunately, the Rust standard library doesn't provide a good way to resolve localhost. So change the test to use a unix-domain socket instead.
2016-02-14linux: Add splice(2), tee(2), vmsplice(2)Kamal Marhubi
2016-02-12linux: Add sendfile(2)Kamal Marhubi
2016-01-27Add test for if_nametoindexKamal Marhubi
2016-01-25Add everything from poll.h.Utkarsh Kukreti
2016-01-13Use tempdir for temporary files in testsKamal Marhubi
2015-08-12Fix testsCorey Richardson
2015-07-09Run 32 bit CI buildsCarl Lerche
2015-04-27Basic Posix MQ supportMarkus Jais
2015-04-03'derive(Copy)' needs Clone nowFlorian Hartwig
2015-03-25Use libc from crates.ioCarl Lerche
2015-03-25Track Rust masterCarl Lerche
2015-03-19Track Rust nightliesCarl Lerche
2015-03-16Fix deprecation warningsCarl Lerche
2015-02-25Large cleanup, mostly of socket functionsCarl Lerche
2015-02-21Fix uio and add SockAddr conversionsCarl Lerche
2015-02-21Cleanup readv & writev + testsCarl Lerche