summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug in mutex_try_to_lock. This was previously trying to unlock a ↵David Chisnall2013-02-191-1/+0
| | | | | | | | | | 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
* [tests] Add support for a link_flags lit parameter.Daniel Dunbar2013-02-121-15/+31
| | | | | | | - This is useful for testing with custom ABI libraries. - Patch by Michael van der Westhuizen. llvm-svn: 174997
* [tests] Another batch of timeout increases.Daniel Dunbar2013-02-118-12/+12
| | | | llvm-svn: 174902
* [tests] Another batch of timeout increases.Daniel Dunbar2013-02-085-5/+5
| | | | llvm-svn: 174726
* [tests] Add back stdc macros I accidentally refactored out.Daniel Dunbar2013-02-081-0/+1
| | | | | | | | | | | | | | | - Patch by Michael van der Westhuizen: -- r174404 accidentally removed stdc format, limit and constant macros from the Linux test runner logic. This small patch re-adds the macros. Making this change fixes the following tests on Linux: - depr/depr.c.headers/inttypes_h.pass.cpp - depr/depr.c.headers/stdint_h.pass.cpp - input.output/file.streams/c.files/cinttypes.pass.cpp - language.support/cstdint/cstdint.syn/cstdint.pass.cpp -- llvm-svn: 174722
* [tests] Increase a bunch of wait limits.Daniel Dunbar2013-02-0811-12/+12
| | | | | | | | | | - Basically I just ran the thread tests many many times on a busy machine and bumped the timeouts whenever I hit a test failure. - This is obviously subpar, but is the best I can do without the tests being rewritten to not depend on arbitrary timeouts. llvm-svn: 174721
* Give a lot more timing latitude to some of the timing tests. Busy buildbots ↵Howard Hinnant2013-02-065-8/+8
| | | | | | are hitting the timing limits too often. llvm-svn: 174539
* [tests] Infer the cxx_under_test (as clang++).Daniel Dunbar2013-02-061-4/+11
| | | | | | | | | - This is a reasonable default, and makes testing just work with no required parameters. - Add notes on all of the inferred or default values. llvm-svn: 174538
* [tests] Change test default to run against locally built library.Daniel Dunbar2013-02-061-3/+3
| | | | llvm-svn: 174528
* [tests] Enable use_system_lib support on Linux.Daniel Dunbar2013-02-061-1/+2
| | | | | | - Patch by Michael van der Westhuizen. llvm-svn: 174527
* [tests] One last batch of XFAILs, for tests using new symbols added to libc++.Daniel Dunbar2013-02-0616-0/+80
| | | | | | | - As of this commit, the test suite should now fully pass on both darwin11 and darwin12 when testing against either a locally built libc++ or the system libc++. llvm-svn: 174478
* [tests] Accept XFAIL arguments that match any part of a feature.Daniel Dunbar2013-02-061-3/+4
| | | | llvm-svn: 174469
* [tests] XFAIL some locale tests that don't seem to work on any Darwin.Daniel Dunbar2013-02-058-0/+16
| | | | llvm-svn: 174459
* [tests] If no explicit target triple is given, try to infer it.Daniel Dunbar2013-02-051-2/+7
| | | | llvm-svn: 174454
* [tests] Mark another stream input expected failure (with system libc++).Daniel Dunbar2013-02-051-0/+2
| | | | llvm-svn: 174453
* [tests] Mark another stream input expected failure (with system libc++).Daniel Dunbar2013-02-051-0/+2
| | | | llvm-svn: 174452
* [tests] Mark some string.conversions expected failures (with system libc++).Daniel Dunbar2013-02-052-0/+6
| | | | llvm-svn: 174451
* [tests] XFAIL a few things that require libc (?) support missing on Darwin.Daniel Dunbar2013-02-054-0/+8
| | | | llvm-svn: 174450
* [tests] Mark some istream.unformatted expected failures (with system libc++).Daniel Dunbar2013-02-054-0/+9
| | | | llvm-svn: 174444
* [tests] Add an available feature that combines the triple and use_system_lib.Daniel Dunbar2013-02-051-0/+8
| | | | | | | - This is so that we can easily write XFAIL markers for tests that are known to fail with versions of libc++ as were shipped with a particular triple. llvm-svn: 174443
* [tests] Add support for REQUIRES and XFAIL lines in libc++ tests.Daniel Dunbar2013-02-051-1/+68
| | | | | | | | | | - We parse up to the first non-empty non-comment (C++ style) line, otherwise the format and semantics match what is used for LLVM/Clang tests. - For now, the only interesting thing to test against is a user supplied target_triple test parameter. llvm-svn: 174440
* [tests] Add a 'use_system_lib' parameter.Daniel Dunbar2013-02-051-11/+37
| | | | | | | | | | | - This controls whether to execute against the locally built library or not. The default is currently True which maps to what was already being done by default. - I'd appreciate it if someone can implement the proper handling of this flag on linux, I no longer remember the details of its .so handling. llvm-svn: 174404
* Make a few tests optimization-proof. These tests were failing under -O3 ↵Howard Hinnant2013-01-164-4/+4
| | | | | | because the optimizer was eliminating the call to new. llvm-svn: 172631
* Make <cmath> classification macros work with integral types.Howard Hinnant2013-01-141-0/+12
| | | | llvm-svn: 172461
* Fix string conversions functions to throw out_of_range properly. Fixes ↵Howard Hinnant2013-01-142-4/+14
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14919. llvm-svn: 172447
* Michael van der Westhuizen: Improve support for testing on Linux. Fixes ↵Howard Hinnant2013-01-142-6/+30
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14892. llvm-svn: 172436
* Michael van der Westhuizen: Patches for Linux. Fixes ↵Howard Hinnant2013-01-141-1/+1
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14648. llvm-svn: 172435
* Fix exception safety bug in vector::push_backHoward Hinnant2013-01-116-0/+438
| | | | llvm-svn: 172250
* Made test output iterators have value_type of 'void'; matches ones in libraryMarshall Clow2013-01-092-1/+14
| | | | llvm-svn: 171980
* Move common header files into a 'support' directory; make 'testit' include ↵Marshall Clow2013-01-05364-388/+389
| | | | | | -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files llvm-svn: 171594
* atomic_bool was missing (just a typedef to atomic<bool>).Howard Hinnant2013-01-041-0/+57
| | | | llvm-svn: 171498
* ...and then there was one. Only one copy of 'iterators.h' in the test tree ↵Marshall Clow2013-01-04113-762/+152
| | | | | | for libc++ llvm-svn: 171479
* Removed another copy of 'iterators.h' files in libcxx/testMarshall Clow2013-01-0359-336/+58
| | | | llvm-svn: 171456
* Removed several more different 'iterators.h' files in libcxx/testMarshall Clow2013-01-03134-883/+131
| | | | llvm-svn: 171452
* Removed 7 (of 8) different 'iterators.h' files in test/localizationMarshall Clow2013-01-0366-355/+85
| | | | llvm-svn: 171443
* Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.Howard Hinnant2012-12-311-0/+2
| | | | llvm-svn: 171321
* Test case for http://llvm.org/bugs/show_bug.cgi?id=14670.Howard Hinnant2012-12-201-0/+2
| | | | llvm-svn: 170706
* Added static_assert to std::get<N>(std::array) calls to catch "out of ↵Marshall Clow2012-12-181-0/+25
| | | | | | bounds" calls llvm-svn: 170435
* Zhang Xiongpang: Add definitions for const data members. Fixes ↵Howard Hinnant2012-12-1213-0/+308
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14585. llvm-svn: 170026
* Modify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin.Howard Hinnant2012-12-091-0/+28
| | | | llvm-svn: 169686
* tests/lit: Change test default parameters to assume local build.Daniel Dunbar2012-11-271-17/+29
| | | | | | - Also, support overriding them with lit parameters. llvm-svn: 168749
* Add overflow check to tanh(complex) and reduce to finite answer. Fixes ↵Howard Hinnant2012-09-191-0/+1
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=13874 llvm-svn: 164266
* Loosen up the timing requirements on 4 more tests.Howard Hinnant2012-08-044-4/+4
| | | | llvm-svn: 161289
* Andrew Morrow: There are two tests under test/utilities/memory that heap ↵Howard Hinnant2012-08-022-4/+0
| | | | | | | | | | | | | allocate two integers which remain unused and are subsequently leaked, so the test fail when run under valgrind. Unless I'm overlooking a subtle reason why they are needed I think they can be removed, allowing these tests to pass under valgrind. The attached patch removes the variables. If there is a reason for them to exist, I can change this to just delete them at the end of the test. llvm-svn: 161195
* Andrew Morrow: The attached patch updates the lit.config for libc++ unit ↵Howard Hinnant2012-08-021-0/+2
| | | | | | | | | tests so that the valgrind configuration passed to lit.py is used to run .pass tests. llvm-svn: 161193
* Andrew Morrow: This patch fixesHoward Hinnant2012-08-021-1/+1
| | | | | | | | | test/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp to accept '(nil)' as a valid representation for NULL so that the test passes on Linux. The same thing is already done in some other tests, like in /test/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_pointer.pass.cpp. llvm-svn: 161188
* Implement [util.smartptr.shared.atomic]. This is the last unimplementedHoward Hinnant2012-07-3011-0/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | section in libc++. This requires a recompiled dylib. Failure to rebuild the dylib will result in a link-time error if and only if the functions from [util.smartptr.shared.atomic] are used. The implementation is not lock free. After considerable thought, I know of no way to make the implementation lock free. Ideas welcome along that front. But changing the ABI of shared_ptr is not on the table at this point. The mutex used to lock these function is encapsulated by std::__sp_mut. The only thing the client knows about std::__sp_mut is that it has a void* data member, can't be constructed, and has lock and unlock members. Within the binary __sp_mut is currently implemented as a pointer to a std::mutex. That can change in the future without disturbing the ABI (as long as sizeof(__sp_mut) remains constant. I specifically did not make __sp_mut a spin lock as I have a pathological distrust of spin locks. Testing on OS X reveals that the use of std::mutex in this role is not a large performance penalty as long as the contention for the mutex is low (more likely to get the lock than to have to wait). In the future we can still make __sp_mut a spin lock if that is what is desired (without ABI damage). The dylib contains 16 __sp_mut's to be chosen based on the hash of the address of the shared_ptr. The constant 16 is a ball-park reasonable space/time tradeoff. std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity function. I had thought we had already done this, but I was mistaken. All of this is under #if __has_feature(cxx_atomic) even though the implementation is not lock free, because the signatures require access to std::memory_order, which is currently available only under __has_feature(cxx_atomic). llvm-svn: 160940
* <algorithm> no longer needs to include <cstdlib>, but can get away with just ↵Howard Hinnant2012-07-262-0/+2
| | | | | | <cstddef>. This was brought to my attention by Salvatore Benedetto in his port to a bare-metal coretex-m3. This exposed two test bugs where an explicit #include <cstdlib> was needed. llvm-svn: 160786
* noexcept and constexpr applied to <mutex>.Howard Hinnant2012-07-211-1/+8
| | | | llvm-svn: 160604
* noexcept and constexpr applied to <ios>.Howard Hinnant2012-07-211-0/+3
| | | | llvm-svn: 160593
OpenPOWER on IntegriCloud