summaryrefslogtreecommitdiffstats
path: root/libcxx/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* [libcxx] Add a script to run CI on MacOSLouis Dionne2019-01-091-0/+153
| | | | | | | CI systems like Green Dragon should use this script so as to make reproducing errors easy locally. llvm-svn: 350740
* Revert "D56064: More tolerance for flaky tests in libc++ on NetBSD"Kamil Rytarowski2019-01-051-7/+0
| | | | | | Requested by EricWF. llvm-svn: 350477
* More tolerance for flaky tests in libc++ on NetBSDKamil Rytarowski2018-12-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Tests marked with the flaky attribute ("FLAKY_TEST.") can still report false positives in local tests and on the NetBSD buildbot. Additionally a number of tests (probably all threaded ones) unmarked with the flaky attribute is flaky on NetBSD. An ideal solution on the libcxx side would be to raise max retries for NetBSD and mark failing tests with the flaky flag, however this adds more maintenance burden and constant monitoring of flaky tests. Reduce the work and handle flaky tests as more flaky on NetBSD and allow flakiness of other tests on NetBSD. Reviewers: mgorny, EricWF Reviewed By: mgorny Subscribers: christof, llvm-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D56064 llvm-svn: 350170
* [test] Add target_info for NetBSD, and XFAIL some of locale testsMichal Gorny2018-12-171-0/+13
| | | | | | | | | | | | | | | | | | | | Add a target_info definition for NetBSD. The definition is based on the one used by FreeBSD, with libcxxrt replaced by libc++abi, and using llvm-libunwind since we need to use its unwinder implementation to build anyway. Additionally, XFAIL the 30 tests that fail because of non-implemented locale features. According to the manual, NetBSD implements only LC_CTYPE part of locale handling. However, there is a locale database in the system and locale specifications are validated against it, so it makes sense to list the common locales as supported. If I'm counting correctly, this change enables additional 43 passing tests. Differential Revision: https://reviews.llvm.org/D55767 llvm-svn: 349379
* Try 2: Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349236
* Fix bug in buildbot start scriptEric Fiselier2018-12-151-1/+1
| | | | llvm-svn: 349235
* Rework docker setup to make it easier to work around bugs on buildbotsEric Fiselier2018-12-153-2/+19
| | | | llvm-svn: 349234
* [libcxx] Make sure use_system_cxx_lib does not override cxx_runtime_root for ↵Louis Dionne2018-12-141-4/+4
| | | | | | | | | | | | DYLD_LIBRARY_PATH Otherwise, even specifying a runtime root different from the library we're linking against won't work -- the library we're linking against is always used. This is undesirable if we try testing something like linking against a recent libc++.dylib but running the tests against an older version (the back-deployment use case). llvm-svn: 349171
* Update google benchmark againEric Fiselier2018-12-143-12/+31
| | | | llvm-svn: 349127
* Update google benchmark versionEric Fiselier2018-12-1417-100/+194
| | | | llvm-svn: 349126
* [libcxx] Only enable the availability LIT feature when we're testing libc++Louis Dionne2018-12-111-2/+4
| | | | | | | | Other standard libraries don't implement availability markup, so it doesn't make sense to e.g. XFAIL tests based on availability markup outside of libc++. llvm-svn: 348871
* [libcxx] Remove the no_default_flags LIT configurationLouis Dionne2018-12-111-36/+32
| | | | | | | | | This is part of an ongoing cleanup of the LIT test suite, where I'm trying to reduce the number of configuration options. In this case, the original intent seemed to be running the test suite with libstdc++, but this is now supported by specifying cxx_stdlib_under_test=libstdc++. llvm-svn: 348868
* [NFC] Fix incorrect (but unreachable) LIT error messageLouis Dionne2018-12-111-3/+1
| | | | | | | | It is unreachable because we test that the cxx_stdlib_under_test is in the supported set of libraries elsewhere. Furthermore, this code relied on the `use_stdlib_type`, which is never defined. llvm-svn: 348867
* [libcxx] Remove the availability_markup LIT featureLouis Dionne2018-12-071-4/+1
| | | | | | | It is now equivalent to the 'availability' LIT feature, so there's no reason to keep both. llvm-svn: 348653
* [libcxx] Always convert 'use_system_cxx_lib' to an absolute pathLouis Dionne2018-12-061-0/+1
| | | | | | | | Otherwise, some tests would fail when a relative path was passed, because they'd use the relative path from a different directory than the current working directory. llvm-svn: 348525
* [libcxx] Always enable availability in the lit test suite.Louis Dionne2018-12-041-12/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: Running the tests without availability enabled doesn't really make sense: availability annotations allow catching errors at compile-time instead of link-time. Running the tests without availability enabled allows confirming that a test breaks at link-time under some configuration, but it is more useful to instead check that it should fail at compile-time. Always enabling availability in the lit test suite will greatly simplify XFAILs and troubleshooting of failing tests, which is currently a giant pain because we have these two levels of possible failure: link-time and compile-time. Reviewers: EricWF, mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D55079 llvm-svn: 348296
* [libcxx] Use clang-verify in the lit test suite even when availability is ↵Louis Dionne2018-11-281-3/+0
| | | | | | enabled llvm-svn: 347780
* [NFC][libcxx] Print human-friendly command line when lit test failsLouis Dionne2018-11-221-1/+1
| | | | | | | | We used to print a Python list corresponding to the command. It is more useful to print the joined string so it can be copy/pasted directly when a test fails. llvm-svn: 347471
* [libcxx] Improve error message when an invalid directory is provided as ↵Louis Dionne2018-11-211-1/+1
| | | | | | use_system_cxx_lib llvm-svn: 347435
* [NFC] Rename lit feature to '-fsized-deallocation' for consistencyLouis Dionne2018-11-211-1/+1
| | | | | | | The '-faligned-allocation' flag uses a feature with the same name (with a leading dash). llvm-svn: 347367
* Add docker configurations used by the buildbots.Eric Fiselier2018-11-197-0/+676
| | | | | | | These are the scripts I use to create the docker images for the build bots and run them. llvm-svn: 347244
* Remove BUILD file from google-benchmarkBenjamin Kramer2018-11-161-65/+0
| | | | | | This was removed in r336666, but accidentally re-added in r346984. llvm-svn: 347046
* Upgrade Google Benchmark library to ToTEric Fiselier2018-11-1557-863/+2966
| | | | llvm-svn: 346984
* Get tests compiling with -Wunused-local-typedefEric Fiselier2018-11-151-3/+0
| | | | llvm-svn: 346914
* Rename cxx-benchmark-unittests target and convert to LIT.Eric Fiselier2018-11-141-0/+122
| | | | | | | | | | | | | | This patch renames the cxx-benchmark-unittests to check-cxx-benchmarks and converts the target to use LIT in order to make the tests run faster and provide better output. In particular this runs each benchmark in a suite one by one, allowing more parallelism while ensuring output isn't garbage with multiple threads. Additionally, it adds the CMake flag '-DLIBCXX_BENCHMARK_TEST_ARGS=<list>' to specify what options are passed when running the benchmarks. llvm-svn: 346888
* [libcxx] [test] Fix running tests on macOS with python3Alexander Richardson2018-11-141-7/+8
| | | | | | | | | | | | | | | | Summary: The result of subprocess.check_output() is bytes in python3 which we need to convert to str(). Simplify this by using the executeCommand() helper. Reviewers: ldionne, EricWF Reviewed By: ldionne Subscribers: christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D54522 llvm-svn: 346878
* Attempt to enable -WconversionEric Fiselier2018-11-081-1/+1
| | | | llvm-svn: 346451
* XFAIL test on OS X availabilityEric Fiselier2018-10-291-1/+1
| | | | llvm-svn: 345529
* [libcxx] Improve reporting when running the lit test suiteLouis Dionne2018-10-171-10/+10
| | | | | | | | | | | | | | | Summary: Running the test suite with -a will now properly show all the executed commands. The reports also include the environment under which the test is being executed, which is helpful for reproducing issues. Reviewers: EricWF Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D53215 llvm-svn: 344700
* [NFC][libc++] Fix broken link in commentLouis Dionne2018-10-121-1/+1
| | | | llvm-svn: 344369
* [libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow ↵Roman Lebedev2018-09-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pre-C++2a [[nodiscard]] Summary: The `[[nodiscard]]` attribute is intended to help users find bugs where function return values are ignored when they shouldn't be. After C++17 the C++ standard has started to declared such library functions as `[[nodiscard]]`. However, this application is limited and applies only to dialects after C++17. Users who want help diagnosing misuses of STL functions may desire a more liberal application of `[[nodiscard]]`. For this reason libc++ provides an extension that does just that! The extension must be enabled by defining `_LIBCPP_ENABLE_NODISCARD`. The extended applications of `[[nodiscard]]` takes two forms: 1. Backporting `[[nodiscard]]` to entities declared as such by the standard in newer dialects, but not in the present one. 2. Extended applications of `[[nodiscard]]`, at the libraries discretion, applied to entities never declared as such by the standard. Users may also opt-out of additional applications `[[nodiscard]]` using additional macros. Applications of the first form, which backport `[[nodiscard]]` from a newer dialect may be disabled using macros specific to the dialect it was added. For example `_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17`. Applications of the second form, which are pure extensions, may be disabled by defining `_LIBCPP_DISABLE_NODISCARD_EXT`. This patch was originally written by me (Roman Lebedev), then but then reworked by Eric Fiselier. Reviewers: mclow.lists, thakis, EricWF Reviewed By: thakis, EricWF Subscribers: llvm-commits, mclow.lists, lebedev.ri, EricWF, rjmccall, Quuxplusone, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D45179 llvm-svn: 342808
* Attempt to unbreak filesystem tests on certain linux distros.Eric Fiselier2018-08-221-1/+6
| | | | | | | | | | | | | | | On some platforms clock_gettime is in librt, which we don't link by default when building the tests. However it is required by the filesystem tests. This patch introduces a workaround which links librt whenever the filesystem tests are enabled. The workaround should later be replaced with a patch that selectively links both libc++fs and librt only when building filesystem specific tests. However, the way the test configuration is set up right now, this is non-trivial. llvm-svn: 340406
* [libcxx] By default, do not use internal_linkage to hide symbols from the ABILouis Dionne2018-08-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: https://reviews.llvm.org/D49240 led to symbol size problems in Chromium, and we expect this may be the case in other projects built in debug mode too. Instead, unless users explicitly ask for internal_linkage, we use always_inline like we used to. In the future, when we have a solution that allows us to drop always_inline without falling back on internal_linkage, we can replace always_inline by that. Note that this commit introduces a change in contract for existing libc++ users: by default, libc++ used to guarantee that TUs built with different versions of libc++ could be linked together. With the introduction of the _LIBCPP_HIDE_FROM_ABI_PER_TU macro, the default behavior is that TUs built with different libc++ versions are not guaranteed to link. This is a change in contract but not a change in behavior, since the current implementation still allows linking TUs built with different libc++ versions together. Reviewers: EricWF, mclow.lists, dexonsmith, hans, rnk Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D50652 llvm-svn: 339874
* Implement <filesystem>Eric Fiselier2018-07-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the <filesystem> header and uses that to provide <experimental/filesystem>. Unlike other standard headers, the symbols needed for <filesystem> have not yet been placed in libc++.so. Instead they live in the new libc++fs.a library. Users of filesystem are required to link this library. (Also note that libc++experimental no longer contains the definition of <experimental/filesystem>, which now requires linking libc++fs). The reason for keeping <filesystem> out of the dylib for now is that it's still somewhat experimental, and the possibility of requiring an ABI breaking change is very real. In the future the symbols will likely be moved into the dylib, or the dylib will be made to link libc++fs automagically). Note that moving the symbols out of libc++experimental may break user builds until they update to -lc++fs. This should be OK, because the experimental library provides no stability guarantees. However, I plan on looking into ways we can force libc++experimental to automagically link libc++fs. In order to use a single implementation and set of tests for <filesystem>, it has been placed in a special `__fs` namespace. This namespace is inline in C++17 onward, but not before that. As such implementation is available in C++11 onward, but no filesystem namespace is present "directly", and as such name conflicts shouldn't occur in C++11 or C++14. llvm-svn: 338093
* Remove BUILD file from google-benchmarkEric Fiselier2018-07-101-65/+0
| | | | llvm-svn: 336666
* Update google-benchark to trunkEric Fiselier2018-07-1066-729/+2671
| | | | llvm-svn: 336635
* Remove old workaround that is no longer neededEric Fiselier2018-07-041-3/+0
| | | | llvm-svn: 336297
* Fix libcxx tests after clang r334677.Richard Smith2018-06-171-3/+7
| | | | | | Feature test macro versions may have a trailing L. llvm-svn: 334917
* Avoid Clang error about throwing _LIBCPP_ASSERT in noexcept function.Eric Fiselier2018-03-221-5/+0
| | | | | | | | | | | | | This fixes a couple of tests which produced a warning that a 'throw' occurred in a noexcept function (by way of _LIBCPP_ASSERT). It does so by hiding the 'throw' across an opaque function boundary. This fix isn't ideal, since we still have _LIBCPP_ASSERT's in functions marked noexcept -- and this problem should be addressed in the future. However, throwing _LIBCPP_ASSERT is really only meant to allow testing of the assertions, and is not yet ready for general use. llvm-svn: 328265
* commit temporary workaround for new Clang exception warningEric Fiselier2018-03-221-0/+5
| | | | llvm-svn: 328186
* Allow passing additional compiler/linker flags for the testsAlexander Richardson2018-02-231-0/+6
| | | | | | | | | | | | | | | | | | | Summary: These flags can be specified using the CMake variables LIBCXX_TEST_LINKER_FLAGS and LIBCXX_TEST_COMPILER_FLAGS. When building the tests for CHERI I need to pass additional flags (such as -mabi=n64 or -mabi=purecap) to the compiler for our test configurations Reviewers: EricWF Reviewed By: EricWF Subscribers: christof, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D42139 llvm-svn: 325914
* Fix test failure on compilers w/o deduction guidesEric Fiselier2018-02-151-1/+2
| | | | llvm-svn: 325205
* Update Google Benchmark libraryEric Fiselier2018-01-1868-2610/+4870
| | | | llvm-svn: 322812
* Fix nodiscard failure tests on compilers w/o -verify.Eric Fiselier2018-01-171-1/+12
| | | | | | | | | | | | | Previously .fail.cpp tests for nodiscard were run with -Wunused-result being a warning, not an error, when the compiler didn't support -verify. When -verify isn't enabled this change judiciously adds -Werror=unused-result when to only the failure tests containing the // expected-error string for nodiscard. As a drive-by change, this patch also adds a missing // UNSUPPORTED: c++2a to a test which was only supposed to run in C++ <= 11. llvm-svn: 322776
* [libcxx] Support the use of compiler-rt in lit testsPetr Hosek2018-01-081-1/+3
| | | | | | | | Don't link tests against libgcc when compiler-rt is being used. Differential Revision: https://reviews.llvm.org/D40513 llvm-svn: 322044
* Attempt to fix template depth test failures on older Clang versionsEric Fiselier2017-11-191-0/+3
| | | | llvm-svn: 318625
* Teach test suite about C++2a dialect flag.Eric Fiselier2017-11-071-2/+3
| | | | | | | | This patch teaches the test suite configuration about the -std=c++2a flag. And, since it's the newest dialect, change the test suite to choose it, if possible, by default. llvm-svn: 317611
* Change test suite to support c++17 dialect flag instead of c++1z.Eric Fiselier2017-11-071-3/+5
| | | | | | | | This patch changes the test suite to attempt and prefer -std=c++17 over -std=c++1z. It also fixes the REQUIRES and UNSUPPORTED lit markers to refer to c++17 over c++1z. llvm-svn: 317610
* [libc++] Support Microsoft ABI without vcruntime headersShoaib Meenai2017-10-091-0/+3
| | | | | | | | | | | | | | | | | The vcruntime headers are hairy and clash with both libc++ headers themselves and other libraries. libc++ normally deals with the clashes by deferring to the vcruntime headers and silencing its own definitions, but for clients which don't want to depend on vcruntime headers, it's desirable to support the opposite, i.e. have libc++ provide its own definitions. Certain operator new/delete replacement scenarios are not currently supported in this mode, which requires some tests to be marked XFAIL. The added documentation has more details. Differential Revision: https://reviews.llvm.org/D38522 llvm-svn: 315234
* [libc++] Add site config option for ABI macrosShoaib Meenai2017-10-041-1/+1
| | | | | | | | | | | | | | | | | Some ABI macros affect headers, so it's nice to have a site config option for them. Add a LIBCXX_ABI_DEFINES cmake macro to allow specifying a list of ABI macros to define in the site config. The primary design constraint (as discussed with Eric on IRC a while back) was to not have to repeat the ABI macro names in cmake, which only leaves a free-form cmake list as an option. A somewhat unfortunate consequence is that we can't verify that the ABI macros being defined actually exist, though we can at least perform some basic sanity checking, since all the ABI macros begin with _LIBCPP_ABI_. Differential Revision: https://reviews.llvm.org/D36719 llvm-svn: 314946
OpenPOWER on IntegriCloud