This patch adds a timeout of 500ms to death tests. As we add multithreaded code and locks, deadlocks become more likely so timeout will be useful.
Additionally:
- Better error handling in invokeSubprocess
- Makes ProcessStatus's methods const
Paths
| Differential D75651
[libc] [UnitTest] Add timeout to death tests ClosedPublic Authored by abrachet on Mar 4 2020, 3:02 PM.
Details Summary This patch adds a timeout of 500ms to death tests. As we add multithreaded code and locks, deadlocks become more likely so timeout will be useful. Additionally:
Diff Detail Event Timeline
PaulkaToast added inline comments.
Comment Actions Added ProcessStatus::timedOut() and better error messages in Test::testProcessExits/Killed Comment Actions This looks ready to me. This revision is now accepted and ready to land.Mar 9 2020, 7:06 PM Closed by commit rGaf0b0e00fba9: [libc] [UnitTest] Add timeout to death tests (authored by abrachet). · Explain WhyMar 11 2020, 9:07 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 248554 libc/utils/UnitTest/Test.cpp
libc/utils/testutils/ExecuteFunction.hlibc/utils/testutils/ExecuteFunctionUnix.cpp |
I think for new projects, we don't have to use VariableName. We should use the ideal case variableName.
https://llvm.org/docs/Proposals/VariableNames.html Everyone agrees that the current VariableName convention is broken. People have concerns with existing code base because renaming can clutter up the history. But for a new project, there is simply not meaningful to start with VariableName.