summaryrefslogtreecommitdiff
path: root/libc/test/src/sys/socket/linux/bind_test.cpp
AgeCommit message (Collapse)Author
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.