OSDN Git Service

Change use of /data to /data/local/tmp.
authorChristopher Ferris <cferris@google.com>
Fri, 20 May 2016 22:32:47 +0000 (15:32 -0700)
committerChristopher Ferris <cferris@google.com>
Fri, 20 May 2016 22:32:47 +0000 (15:32 -0700)
The unistd fsync/fdatasync were changed to use /data from /.
Unfortunately, this directory is unreadable unless you are root, so
change this path to /data/local/tmp.

Bug: 28885777
Change-Id: Ia88da7a05c8f1b05fbd45ef2e8c55ba0c3368164

tests/unistd_test.cpp

index 8ac6dae..ccf4dcc 100644 (file)
@@ -386,7 +386,7 @@ static void TestFsyncFunction(int (*fn)(int)) {
   close(fd);
 
   // The fd can even be a directory.
-  ASSERT_NE(-1, fd = open("/data", O_RDONLY));
+  ASSERT_NE(-1, fd = open("/data/local/tmp", O_RDONLY));
   EXPECT_EQ(0, fn(fd));
   close(fd);