summaryrefslogtreecommitdiff
path: root/libc/test/src/sys/socket
AgeCommit message (Collapse)Author
2025-10-22Revert "[libc] Add -Werror for libc tests" (#164684)lntue
Reverts llvm/llvm-project#160413
2025-10-22[libc] Add -Werror for libc tests (#160413)Vinay Deshmukh
Relates to https://github.com/llvm/llvm-project/issues/119281 Note: 1) As this PR enables `-Werror` for `libc` tests, it's very likely some downstream CI's may fail / start failing, so it's very likely this PR may need to be reverted and re-applied. P.S. I do not have merge permissions, so I will need one of the reviews to merge it for me. Thank you!
2025-03-19[libc] Migrate sys/socket tests to use ErrnoCheckingTest. (#132107)Alexey Samsonov
Also use ErrnoSetterMatcher to verify the function return values and verify/clear out errno values. Fix the bug in ErrnoSetterMatcher error reporting machinery to properly convert errno values into errno names to make error messages easier to debug.
2024-09-19[libc] Put bind back, fix gcc build (#109341)Michael Jones
Fixes #106467. Bind was accidentally removed while trying to clean up functions that didn't end up being needed. The GCC issue was just a warning treated as an error.
2024-09-19[libc] Add functions to send/recv messages (#106467)Michael Jones
This patch adds the necessary functions to send and receive messages over a socket. Those functions are: recv, recvfrom, recvmsg, send, sendto, sendmsg, and socketpair for testing.
2024-02-09[libc][NFC] Fix few warnings in tests. (#81262)lntue
``` /usr/local/google/home/lntue/experiment/llvm/llvm-project/libc/test/src/__support/FPUtil/fpbits_test.cpp:268:2: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi] }; ^ 1 warning generated. ``` ``` In file included from /usr/local/google/home/lntue/experiment/llvm/llvm-project/libc/test/src/sys/socket/linux/bind_test.cpp:17: /usr/local/google/home/lntue/experiment/llvm/llvm-project/libc/test/UnitTest/Test.h:17:9: warning: 'libc_make_test_file_path' macro redefined [-Wmacro-redefined] #define libc_make_test_file_path(file_name) (file_name) ^ /usr/local/google/home/lntue/experiment/llvm/llvm-project/libc/test/UnitTest/LibcTest.h:20:9: note: previous definition is here #define libc_make_test_file_path(file_name) \ ^ 1 warning generated. ```
2024-01-26[libc][NFC] Use specific ASSERT macros to test errno (#79573)Guillaume Chatelet
This patch provides specific test macros to deal with `errno`. This will help abstract away the differences between unit test and integration/hermetic tests in #79319. In one case we use `libc_errno` which is a struct, in the other case we deal directly with `errno`.
2023-12-12[libc] Add bind function (#74014)michaelrj-google
This patch adds the bind function to go with the socket function. It also cleans up a lot of socket related data structures.
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-05-03[libc] add socket functionMichael Jones
This patch adds the function "socket" from the header "sys/socket". It's a simple syscall wrapper, and I plan on adding the related functions in a followup patch. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149622