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/unistd_test.cpp b/tests/unistd_test.cpp
index 022da4d..912ea0c 100644
--- a/tests/unistd_test.cpp
+++ b/tests/unistd_test.cpp
@@ -1043,6 +1043,17 @@
ASSERT_EQ(EBADF, errno);
}
+TEST(UNISTD_TEST, dup3) {
+ int fd = open("/proc/version", O_RDONLY);
+ ASSERT_EQ(666, dup3(fd, 666, 0));
+ AssertCloseOnExec(666, false);
+ close(666);
+ ASSERT_EQ(667, dup3(fd, 667, O_CLOEXEC));
+ AssertCloseOnExec(667, true);
+ close(667);
+ close(fd);
+}
+
TEST(UNISTD_TEST, lockf_smoke) {
constexpr off64_t file_size = 32*1024LL;