Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: base/memory/shared_memory_unittest.cc

Issue 26330008: Simple test for Android fd directories. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: errno.h Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_unittest.cc
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc
index 892fd7f1a590b0d20b8f9e6289b07a225c8676fa..10d38d5e14061f1393d3df509b853be7913833cb 100644
--- a/base/memory/shared_memory_unittest.cc
+++ b/base/memory/shared_memory_unittest.cc
@@ -20,6 +20,7 @@
#endif
#if defined(OS_POSIX)
+#include <errno.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -361,6 +362,14 @@ TEST(SharedMemoryTest, AnonymousPrivate) {
}
}
+TEST(SharedMemoryTest, AndroidFiles) {
+ EXPECT_EQ(0, access("/dev", X_OK)) << strerror(errno);
+ EXPECT_EQ(0, access("/dev/fd", X_OK)) << strerror(errno);
+ EXPECT_EQ(0, access("/proc", X_OK)) << strerror(errno);
+ EXPECT_EQ(0, access("/proc/self", X_OK)) << strerror(errno);
+ EXPECT_EQ(0, access("/proc/self/fd", X_OK)) << strerror(errno);
+}
+
TEST(SharedMemoryTest, MapAt) {
ASSERT_TRUE(SysInfo::VMAllocationGranularity() >= sizeof(uint32));
const size_t kCount = SysInfo::VMAllocationGranularity();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698