diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2017-07-18 03:43:52 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2017-07-18 03:43:52 +0000 |
commit | f8406b8d6244eec0d0870d6fbdfef1671a8ed8ae (patch) | |
tree | 45cbdc9a4bb82f7f036f5573ec44284e4a4cb938 /test/sys/test_epoll.rs | |
parent | 75f55c3f7387db73a0a50a01f027b619684d99ab (diff) | |
parent | 2cd4420279fdf3f45ff443b8fe0f715eb0c18424 (diff) | |
download | nix-f8406b8d6244eec0d0870d6fbdfef1671a8ed8ae.zip |
Merge #638
638: Make aio, chdir, and wait tests thread safe r=Susurrus
Fix thread safety issues in aio, chdir, and wait tests
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
Diffstat (limited to 'test/sys/test_epoll.rs')
0 files changed, 0 insertions, 0 deletions