summaryrefslogtreecommitdiff
path: root/tests/sys_socket_test.cpp
AgeCommit message (Collapse)Author
2021-02-04Fix freopen() where the path is null.Elliott Hughes
This has been in the standard since C99, but we've never supported it before. It's apparently used by SPIRV-Tools. I tried implementing this the other way (with fcntl(2)) first, but eventually realized that that's more complicated and gives worse results. This implementation assumes that /proc is mounted, but so much of libc relies on that at this point that I don't think there's any realistic case where the fcntl(2) implementation would be preferable, and there are many where it's not. The fact that no-one's mentioned this until now suggests that it's not a heavily used feature anyway. I've also replaced AssertCloseOnExec() with a CloseOnExec() boolean-valued function instead, because it's really annoying getting assertion failures that don't point you at the test line in question, and instead point to some common helper code. Test: treehugger Change-Id: Ia2e53bf2664a4f782581042054ecd492830e2aed
2018-08-02Modernize codebase by replacing NULL with nullptrYi Kong
Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I5b4123bc6709641315120a191e36cc57541349b2
2017-12-15A few more trivial tests.Elliott Hughes
Based on gaps in the list of functions not referenced by the test executable. Bug: N/A Test: ran tests Change-Id: I73c238e7cf360f94670c7cd13eb954341c940b7b
2014-12-13better gtest runner for bionicYabin Cui
1. option to run each test in a separate forked process: "--isolate". 2. warnings about slow tests: "--warnline". 3. run multiple tests at the same time: "-j N". Bug: 17589740 Change-Id: Ife5f4cafec43aa051ad7bd9c9b2b7e2e437db0de
2014-11-12Assume glibc >= 2.15.Elliott Hughes
This catches one trivial difference between us and glibc --- the error returned by pthread_setname_np for an invalid pthread_t. Change-Id: If4c21e22107c6488333d11184f8005f8669096c2
2014-08-28The host prebuilt glibc is 2.11, so remove workarounds for 2.9.Elliott Hughes
Change-Id: I1072fcebc8b3018580a9d069fe6eca9c4e74e865
2014-04-15Fix signed vs unsigned comparison.Ben Cheng
Otherwise GCC 4.9 complains. Change-Id: I7cd3c5e8c78fda709130ca88a85fa1512e6fc024
2014-03-31Move accept4 tests into sys_socket_test.cpp.Christopher Ferris
In addition, create basic recvmmsg, sendmmsg tests. Change-Id: Ie9f4954446d98b5eb5e553d3c616c1ee67c3cb66
2014-02-27Add recvmmsg and sendmmsg syscalls.Guillaume Ranquet
Also add the corresponding constant, struct, and function declarations to <sys/socket.h>, and perfunctory tests so we know that the symbols actually exist. Signed-off-by: Guillaume Ranquet <guillaumex.ranquet@intel.com> Change-Id: Ib0d854239d3716be90ad70973c579aff4895a4f7