summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2016-03-17[libcxxabi] Disable cxa_thread_atexit_test if unavailableJonas Hahnfeld
The feature check is already in place when building the library but wasn't honored for the tests. Differential Revision: http://reviews.llvm.org/D18205 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@263699 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-04Reducing stack usage of testBen Craig
This test has a lot of classes with large amounts of manually inserted padding in them, presumably to prevent various optimizations. The test then creates lots of these objects on the stack. On embedded targets, this was usually enough to overflow the stack. I moved the objects to global / namespace scope. Since the tests are each in their own namespace, there should be no cross-test conflicts. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@262717 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20[libcxxabi] Make test tolerant of uncommon floating literal demanglingsBen Craig
libcxxabi uses the C99 library's %a format specifier to turn a floating point value into a hexadecimal string representation. The %a format specifier is rather loosely defined in the C spec though, and some C libraries emit a different (but valid) string for a given floating point value. In particular, the C spec only requires that there is a single, non-zero hexadecimal digit on the left of the decimal point. Given that constraint, there are typically four different valid representations of a floating point number. I have updated the test to accept any of the valid representations for demangled floating point literals. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@258311 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20Mark some tests as XFAIL with GCC due to compiler bugsEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@258284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-20Fix link flags order in RUN command.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@258277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19Recommit r256322: Fix PR25898 - Check for incomplete pointers types in ↵Eric Fiselier
can_catch(...) This patch re-commits r256322 and r256323. They were reverted due to a OS X test failure. The test failure has been fixed by libc++ commit r258217. This patch also adds some additional tests. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@258249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-19Add missing license headersEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@258201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15Revert r256322 (and follow-up 256323), the test it added does not pass on OS X.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@257896 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-23Add new tests for throwing incomplete pointer typesEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@256323 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-23Fix PR25898 - Check for incomplete pointers types in can_catch(...)Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@256322 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14Fix LIBCXXABI_HAS_NO_THREADS configuration.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@250316 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14Configure for config site headerEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@250313 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14Add config.project_obj_root to the libc++abi testsuiteEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@250307 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-12Fix Bug 25103 - _cxa_demangle improperly demangles virtual thunks. Thanks to ↵Marshall Clow
Jason King for the report and suggested fix git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@250097 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-08Fix incorrect parsing of arguments for nested functions. Reviewed as ↵Marshall Clow
http://reviews.llvm.org/D13192. Thanks to Anseny Kapoulkine for the patch. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@249649 91177308-0d34-0410-b5e6-96231b3b80d8
2015-09-01Convert LIBCXXABI_BUILD_32_BITS to LLVM_BUILD_32_BITS.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@246516 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-20Fix or disable C++11 tests in C++03 modeEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@245531 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-18Revert r243752, it broke running tests on OS X (PR24491).Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@245325 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31[libc++abi] Allow use just compiled clang++ for testsRenato Golin
Currently, the tests assume the system compiler is the one we want to test, but if we build libcxxabi together with LLVM+Clang, it'll get the wrong compiler. This patch allows us to test if we have clang++ in our /bin directory, and if so, use it. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@243752 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-27[libcxxabi] Add -funwind-tables to the test compilation options.Daniel Sanders
Summary: backtrace_test.pass.cpp depends on unwind tables. These are generated by -funwind-tables which is the default for x86 but not for other targets. Thanks to Nitesh Jain for helping to narrow this down. Fixes PR24148 Reviewers: jroelofs Subscribers: cfe-commits, jroelofs, llvm-commits, hans Differential Revision: http://reviews.llvm.org/D11529 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@243296 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02Implement uncaught_exceptions() to get a count, rather than a bool. Update ↵Marshall Clow
the libc++abi version. Reviewed as http://reviews.llvm.org/D10067 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@238827 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-01Disallow conversions from function pointers to void*.Eric Fiselier
Function pointers and member function pointers cannot be converted to void*. libc++abi incorrectly allows this conversion for function pointers. Review URL: http://reviews.llvm.org/D8811 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@236299 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24libc++abi: move tests backSaleem Abdulrasool
These are apparently related to libc++'s unwind personality handler and not unwind core. Move them back to the correct location. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235765 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24libc++abi: remove the duplicated unwind contentSaleem Abdulrasool
The unwinder has been moved into its own project setup at http://svn.llvm.org/projects/libunwind/trunk. This simply removes the now duplicated content. This move was previously discussed on llvmdev at [1]. [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081507.html git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@235759 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06[libcxxabi] Disallow Base to Derived conversions for catching pointers to ↵Eric Fiselier
members. Summary: I accidentally implemented the 4.11 [conv.mem] conversions for libc++abi in a recent patch. @majnemer pointed out that 5.13 [except.handle] only allows the pointer conversions in 4.10 and not those is 4.11. This patch no longer allows the following example code: ```c++ struct A {}; struct B : public A {}; int main() { try { throw (int A::*)0; } catch (int B::*) { // exception caught here. } } ``` Reviewers: mclow.lists, jroelofs, majnemer Reviewed By: majnemer Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D8845 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@234254 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-02[libcxxabi] Fix multi-level pointer conversions and pointer to member ↵Eric Fiselier
conversion detection. Summary: Currently there are bugs in out detection of multi-level pointer conversions and pointer to member conversions. This patch fixes the following issues. * Allow multi-level pointers with different nested qualifiers. * Allow multi-level mixed pointers to objects and pointers to members with different nested qualifiers. * Allow conversions from `int Base::*` to `int Derived::*` but only for non-nested pointers. There is still some work that needs to be done to clean this patch up but I want to get some input on it. Open questions: * Does `__pointer_to_member_type_info::can_catch(...)` need to adjust the pointer if a base to derived conversion is performed? Reviewers: danalbert, compnerd, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8758 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@233984 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17Let libc++'s LIT configuration setup our linker paths and env.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@232529 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17add option to tell LIT where to find the libc++ library when built out of treeEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@232518 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03[libcxxabi] Build both static and shared versions of libc++abi by default.Eric Fiselier
Summary: This patch builds both static and shared versions of libc++abi by default. It adds/repurposes the following cmake options: * `LIBCXXABI_ENABLE_SHARED`: Enable/disable building the shared library. (Previously using `OFF` would build the static library instead) * `LIBCXXABI_ENABLE_STATIC`: Enable/disable building the static library. This patch also re-purposes the CMake target `cxxabi` to be a meta-target for `cxxabi_shared` and `cxxabi_static`. This could potentially break other builds that depend on `cxxabi` being a library target. We will need to apply a patch to libc++'s CMake before committing this change. Running the tests is still only supported when the shared version is built. Support for running the tests against the static library will come in another patch. Reviewers: jroelofs, mclow.lists, danalbert, compnerd Reviewed By: danalbert, compnerd Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D8013 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@231075 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26Add remote testing support to the lit configJonathan Roelofs
Now that the corresponding support in libcxx has landed (r230592), adding support here is pretty simple. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@230643 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21Add temporary workaround for missing symbol __cxa_throw_bad_new_array_length ↵Eric Fiselier
on OS X. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@230125 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-11Fix libcxxabi's library and object root for tests.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228779 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-03Make test require 'linux' instead of 'linux2'Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@228073 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22[libcxxabi] Teach CMake better ways to find the libc++ source directory (and ↵Eric Fiselier
misc cleanup). Summary: The main section of this patch teaches CMake a new option `LIBCXXABI_LIBCXX_PATH` that specifies the path to the libcxx source root. This information is passed to lit so that it can better find libc++'s python module. `LIBCXXABI_LIBCXX_PATH` is also used to help find the libc++ headers. The rest of this patch is misc cleanup, mostly to make pep8 and pylint happy. I've also copied libc++'s .gitignore into libc++abi. Reviewers: jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7130 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22Enable backtrace_test for ARM.Logan Chien
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21Merge libc++abi's lit configuration with libc++'sJonathan Roelofs
http://reviews.llvm.org/D6985 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226737 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-21Rename all of the tests in preparation for merging lit configs with libcxxJonathan Roelofs
http://reviews.llvm.org/D7101 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@226691 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-29[cmake/multilib] Teach libc++abi's CMake build to support multilibChandler Carruth
libdir suffixes like 'lib64' or 'lib32'. This support is currently very rhudimentary. We define a variable LIBCXXABI_LIBDIR_SUFFIX. In a standalone build of libc++abi this can be directly set as a cached variable to control the multilib suffix used. When building libc++abi within a larger LLVM build, it is hard wired to whatever LLVM libdir suffix has been selected. If this doesn't work for someone, just let me know. I'm happy to change it. Unfortunately, libc++abi's lit setup made this somewhat problematic to change. It was setting variables up in a way that caused the resulting build to not work with lit at all. To fix that, I've moved some variables around in the CMake build to more closely match where and how they are defined in the libc++ CMake build. This includes specifically defining a library root variable in the CMake build where the libdir suffix can be applied, and then using that rather than re-computing it from the object directory in the lit config. This is essentially new functionality for libc++abi so I don't expect it to have any impact for folks until they start setting these variables. However, I know libc++abi is built in a diverse set of environments so just let me know if this causes you any problems. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224927 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-18[libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.Dan Albert
Summary: Fixes PR21738. The implementation for this is handled by __cxa_thread_atexit_impl, which is supplied by libc. More information: https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables Reviewers: mclow.lists, EricWF, jroelofs Reviewed By: jroelofs Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D6708 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224477 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13Use the newer python syntax for exceptionsJustin Bogner
We've dropped support for python 2.5, so now we can use the forward compatible "except ... as" syntax. git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@224182 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-25Fix comment on end of #endif to match #ifEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222719 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-25Use lit.util.executeCommand instead of our own versionEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222718 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-24[libcxxabi] Refactor building and testing libc++abi without threadsEric Fiselier
Summary: This patch adds CMake support for building and testing libc++abi without threads. 1. Add `LIBCXXABI_ENABLE_THREADS` option to CMake. 2. Propagate `LIBCXXABI_ENABLE_THREADS` to lit via lit.site.cfg.in 3. Configure tests for `LIBCXXABI_ENABLE_THREADS=OFF Currently the test suite does not work when libc++abi is built without threads because that information does not propagate to the test suite. Reviewers: danalbert, mclow.lists, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6393 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222702 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-24[libcxxabi] Refactor test timing logic and disable by default.Eric Fiselier
Summary: When using LIT the timing output is entirely unused but introduces a dependency on `<chrono>`. When libc++ is built without a montonic clock this causes some of the tests to fail. This patch factors out all of the timing logic into `support/timer.hpp` and disables it by default. To enable the timing you must define `LIBCXXABI_TIME_TESTS`. Reviewers: mclow.lists, danalbert, jroelofs Reviewed By: jroelofs Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6391 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222701 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-21Ensure llvm-sanitizer is found by the tests when using sanitizers.Eric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222496 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-21[libcxxabi] Cleanup memory in tests to placate ASAN.Eric Fiselier
Summary: ASAN fires on these tests because they don't clean up their memory. Reviewers: danalbert, jroelofs, mclow.lists Reviewed By: jroelofs Subscribers: dblaikie, cfe-commits Differential Revision: http://reviews.llvm.org/D6281 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222493 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-18Add support for LLVM_USE_SANITIZER=Thread to test suiteEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222260 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-14Add -g -fno-omit-frame-pointer when compiling tests with sanitizersEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@222053 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-07Move ARM failure from FIXME to XFAILRenato Golin
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@221515 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-06Add support for UNSUPPORTED tag to litEric Fiselier
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@221460 91177308-0d34-0410-b5e6-96231b3b80d8