summaryrefslogtreecommitdiff
path: root/libc/test/src/string/strcpy_test.cpp
AgeCommit message (Collapse)Author
2025-07-24[libc] Don't rely on LIBC_HAS_SANITIZER when enabling null checks. (#150341)Alexey Samsonov
LIBC_HAS_SANITIZER (which is defined if ASan, MSan, or UBSan is enabled) is currently used to implicitly disable null checks, normally enabled via LIBC_ADD_NULL_CHECKS config value. Remove this condition, and rely purely on the config value instead: * LIBC_HAS_SANITIZER will be true even for UBSan modes which doesn't rely on null checks at all (e.g. -fsanitize=alignment) * null checks today (implemented via __builtin_trap) should function normally today even when sanitizer is enabled - trap is still a trap * tests have been migrated to WITH_SIGNAL(-1) which doesn't prescript a particular signal / exit-code, and thus should pass even if sanitizers override the default ones.
2025-06-04[libc] Expand usage of libc null checks. (#116262)Aly ElAshram
Fixes #111546 --------- Co-authored-by: alyyelashram <150528548+alyyelashram@users.noreply.github.com>
2023-09-26[libc] Mass replace enclosing namespace (#67032)Guillaume Chatelet
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
2023-02-07[libc][NFC] Move UnitTest and IntegrationTest to the 'test' directory.Siva Chandra Reddy
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.
2021-11-04[libc] add stpcpy and stpncpyMichael Jones
Adds an implementation for stpcpy and stpncpy, which are posix extension functions. Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D111913
2021-01-20[libc][NFC] add "LlvmLibc" as a prefix to all test namesMichael Jones
Summary: Having a consistent prefix makes selecting all of the llvm libc tests easier on any platform that is also using the gtest framework. This also modifies the TEST and TEST_F macros to enforce this change moving forward. Reviewers: sivachandra Subscribers:
2020-04-08[libc][NFC] Make all top of file comments consistent.Paula Toth
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
2020-01-17[libc] Replace the use of gtest with a new light weight unittest framework.Siva Chandra Reddy
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
2020-01-06[libc] Move implementations of strcat and strcpy to the string directory.Siva Chandra Reddy
Summary: Now that tests live in separate top-level directory, keeping the implementations of individual functions in a directory of their own is not meaningful. Hence, this change moves them into the higher level string directory. NFC intended. Reviewers: MaskRay Subscribers: mgorny, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D72295
2020-01-06[libc] Move all tests to a top level `test` directory.Siva Chandra Reddy
A toplevel target, `check-libc` has also been added. Reviewers: abrachet, phosek Tags: #libc-project Differential Revision: https://reviews.llvm.org/D72177