hanchenye-llvm-project/libcxx/test
David Chisnall 8b6a4de64a Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex.
This change removes the spurious m.unlock() call.  

If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked.

llvm-svn: 175506
2013-02-19 11:28:45 +00:00
..
algorithms Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files 2013-01-05 03:21:01 +00:00
atomics atomic_bool was missing (just a typedef to atomic<bool>). 2013-01-04 18:58:50 +00:00
containers Fix exception safety bug in vector::push_back 2013-01-11 20:36:59 +00:00
depr [tests] XFAIL a few things that require libc (?) support missing on Darwin. 2013-02-05 22:10:25 +00:00
diagnostics Fix http://llvm.org/bugs/show_bug.cgi?id=11428. Fix provided by Alberto Ganesh Barbati 2011-12-02 19:36:40 +00:00
input.output [tests] Mark some istream.unformatted expected failures (with system libc++). 2013-02-05 21:43:32 +00:00
iterators Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files 2013-01-05 03:21:01 +00:00
language.support [tests] XFAIL a few things that require libc (?) support missing on Darwin. 2013-02-05 22:10:25 +00:00
localization [tests] One last batch of XFAILs, for tests using new symbols added to libc++. 2013-02-06 00:59:06 +00:00
numerics [tests] Mark another stream input expected failure (with system libc++). 2013-02-05 22:10:28 +00:00
re Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files 2013-01-05 03:21:01 +00:00
strings [tests] Mark some string.conversions expected failures (with system libc++). 2013-02-05 22:10:27 +00:00
support Michael van der Westhuizen: Improve support for testing on Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14892. 2013-01-14 17:12:54 +00:00
thread Fix a bug in mutex_try_to_lock. This was previously trying to unlock a mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex. 2013-02-19 11:28:45 +00:00
utilities [tests] One last batch of XFAILs, for tests using new symbols added to libc++. 2013-02-06 00:59:06 +00:00
CMakeLists.txt Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable was already in use, conflicting with something else in the LLVM tree. Contributed by Ruben Van Boxem. 2012-03-19 15:40:23 +00:00
lit.cfg [tests] Add support for a link_flags lit parameter. 2013-02-12 19:28:51 +00:00
lit.site.cfg.in
nothing_to_do.pass.cpp
testit Move common header files into a 'support' directory; make 'testit' include -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files 2013-01-05 03:21:01 +00:00