A few more trivial tests.
Based on gaps in the list of functions not referenced by the test
executable.
Bug: N/A
Test: ran tests
Change-Id: I73c238e7cf360f94670c7cd13eb954341c940b7b
diff --git a/tests/sys_socket_test.cpp b/tests/sys_socket_test.cpp
index 8f5afac..506e01f 100644
--- a/tests/sys_socket_test.cpp
+++ b/tests/sys_socket_test.cpp
@@ -22,6 +22,8 @@
#include <sys/un.h>
#include <fcntl.h>
+#include "utils.h"
+
struct ConnectData {
bool (*callback_fn)(int);
const char* sock_path;
@@ -106,8 +108,8 @@
int fd_acc = accept4(fd, reinterpret_cast<struct sockaddr*>(addr), &len, SOCK_CLOEXEC);
ASSERT_NE(fd_acc, -1) << strerror(errno);
- // Check that the flag was set properly.
- ASSERT_EQ(FD_CLOEXEC, fcntl(fd_acc, F_GETFD) & FD_CLOEXEC);
+ // Check that SOCK_CLOEXEC was set properly.
+ AssertCloseOnExec(fd_acc, true);
close(fd_acc);
}