NFC intended in the implementaton. Only mechanical changes to fit the LLVM
libc implementation standard have been done.
Math testing infrastructure has been added. This infrastructure compares the
results produced by the libc with the high precision results from MPFR.
Tests making use of this infrastructure have been added for cosf, sinf and
sincosf.
Reviewers: abrachet, phosek
Differential Revision: https://reviews.llvm.org/D76825
Summary: Create self contained functional header which has a type similar to `std::function`
Reviewers: sivachandra, PaulkaToast
Reviewed By: sivachandra
Subscribers: mgorny, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D77948
Only targets setup by the special LLVM libc rules now have fully
qualified names. The naming style is similar to fully qualified names in
Python.
Reviewers: abrachet, PaulkaToast, phosek
Differential Revision: https://reviews.llvm.org/D77340
Summary:
Made all header files consistent based of this documentation: https://llvm.org/docs/CodingStandards.html#file-headers.
And did the same for all source files top of file comments.
Reviewers: sivachandra, abrachet
Reviewed By: sivachandra, abrachet
Subscribers: MaskRay, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D77533
Summary:
This patch adds a Linux implementation for `signal`
It also fixes `ASSERT|EXPECT_THAT` macros
Reviewers: sivachandra, PaulkaToast, MaskRay
Reviewed By: sivachandra
Subscribers: mgorny, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D76536
Summary: These dependencies are needed for testing on the buildbots until we migrate AORs into libc.
Reviewers: sivachandra
Reviewed By: sivachandra
Subscribers: MaskRay, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D76330
Summary:
There seems to be a race condition between the pipe closing and the child process death. Likely these two events are not atomic on some versions of linux.
With the removal of `WNOHANG` we eliminate the race condition, however if the child closes the pipe intentionally then it could result in the test runner hanging. I find this situation less likely, where as I experience failures locally with this race condition rather consistently.
Reviewers: sivachandra, abrachet
Reviewed By: sivachandra, abrachet
Subscribers: MaskRay, jfb, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D76267
Summary:
This patch adds a timeout of 500ms to death tests. As we add multithreaded code and locks, deadlocks become more likely so timeout will be useful.
Additionally:
- Better error handling in `invokeSubprocess`
- Makes `ProcessStatus`'s methods const
Reviewers: sivachandra, MaskRay, gchatelet, PaulkaToast
Reviewed By: sivachandra, PaulkaToast
Subscribers: tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D75651
Summary: Created a docker container to provide transparency and easy changes to the llvm-libc buildbot intfra.
Reviewers: sivachandra
Reviewed By: sivachandra
Subscribers: MaskRay, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D75596
Summary:
Use `EXPECT_THAT` where possible in tests NFC intended.
Added a `void *` template instantiation of `StreamWrapper::operator<<`
Reviewers: sivachandra, PaulkaToast
Reviewed By: sivachandra
Subscribers: MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D75717
Summary: This patch adds gtest-like matchers and `EXPECT|ASSERT_THAT` macros. It also adds matchers `Succeeds` and `Fails` and has examples using these in test/src/signal/sigaddset_test.cpp.
Reviewers: sivachandra, gchatelet, PaulkaToast
Reviewed By: sivachandra, PaulkaToast
Subscribers: mgorny, MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D75487
A target to generate the std C threads.h file has been added. This
utilizes the new feature added in this change.
Reviewers: phosek
Differential Revision: https://reviews.llvm.org/D75379
Summary:
This is a quality of life change to make it a little nicer to look at, NFC.
This patch makes the RUN and OK lines green and FAILED lines red to match gtest's output.
Reviewers: sivachandra, gchatelet, PaulkaToast
Reviewed By: gchatelet
Subscribers: MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D75103
Summary: This patch adds `EXPECT_EXITS` and `EXPECT_DEATH` macros for testing exit codes and deadly signals. They are less convoluted than their analogs in GTEST and don't have matchers but just take an int for either the exit code or the signal respectively. Nor do they have any regex match against the stdout/stderr of the child process.
Reviewers: sivachandra, gchatelet
Reviewed By: sivachandra
Subscribers: mgorny, MaskRay, tschuett, libc-commits
Differential Revision: https://reviews.llvm.org/D74665
Also, the source layout document has been updated to reflect the current
layout of the `utils` directory.
Reviewers: PaulkaToast
Differential Revision: https://reviews.llvm.org/D74502
Also, other EXPECT_* and ASSERT_* macros have been extended to accept
bool values.
Reviewers: abrachet, gchatelet
Subscribers: MaskRay, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D73668
Some of the existing utils in utils/UnitTest/Test.h have been moved to
this new library.
Reviewers: abrachet, gchatelet
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D73530
Summary: LibcUnitTest is missing a dependency on LLVMSupport. This prevents building with shared libraries.
Reviewers: sivachandra
Subscribers: mgorny, MaskRay, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D73337
Summary:
This patch adds a benchmarking infrastructure for llvm-libc memory functions.
In a nutshell, the code can benchmark small and large buffers for the memcpy, memset and memcmp functions.
It also produces graphs of size vs latency by running targets of the form `render-libc-{memcpy|memset|memcmp}-benchmark-{small|big}`.
The configurations are provided as JSON files and the benchmark also produces a JSON file.
This file is then parsed and rendered as a PNG file via the `render.py` script (make sure to run `pip3 install matplotlib scipy numpy`).
The script can take several JSON files as input and will superimpose the curves if they are from the same host.
TODO:
- The code benchmarks whatever is available on the host but should be configured to benchmark the -to be added- llvm-libc memory functions.
- Add a README file with instructions and rationale.
- Produce scores to track the performance of the functions over time to allow for regression detection.
Reviewers: sivachandra, ckennelly
Subscribers: mgorny, MaskRay, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D72516
Header files included wrongly using <...> are now included using the
internal path names as the new unittest framework allows us to do so.
Reviewers: phosek, abrachet
Differential Revision: https://reviews.llvm.org/D72743
Summary:
* The Python header generator has been removed.
* Docs giving a highlevel overview of the header gen scheme have been
added.
Reviewers: phosek, abrachet
Subscribers: mgorny, MaskRay, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D70197
Summary:
This patch illustrates some of the features like modularity we want
in the new libc. Few other ideas like different kinds of testing, redirectors
etc are not yet present.
Reviewers: dlj, hfinkel, theraven, jfb, alexshap, jdoerfert
Subscribers: mgorny, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67867
llvm-svn: 373764