Skip to content

Commit 2a322a3

Browse files
committed
Auto merge of #292 - posborne:test-stability-improvements, r=kamalmarhubi
testing: increase stability by removing thread parallelism Currently, several of the tests are failing intermittently. After some research it appears that these failures only occur when thread parallelism is enabled (as is the case by default). To test, I just ran the failing tests over and over. I would consistently see errors when running the following: $ while true; do target/debug/test-7ec4d9681e812f6a; done When I forced single threaded execution, I no longer saw failures: $ while true; do RUST_TEST_THREADS=1 target/debug/test-7ec4d9681e812f6a; done I was mostly looking at the test_unistd failures which make calls out to fork() and then make subsequent calls to wait(). In that case there is one parent and the wait() called could (and frequently does) get some random child pid back because it just happened to terminate. That is why when one of the test fails so does the other one. I couldn't think of an obvious fix other than preventing thread parallelism in the short term. The tests still run very quickly. #251 Signed-off-by: Paul Osborne <[email protected]>
2 parents 9f590fb + 896a446 commit 2a322a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ os:
2121
- osx
2222

2323
env:
24-
- ARCH=x86_64
25-
- ARCH=i686
24+
- RUST_TEST_THREADS=1 ARCH=x86_64
25+
- RUST_TEST_THREADS=1 ARCH=i686
2626

2727
script:
2828
- curl -sSL https://raw.githubusercontent.com/carllerche/travis-rust-matrix/master/test | RUST_TEST_THREADS=1 bash

0 commit comments

Comments
 (0)