| [libc] Use a sensible default when TEST_UNDECLARED_OUTPUTS_DIR is unset. (#167422) There is no guarantee that this environment variable is set. Eg, when running a test outside of the build system, such as under a debugger. And passing a nullptr to the string constructor is undefined. Use an empty string, which seems like it is close to the original intent. | 8 个月前 |
| [libc] allow UnitTest suite to be compiled on darwin (#166062) ExecuteFunctionUnix.cpp which is guarded by this check should reliably work on darwin as it only uses POSIX API - nothing specific to linux. | 8 个月前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Make errno asserts noop on gpu targets (#166606) This patch defines errno unit and integration test asserts as noop on GPU targets. Checking for errnos is tests has caused build breakages in previous patches. | 8 个月前 |
| | 1 年前 |
| [libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303) https://github.com/llvm/llvm-project/issues/149993 | 1 年前 |
| [libc] fix EXPECT_EXIT suspend/timeout for darwin (#166065) Fixes: https://github.com/llvm/llvm-project/issues/166059 --------- Signed-off-by: Shreeyash Pandey <shreeyash335@gmail.com> | 8 个月前 |
| [libc][math] Disable FEnvSafeTest.cpp if AArch64 target has no FP support (#166370) The FEnvSafeTest.cpp test fails on AArch64 soft nofp configurations because LLVM libc does not provide a floating-point environment in these configurations. This patch adds another preprocessor guard on __ARM_FP to disable the test on those. | 8 个月前 |
| [libc] Migrate FEnvSafeTest and FPTest to ErrnoCheckingTest. (#152633) This would ensure that errno value is cleared out before test execution and tests pass even when LIBC_ERRNO_MODE_SYSTEM_INLINE is specified (and errno may be clobbered before test execution). A lot of the tests would fail, however, since errno would end up getting set to EDOM or ERANGE during test execution and never validated before the end of the test. This should be fixed - and errno should be explicitly checked or ignored in all of those cases, but for now add a TODO to address it later (see open issue #135320) and clear out errno in test fixture to avoid test failures. | 11 个月前 |
| | 10 个月前 |
| | 10 个月前 |
| [libc][math] Add tolerance to math tests so that they still work when accurate path is skipped. (#164522) | 9 个月前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| | 10 个月前 |
| | 10 个月前 |
| | 1 年前 |
| | 10 个月前 |
| [libc] Fix warning on 'extern "C" int main' in test suite (#102973) Summary: According to the C++ standard, The main function shall not be declared with a linkage-specification. after some changes in https://github.com/llvm/llvm-project/pull/101853 this started emitting warnings when building / testing the C library. This source file is shared with the overlay tests as well as the full build tests. The full build tests are compiled with -ffreestanding, as are all the startup / integration files. The standard says freestanding environment are all implementation defined, so this is valid in those cases. This patch simply prevents adding the linkage when we are compiling unit tests, which are hosted. This is a continuation on https://github.com/llvm/llvm-project/pull/102825. | 1 年前 |
| [libc] Migrate ctype_utils to use char instead of int where applicable. (#166225) Functions like isalpha / tolower can operate on chars internally. This allows us to get rid of unnecessary casts and open a way to creating wchar_t overloads with the same names (e.g. for isalpha), that would simplify templated code for conversion functions (see 315dfe5865962d8a3d60e21d1fffce5214fe54ef). Add the int->char converstion to public entrypoints implementation instead. We also need to introduce bounds check on the input argument values - these functions' behavior is unspecified if the argument is neither EOF nor fits in "unsigned char" range, but the tests we've had verified that they always return false for small negative values. To preserve this behavior, cover it explicitly. | 8 个月前 |
| | 1 年前 |
| [libc] fix clang-tidy llvm-header-guard warnings (#82679) Towards the goal of getting ninja libc-lint back to green, fix the numerous instances of: warning: header guard does not follow preferred style [llvm-header-guard] This is because many of our header guards start with __LLVM rather than LLVM. To filter just these warnings: $ ninja -k2000 libc-lint 2>&1 | grep llvm-header-guard To automatically apply fixits: $ find libc/src libc/include libc/test -name \*.h | \ xargs -n1 -I {} clang-tidy {} -p build/compile_commands.json \ -checks='-*,llvm-header-guard' --fix --quiet Some manual cleanup is still necessary as headers that were missing header guards outright will have them inserted before the license block (we prefer them after). | 2 年前 |
| [libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303) https://github.com/llvm/llvm-project/issues/149993 | 1 年前 |
| [libc] remove errno.h includes (#110934) | 1 年前 |
| [libc][NFC] Move UnitTest and IntegrationTest to the 'test' directory. This part of the effort to make all test related pieces into the test directory. This helps is excluding test related pieces in a straight forward manner if LLVM_INCLUDE_TESTS is OFF. Future patches will also move the MPFR wrapper and testutils into the 'test' directory. | 3 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303) https://github.com/llvm/llvm-project/issues/149993 | 1 年前 |
| [libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303) https://github.com/llvm/llvm-project/issues/149993 | 1 年前 |
| [libc] remove errno.h includes (#110934) | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Move ASSERT_ERRNO_* macro to ErrnoCheckingTest.h (#158727) Move these macro away from Test.h, since the generic Test.h (and associated test framework library) doesn't #include or depend on any errno-handling logic. Conversely, all tests that directly ASSERT various errno values are now migrated to ErrnoCheckingTest framework, which clears it our / validates it after every use case. | 10 个月前 |
| [libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303) https://github.com/llvm/llvm-project/issues/149993 | 1 年前 |
| [libc] Migrate to using LIBC_NAMESPACE_DECL for namespace declaration (#98597) This is a part of #97655. | 2 年前 |
| [libc] Remove extraneous ASSERT_ERRNO_* macro definitions (#132812) These are no longer meant to be defined in each framework-specific header, but ZxTest.h wasn't updated. | 1 年前 |