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_epoll_test.cpp b/tests/sys_epoll_test.cpp
index f6be4af..d1b411a 100644
--- a/tests/sys_epoll_test.cpp
+++ b/tests/sys_epoll_test.cpp
@@ -22,6 +22,8 @@
#include <sys/epoll.h>
#include <unistd.h>
+#include "utils.h"
+
TEST(sys_epoll, smoke) {
int epoll_fd = epoll_create(1);
ASSERT_NE(-1, epoll_fd) << strerror(errno);
@@ -72,3 +74,18 @@
close(fds[0]);
close(fds[1]);
}
+
+TEST(sys_epoll, epoll_create1) {
+ int fd;
+ fd = epoll_create(1);
+ AssertCloseOnExec(fd, false);
+ close(fd);
+
+ fd = epoll_create1(0);
+ AssertCloseOnExec(fd, false);
+ close(fd);
+
+ fd = epoll_create1(EPOLL_CLOEXEC);
+ AssertCloseOnExec(fd, true);
+ close(fd);
+}