-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.4.0
-
Component/s: None
-
None
Currently our test suite can fork() before running the tests.
We use this on *nix because we'd like to continue running the next test case, even if one of them fails, and then in the end we generate test-results.json file that is uploaded to evergreen for graphing.
Prior to fork()ing though, we do a full mongoc initialization and print out a test header with the connection uri and things.
On Windows, this switch doesn't do anything (and the header lies about it fork()ing).
On OSX, using NativeSSL, we hit the problem of its random number generator is not fork() safe.
For the purpose of mongoc generating a random number, we could work around this – but the problem is that the TLS layer uses this fork() unsafe API in its SSLHandshake() method.
This means, due to the initial mongoc bootstrapping and header printout, the fork() children share the entropy with its parent and OSX seems to protect against that by simply abort()ing.
We should unify this on all OSs by always launching a new clean process.
That way we can provide the same test suite experience on Windows and Linux, and not segfault on OSX.
- is duplicated by
-
CDRIVER-1118 Avoid abort() on test failure on windows
- Closed
- is related to
-
CDRIVER-520 Add support for native TLS on OSX (Secure Transport)
- Closed
- related to
-
CDRIVER-1118 Avoid abort() on test failure on windows
- Closed