History log of /llvm-project/libc/test/UnitTest/LibcTest.cpp (Results 1 – 25 of 43)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# 7302c8db 12-Nov-2024 Nick Desaulniers <nickdesaulniers@users.noreply.github.com>

[libc][i386] FPBit support for 96b long double (#115084)

`long double` is haunted on most architectures, but it is especially so on
i386-linux-gnu. While have 80b of significant data, on i386-linux-

[libc][i386] FPBit support for 96b long double (#115084)

`long double` is haunted on most architectures, but it is especially so on
i386-linux-gnu. While have 80b of significant data, on i386-linux-gnu this type
has 96b of storage.

Fixes for supporting printf family of conversions for `long double` on
i386-linux-gnu. This allows the libc-stdlib-tests and libc_stdio_unittests
ninja target tests to pass on i386-linux-gnu.

Fixes: #110894
Link: #93709
Co-authored-by: Michael Jones <michaelrj@google.com>

show more ...


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 106621b6 15-Jul-2024 Mikhail R. Gadelha <mikhail@igalia.com>

[libc][NFC] Fix printed test time in 32-bit systems (#98922)

clock() returns a clock_t, which is a long and might overflow in 32-bit
systems when the test takes a long time to run. Changing it to u

[libc][NFC] Fix printed test time in 32-bit systems (#98922)

clock() returns a clock_t, which is a long and might overflow in 32-bit
systems when the test takes a long time to run. Changing it to uint64_t
fixes this issue. Before:

[ RUN ] LlvmLibcHashTest.Avalanche
[ OK ] LlvmLibcHashTest.Avalanche (18446744073709551138 ms)

After this patch:

[ RUN ] LlvmLibcHashTest.Avalanche
[ OK ] LlvmLibcHashTest.Avalanche (4154 ms)

show more ...


# 5ff3ff33 12-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597)

This is a part of #97655.


# ce9035f5 12-Jul-2024 Mehdi Amini <joker.eph@gmail.com>

Revert "[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration" (#98593)

Reverts llvm/llvm-project#98075

bots are broken


# 3f30effe 11-Jul-2024 Petr Hosek <phosek@google.com>

[libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98075)

This is a part of #97655.


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# 6f576d95 30-May-2024 Nick Desaulniers (paternity leave) <nickdesaulniers@users.noreply.github.com>

[libc] android atest compat (#93852)

These changes slighly modify the output of the unittests so that they better
match GTest, so that utilities that parse the expected output from GTest (such
as An

[libc] android atest compat (#93852)

These changes slighly modify the output of the unittests so that they better
match GTest, so that utilities that parse the expected output from GTest (such
as Android's unit test harness) can read the output from our unit tests.

This allows our unit tests to be run on Android devices.

Add very primitive command line parsing to:
- support --gtest_color=no to disable printing terminal colors.
- recognize --gtest_print_time and print the test time in milliseconds.
- most of our unit tests run on the order of microseconds, so its useful to
preserve the existing behavior. But upsteram GTest ONLY prints time tests
in milliseconds, and Android's atest expects to be able to parse exactly
that. Atest always passes --gtest_print_time. The word `took` is removed as
that also differs from upstream GTest, tripping up parsers.
- ignore other --gtest_* flags

Do so so that atest can parse the output correctly.

Print the test number count before
each run, so that atest can parse this value correctly.

Link: https://android-review.googlesource.com/c/platform/external/llvm-libc/+/3107252
Link: https://google.github.io/googletest/advanced.html#colored-terminal-output
Link: https://google.github.io/googletest/advanced.html#suppressing-the-elapsed-time

show more ...


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# 09efe848 06-Apr-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Rename `UInt.h` to `big_int.h` and `UInt128.h` to `uint128.h` for consistency (#87808)


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2
# 23c397c7 08-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[libc] Provide `LIBC_TYPES_HAS_INT128` (#84149)

Umbrella bug #83182


# 6a8e6c9a 08-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[libc][NFC] Move `BigInt` out of the `cpp` namespace (#84445)

As noted in
https://github.com/llvm/llvm-project/pull/84035#discussion_r1516817755
only files under the CPP folder should be in the `c

[libc][NFC] Move `BigInt` out of the `cpp` namespace (#84445)

As noted in
https://github.com/llvm/llvm-project/pull/84035#discussion_r1516817755
only files under the CPP folder should be in the `cpp` namespace.

show more ...


Revision tags: llvmorg-18.1.1
# 245d669f 07-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[reland][libc] Remove UB specializations of type traits for `BigInt` (#84299)

Note: This is a reland of #84035.

The standard specifies that it it UB to specialize the following traits:
- `std::

[reland][libc] Remove UB specializations of type traits for `BigInt` (#84299)

Note: This is a reland of #84035.

The standard specifies that it it UB to specialize the following traits:
- `std::is_integral`
- `std::is_unsigned`
- `std::make_unsigned`
- `std::make_signed`

This patch:
- Removes specializations for `BigInt`
- Transforms SFINAE for `bit.h` functions from template parameter to
return type (This makes specialization easier).
- Adds `BigInt` specialization for `bit.h` functions.
- Fixes code depending on previous specializations.

show more ...


# 27844cb2 07-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

Revert "[libc] Remove UB specializations of type traits for `BigInt`" (#84297)

Reverts llvm/llvm-project#84035

Several bots are failing:
- https://lab.llvm.org/buildbot/#/builders/223/builds/37

Revert "[libc] Remove UB specializations of type traits for `BigInt`" (#84297)

Reverts llvm/llvm-project#84035

Several bots are failing:
- https://lab.llvm.org/buildbot/#/builders/223/builds/37522
- https://lab.llvm.org/buildbot/#/builders/162/builds/51978
- https://lab.llvm.org/buildbot/#/builders/163/builds/52560
- https://lab.llvm.org/buildbot/#/builders/250/builds/19619

show more ...


# 84f483db 07-Mar-2024 Guillaume Chatelet <gchatelet@google.com>

[libc] Remove UB specializations of type traits for `BigInt` (#84035)

The standard specifies that it it UB to specialize the following traits:
- `std::is_integral`
- `std::is_unsigned`
- `std:

[libc] Remove UB specializations of type traits for `BigInt` (#84035)

The standard specifies that it it UB to specialize the following traits:
- `std::is_integral`
- `std::is_unsigned`
- `std::make_unsigned`
- `std::make_signed`

This patch:
- Removes specializations for `BigInt`
- Transforms SFINAE for `bit.h` functions from template parameter to
return type (This makes specialization easier).
- Adds `BigInt` specialization for `bit.h` functions.
- Fixes code depending on previous specializations.

show more ...


# 73aab2f6 29-Feb-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc] Revert https://github.com/llvm/llvm-project/pull/83199 since it broke Fuchsia. (#83374)

With some header fix forward for GPU builds.


# 04e8653f 27-Feb-2024 Joseph Huber <huberjn@outlook.com>

[libc] Add "include/" to the LLVM include directories (#83199)

Summary:
Recent changes added an include path in the float128 type that used the
internal `libc` path to find the macro. This doesn't w

[libc] Add "include/" to the LLVM include directories (#83199)

Summary:
Recent changes added an include path in the float128 type that used the
internal `libc` path to find the macro. This doesn't work once it's
installed because we need to search from the root of the install dir.
This patch adds "include/" to the include path so that our inclusion
of installed headers always match the internal use.

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 82a4a416 15-Feb-2024 lntue <35648136+lntue@users.noreply.github.com>

[libc][stdfix] Add support for fixed point types in the testing infrastructure. (#81819)


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5
# 158d7b8c 02-Nov-2023 Joseph Huber <jhuber6@vols.utk.edu>

[libc] Allow hermetic timing if the `clock` function is built (#71092)

Summary:
This patch fixes some code duplication on the GPU. The GPU build wanted
to enable timing for hermetic tests so it buil

[libc] Allow hermetic timing if the `clock` function is built (#71092)

Summary:
This patch fixes some code duplication on the GPU. The GPU build wanted
to enable timing for hermetic tests so it built some special case
handling into the test suite. Now that `clock` is supported on the
target we can simply link against the external interface. Because we
include `clock.h` for the CLOCKS_PER_SEC macro we remap the C entrypoint
to the internal one if it ends up called. This should allow hermetic
tests to run with timing if it is supported.

show more ...


Revision tags: llvmorg-17.0.4
# f3505320 19-Oct-2023 alfredfo <98554039+alfredfo@users.noreply.github.com>

[libc] Fix accidental LIBC_NAMESPACE_clock_freq (#69620)

See-also: https://github.com/llvm/llvm-project/pull/69548


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2
# 8fc87f54 02-Oct-2023 Mikhail R. Gadelha <mikhail@igalia.com>

[libc][NFC] Couple of small warning fixes (#67847)

This patch fixes a couple of warnings when compiling with gcc 13:

* CPP/type_traits_test.cpp: 'apply' overrides a member function but is
not ma

[libc][NFC] Couple of small warning fixes (#67847)

This patch fixes a couple of warnings when compiling with gcc 13:

* CPP/type_traits_test.cpp: 'apply' overrides a member function but is
not marked 'override'
* UnitTest/LibcTest.cpp:98: control reaches end of non-void function
* MPFRWrapper/MPFRUtils.cpp:75: control reaches end of non-void function
* smoke/FrexpTest.h:92: backslash-newline at end of file
* __support/float_to_string.h:118: comparison of unsigned expression in ‘>= 0’ is always true
* test/src/__support/CPP/bitset_test.cpp:197: comparison of unsigned expression in ‘>= 0’ is always true

---------

Signed-off-by: Mikhail R. Gadelha <mikhail@igalia.com>

show more ...


# b6bc9d72 26-Sep-2023 Guillaume Chatelet <gchatelet@google.com>

[libc] Mass replace enclosing namespace (#67032)

This is step 4 of
https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3
# b555912e 08-Aug-2023 Guillaume Chatelet <gchatelet@google.com>

[libc] Better IntegerToString API

This patch is an alternative to D155902. It provides the following benefits:
- No buffer manual allocation and error handling for the general case
- More flexible

[libc] Better IntegerToString API

This patch is an alternative to D155902. It provides the following benefits:
- No buffer manual allocation and error handling for the general case
- More flexible API : width specifier, sign and prefix handling
- Simpler code

The more flexible API removes the need for manually tweaking the buffer afterwards, and so prevents relying on implementation details of IntegerToString.

Reviewed By: michaelrj, jhuber6

Differential Revision: https://reviews.llvm.org/D156981

show more ...


# 98ab87f4 08-Aug-2023 Guillaume Chatelet <gchatelet@google.com>

Revert "[libc] Better IntegerToString API"

This reverts commit 910cc05aae85a6b31e2a2ed87d3dd46db46fce04.


# 910cc05a 08-Aug-2023 Guillaume Chatelet <gchatelet@google.com>

[libc] Better IntegerToString API

This patch is an alternative to D155902. It provides the following benefits:
- No buffer manual allocation and error handling for the general case
- More flexible

[libc] Better IntegerToString API

This patch is an alternative to D155902. It provides the following benefits:
- No buffer manual allocation and error handling for the general case
- More flexible API : width specifier, sign and prefix handling
- Simpler code

The more flexible API removes the need for manually tweaking the buffer afterwards, and so prevents relying on implementation details of IntegerToString.

Reviewed By: michaelrj, jhuber6

Differential Revision: https://reviews.llvm.org/D156981

show more ...


Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 515bd1c9 05-Jul-2023 Joseph Huber <jhuber6@vols.utk.edu>

[libc][Obvious] Fix timing on AMDGPU not being initialized

Summary:
Reviewer requested that this routine not be a macro, however that means
that it was not being intitialized as the static initializ

[libc][Obvious] Fix timing on AMDGPU not being initialized

Summary:
Reviewer requested that this routine not be a macro, however that means
that it was not being intitialized as the static initializer was done
before the memcpy from the device. Fix this so we can get timing
information.

show more ...


# 80504b06 05-Jul-2023 Joseph Huber <jhuber6@vols.utk.edu>

[libc][Obvious] Fix bad macro check on NVPTX tests

Summary:
I forgot to add the `defined()` check on NVPTX.


# 5db39796 04-Jul-2023 Joseph Huber <jhuber6@vols.utk.edu>

[libc] Support timing information in libc tests

This patch adds the necessary support to provide timing information in
`libc` tests. This is useful for determining which tests look what
amount of ti

[libc] Support timing information in libc tests

This patch adds the necessary support to provide timing information in
`libc` tests. This is useful for determining which tests look what
amount of time. We also can use this as a test basis for providing more
fine-grained timing when implementing things on the GPU.

The main difficulty with this is the fact that the AMDGPU fixed
frequency clock operates at an unknown frequency. We need to read this
on a per-card basis from the driver and then copy it in. NVPTX on the
other hand has a fixed clock at a resolution of 1ns. I have also
increased the resolution of the print-outs as the majority of these are
below a millisecond for me.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D154446

show more ...


12