summaryrefslogtreecommitdiff
path: root/test/test.rs
AgeCommit message (Collapse)Author
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