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/stdlib_test.cpp b/tests/stdlib_test.cpp
index ed5767c..1a3fc03 100644
--- a/tests/stdlib_test.cpp
+++ b/tests/stdlib_test.cpp
@@ -325,16 +325,12 @@
TEST(stdlib, mkostemp64) {
TemporaryFile tf([](char* path) { return mkostemp64(path, O_CLOEXEC); });
- int flags = fcntl(tf.fd, F_GETFD);
- ASSERT_TRUE(flags != -1);
- ASSERT_EQ(FD_CLOEXEC, flags & FD_CLOEXEC);
+ AssertCloseOnExec(tf.fd, true);
}
TEST(stdlib, mkostemp) {
TemporaryFile tf([](char* path) { return mkostemp(path, O_CLOEXEC); });
- int flags = fcntl(tf.fd, F_GETFD);
- ASSERT_TRUE(flags != -1);
- ASSERT_EQ(FD_CLOEXEC, flags & FD_CLOEXEC);
+ AssertCloseOnExec(tf.fd, true);
}
TEST(stdlib, mkstemp64) {