summaryrefslogtreecommitdiff
path: root/libc/test/src/stdio/fdopen_test.cpp
AgeCommit message (Collapse)Author
2025-06-17Fix/reapply "[libc] Migrate stdio tests to ErrnoCheckingTest. (#144134)Alexey Samsonov
This reverts commit 92a116c4ef822950f8c57eaa5164c844c73a1f7e with a fix for fgets test - convert nullptr to fgets return type (char*), since the matcher is pedantic.
2025-06-13Revert "Fix/reapply "[libc] Migrate stdio tests to ErrnoCheckingTest."" ↵Alexey Samsonov
(#144129) Reverts llvm/llvm-project#143972 - matcher seems to be pedantic for fgets tests, reverting to verify and fix.
2025-06-13Fix/reapply "[libc] Migrate stdio tests to ErrnoCheckingTest." (#143972)Alexey Samsonov
This reverts commit a93e55e57ed00a55f822c64e3520c7c732b58480 and fixes build and test failures: * Proper include added to setvbuf_test.cpp * fgetc/fgetc_unlocked/fgets tests are ported to ErrnoSetterMatcher and are made more precise. This fixes inconsistencies between expectations in regular and GPU builds - ErrnoSetterMatcher is configured to omit errno matching on GPUs, as fgetc implementation on GPU doesn't set errno, in contrast to Linux.
2025-06-11Revert "[libc] Migrate stdio tests to ErrnoCheckingTest." (#143829)Alexey Samsonov
Reverts llvm/llvm-project#143802. Follow-up fix 3c7af175e51c3ab08ac3c442146c2b822f38c01e wasn't robust enough and itself got reverted.
2025-06-11[libc] Migrate stdio tests to ErrnoCheckingTest. (#143802)Alexey Samsonov
Reduce the direct use of libc_errno in stdio unit tests by adopting ErrnoCheckingTest where appropriate. Also removes the libc_errno.h inclusions from stdlib.h tests that were accidentally added in d87eea35fac5a34a841c637db8908128409a184e
2025-06-11[libc] Move libc_errno.h to libc/src/__support and make ↵lntue
LIBC_ERRNO_MODE_SYSTEM to be header-only. (#143187) This is the first step in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2024-06-14[libc] Add the implementation of the fdopen function (#94186)Xu Zhang
Fixes #93711 . This patch implements the ``fdopen`` function. Given that ``fdopen`` internally calls ``fcntl``, the implementation of ``fcntl`` has been moved to the ``__support/OSUtil``, where it serves as an internal public function.