llvm-project/libc/utils/testutils
Paula Toth 17566573b2 [libc] Resolve race condition in sub-process test runner.
Summary:
There seems to be a race condition between the pipe closing and the child process death. Likely these two events are not atomic on some versions of linux.

With the removal of `WNOHANG` we eliminate the race condition, however if the child closes the pipe intentionally then it could result in the test runner hanging. I find this situation less likely, where as I experience failures locally with this race condition rather consistently.

Reviewers: sivachandra, abrachet

Reviewed By: sivachandra, abrachet

Subscribers: MaskRay, jfb, tschuett, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D76267
2020-03-17 13:00:00 -07:00
..
CMakeLists.txt [libc] [UnitTest] Add Matchers 2020-03-05 18:36:11 -05:00
ExecuteFunction.h [libc] [UnitTest] Add timeout to death tests 2020-03-11 23:57:20 -04:00
ExecuteFunctionUnix.cpp [libc] Resolve race condition in sub-process test runner. 2020-03-17 13:00:00 -07:00
StreamWrapper.cpp [libc] [NFC] Use matchers in tests 2020-03-07 22:56:03 -05:00
StreamWrapper.h [libc] [UnitTest] Add Matchers 2020-03-05 18:36:11 -05:00