Fix android-cloexec-pipe clang-tidy warning

am: 1fa946a2f2

Change-Id: I5602656a601581154361bb6452dc0ee018d27029
This commit is contained in:
Yi Kong
2019-08-22 15:37:21 -07:00
committed by android-build-merger

View File

@@ -15,6 +15,7 @@
*/
#include <dirent.h>
#include <fcntl.h>
#include <set>
#include <string>
@@ -69,7 +70,7 @@ TEST(FileUtilsTests, FindFilesFindApkFilesRecursive) {
TEST(FileUtilsTests, ReadFile) {
int pipefd[2];
ASSERT_EQ(pipe(pipefd), 0);
ASSERT_EQ(pipe2(pipefd, O_CLOEXEC), 0);
ASSERT_EQ(write(pipefd[1], "foobar", 6), 6);
close(pipefd[1]);