Fix intermittent test failure in paltest_namedmutex_test1
authorKoundinya Veluri <kouvel@microsoft.com>
Mon, 23 May 2016 20:34:27 +0000 (13:34 -0700)
committerKoundinya Veluri <kouvel@microsoft.com>
Mon, 23 May 2016 20:41:36 +0000 (13:41 -0700)
commitbdbe6434dd0576f9ceba88207d791e674bd4a9f6
tree3a3b25f1cec79d7c35c7f2ddd94c6da97f8761e6
parent7b7bdfb01ed929592561388ba392eddb66fee227
Fix intermittent test failure in paltest_namedmutex_test1

Fixes dotnet/coreclr#5169:
- Child thread/process was not closing their test mutex before indicating completion to the parent thread/process
- Fixed by enclosing the actual child test code in braces to force closing before the cleanup code runs. This is a minimal fix for the issue, I have a separate change that generally improves and refactors the tests further.

Commit migrated from https://github.com/dotnet/coreclr/commit/f60d720fce00189236fcf7f171b8aa5aece618d7
src/coreclr/src/pal/tests/palsuite/threading/NamedMutex/test1/namedmutex.cpp