If the compiler is (for example) AppleClang 10.0.1, we would previously
populate the following lit features:
apple-clang
apple-clang-10
apple-clang-10.0
This patch additionally populates a feature called 'apple-clang-10.0.1',
which allows more precise enabling/disabling of tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369406 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Quote the value of environment variables when passing them to the SSH
client in SSHExecutor in libc++'s lit utilities. Without the quotes,
an environment variable like FOO="buzz bar" gets passed incorrectly
like this, ssh env FOO=buzz bar, which causes bar to be treated as a
command to run, not part of the environment variable value.
We ran into this when using SSHExecutor to do bringup of our CUDA
libcu++ port on an embedded aarch64 system.
Patch by Bryce Adelstein Lelbach.
Differential Revision: https://reviews.llvm.org/D65960
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit adds a __pstl_config_site header that contains the value of
macros specified at CMake configuration time. It works similarly to
libc++'s __config_site header, except we always include it as a separate
file instead of concatenating it to the main configuration header.
It is necessary to thread the includes for that header into libc++'s
lit configuration, otherwise we'd be requiring an installation step
prior to running the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368284 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when
configuring libc++ in CMake. When that option is enabled, libc++ will
assume that the PSTL can be found somewhere on the CMake module path,
and it will provide the C++17 parallel algorithms based on the PSTL
(that is assumed to be available).
The commit also adds support for running the PSTL tests as part of
the libc++ test suite.
The first attempt to commit this failed because it exposed a bug in the
tests for modules. Now that this has been fixed, it should be safe to
commit this.
Reviewers: EricWF
Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60480
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367903 91177308-0d34-0410-b5e6-96231b3b80d8
There are a handful of standard library types that are intended
to support CTAD but don't need any explicit deduction guides to
do so.
This patch adds a dummy deduction guide to those types to suppress
-Wctad-maybe-unsupported (which gets emitted in user code).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367770 91177308-0d34-0410-b5e6-96231b3b80d8
The test configuration contained a bug where we only raised
the __config_site commands to the command line if modules were
enabled for all of the libc++ tests. However there are special
modules-only tests, and these tests weren't getting the correct
defines.
This patch corrects that issue.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367267 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
On AIX psutil can run into problems with permissions to read the process
tree, which causes problems for python timeout tests which need to kill off
a test and it's children.
This patch adds a workaround by invoking shell via subprocess and using a
platform specific option to ps to list all the descendant processes so we can
kill them. We add some checks so lit can tell whether timeout tests are
supported with out exposing whether we are utilizing the psutil
implementation or the alternative.
Reviewers: hubert.reinterpretcast, andusy, davide, delcypher
Reviewed By: delcypher
Subscribers: davide, delcypher, christof, lldb-commits, libcxx-commits, llvm-commits
Tags: #lldb, #libc, #llvm
Differential Revision: https://reviews.llvm.org/D64251
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366912 91177308-0d34-0410-b5e6-96231b3b80d8
libc++'s lit configuration infers the C++ language dialect when it is
not provided by checking which -std= flags that a compiler supports.
GCC 5 and GCC 6 have a -std=c++17 flag, however, they do not have full
C++17 support. The lit configuration has hardcoded logic that removes
-std=c++1z as an option to test for GCC < 7, but not -std=c++17.
This leads to a bunch of failures when running libc++ tests with GCC 5
or GCC 6. This patch adds -std=c++17 to the list of flags that are
discarded for GCC < 7 by lit's language dialect inference.
Thanks to Bryce Adelstein Lelbach for the patch.
Differential Revision: https://reviews.llvm.org/D62874
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366700 91177308-0d34-0410-b5e6-96231b3b80d8
This reverts r366593, which caused unforeseen breakage on the build bots.
I'm reverting until the problems have been figured out and fixed.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366603 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when
configuring libc++ in CMake. When that option is enabled, libc++ will
assume that the PSTL can be found somewhere on the CMake module path,
and it will provide the C++17 parallel algorithms based on the PSTL
(that is assumed to be available).
The commit also adds support for running the PSTL tests as part of
the libc++ test suite.
Reviewers: rodgert, EricWF
Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60480
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366593 91177308-0d34-0410-b5e6-96231b3b80d8
Use binary mode to read test files in libcxx LibcxxTestFormat class.
This ensures that tests are read correctly independently of encoding,
and therefore fixes UnicodeDecodeError when file is opened in Python 3
that defaults to pure ASCII encoding.
Technically this could be also fixed via conditionally appending
encoding argument when opening the file in Python 3. However, since
the code in question only searches for fixed ASCII substrings reading
it in binary mode is simpler and more universal.
Differential Revision: https://reviews.llvm.org/D63346
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@364170 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Ensure we re-export __cxa_throw_bad_array_new_length and
__cxa_uncaught_exceptions from libc++, since they are now
provided by libc++abi.
Doing this allows us to stop linking explicitly against libc++abi in
the libc++abi tests, since libc++ re-exports all the necessary symbols.
However, there is one caveat to that. We don't want libc++ to re-export
__cxa_uncaught_exception (the singular form), since it's only provided
for backwards compatibility. Hence, for the single test where we check
this backwards compatibility, we explicitly link against libc++abi.
PR27405
PR22654
Reviewers: EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60424
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@358690 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Otherwise, it doesn't take into account things like whether the symbol
is defined or undefined, and whether symbols are indirect references
(re-exports) or not.
Reviewers: EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60416
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@358408 91177308-0d34-0410-b5e6-96231b3b80d8
Dylib support for shared_mutex was added in macOS 10.12, so the tests
should be XFAILed accordingly instead of being completely disabled
whenever availability is enabled.
rdar://problem/48769104
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@357079 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: Filesystem doesn't work on Windows, so we need a mechanism to turn it off for the time being.
Reviewers: ldionne, serge-sans-paille, EricWF
Reviewed By: EricWF
Subscribers: mstorsjo, mgorny, christof, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59619
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356633 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch treats <filesystem> as a first-class citizen of the dylib,
like all other sub-libraries (e.g. <chrono>). As such, it also removes
all special handling for installing the filesystem library separately
or disabling part of the test suite from the lit command line.
Unlike the previous attempt (r356500), this doesn't remove all the
filesystem tests.
Reviewers: mclow.lists, EricWF, serge-sans-paille
Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59152
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356518 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch treats <filesystem> as a first-class citizen of the dylib,
like all other sub-libraries (e.g. <chrono>). As such, it also removes
all special handling for installing the filesystem library separately
or disabling part of the test suite from the lit command line.
Reviewers: mclow.lists, EricWF, serge-sans-paille
Subscribers: mgorny, christof, jkorous, dexonsmith, jfb, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59152
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@356500 91177308-0d34-0410-b5e6-96231b3b80d8
Otherwise, when testing trunk libc++ on an older system, lit will think
that the dylib features are disabled. Ideally, we'd have a notion of
running the tests with/without a deployment target (or, equivalently,
a deployment target representing trunk where everything is as recent
as can be). Since we always have a deployment target right now (which
defaults to the current system), we only enable those features when
we're going to also be testing with the system libc++.
We also need to disable the availability markup when we are not running
a system library flavor, because availability markup does not make sense
when building against the trunk libc++ (which has everything regardless
of what the current system is).
This is a re-application of r353319, which had been reverted due to
CI breakage. This time around, I made sure it didn't break our internal
CI before submitting.
This is also a partial undoing of r348296, in spirit at least. However,
with this patch, availability markup is enabled based on whether we're
using a system library or not, whereas previously one could enable
it or disable it arbitrarily. This was confusing as it led to testing
configurations that don't make sense (such as testing a system library
without availability markup, or trunk testing with availability markup).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@355451 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch fixes a lifetime bug when inserting a new container into the debug database. It is
diagnosed by UBSAN when debug mode is enabled. This patch corrects how nodes are constructed
during insertion.
The fix requires unconditionally breaking the debug mode ABI. Users should not expect ABI
stability from debug mode.
Reviewers: ldionne, serge-sans-paille, EricWF
Reviewed By: EricWF
Subscribers: mclow.lists, christof, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D58011
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@355367 91177308-0d34-0410-b5e6-96231b3b80d8
Different versions of python print dictionaries in different orders.
This can mess up diffs when updating ABI lists. This patch uses
pprint.pformat to print the dicts to get a consistent ordering.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353634 91177308-0d34-0410-b5e6-96231b3b80d8
Otherwise, when testing trunk libc++ on an older system, lit will think
that the dylib features are disabled. Ideally, we'd have a notion of
running the tests with/without a deployment target (or, equivalently,
a deployment target representing trunk where everything is as recent
as can be). Since we always have a deployment target right now (which
defaults to the current system), we only enable those features when
we're going to also be testing with the system libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353319 91177308-0d34-0410-b5e6-96231b3b80d8
We're building tests with -nostdlib which means that we need to
explicitly include the builtins library. When using libgcc (default)
we can simply include -lgcc_s on the link line, but when using
compiler-rt builtins we need a complete path to the builtins library.
This path is already available in CMake as <PROJECT>_BUILTINS_LIBRARY,
so we just need to pass that path to lit and if config.compiler_rt is
true, link it to the test.
Prior to this patch, running tests when compiler-rt is being used as
the builtins library was broken as all tests would fail to link, but
with this change running tests when compiler-rt bultins library is
being used should be supported.
Differential Revision: https://reviews.llvm.org/D56701
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353208 91177308-0d34-0410-b5e6-96231b3b80d8
This patch removes some vendor-specific availability XFAILs from the
test suite. In the future, when a new feature is introduced in the
dylib, an availability macro should be created and a matching lit
feature should be created. That way, the test suite can XFAIL whenever
the implementation lacks the necessary feature instead of being
cluttered by vendor-specific annotations.
Right now, those vendor-specific annotations are still somewhat cluttering
the test suite by being in `config.py`, but at least they are localized.
In the future, we could design a way to define those less intrusively or
even automatically based on the availability macros that already exist
in <__config>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353201 91177308-0d34-0410-b5e6-96231b3b80d8
There are several changes:
- Don't stringify Pythonized bools (that's why we're Pythonizing them)
- Support specifying target and sysroot via CMake variables
- Use consistent spelling for --target, --sysroot, --gcc-toolchain
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353137 91177308-0d34-0410-b5e6-96231b3b80d8
to reflect the new license. These used slightly different spellings that
defeated my regular expressions.
We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@351648 91177308-0d34-0410-b5e6-96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@350170 91177308-0d34-0410-b5e6-96231b3b80d8
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349379 91177308-0d34-0410-b5e6-96231b3b80d8
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).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349171 91177308-0d34-0410-b5e6-96231b3b80d8
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++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348871 91177308-0d34-0410-b5e6-96231b3b80d8
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++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348868 91177308-0d34-0410-b5e6-96231b3b80d8
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348867 91177308-0d34-0410-b5e6-96231b3b80d8