Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 777b5981 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android (Google) Code Review
Browse files

Merge "Add mode when open(O_CREAT) is used."

parents 7decabbe 4b447b91
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@

#include <gtest/gtest.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>

@@ -43,7 +45,7 @@ protected:
        mFileName = new char[totalLen];
        snprintf(mFileName, totalLen, "%s%s", mExternalStorage, TEST_FILENAME);

        int fd = ::open(mFileName, O_CREAT | O_TRUNC);
        int fd = ::open(mFileName, O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
        if (fd < 0) {
            FAIL() << "Couldn't create " << mFileName << " for tests";
        }