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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc

Issue 671513002: [NaCk SDK] nacl_io: Don't assume ~S_IFMT are the mode bits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_umask
Patch Set: Created 6 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
Index: native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc
diff --git a/native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc b/native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc
index ae3ee82b740b7c105fe2cc07c3927740ca4e5384..258520b82d73a1c29b387ac881e5a51a5c107cc8 100644
--- a/native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc
+++ b/native_client_sdk/src/tests/nacl_io_test/kernel_proxy_test.cc
@@ -567,7 +567,7 @@ TEST_F(KernelProxyTest, OpenWithMode) {
struct stat buf;
EXPECT_EQ(0, ki_lstat("/foo", &buf));
- EXPECT_EQ(0723, buf.st_mode & ~S_IFMT);
+ EXPECT_EQ(0723, buf.st_mode & 0777);
}
TEST_F(KernelProxyTest, CreateWronlyWithReadOnlyMode) {
@@ -663,10 +663,10 @@ TEST_F(KernelProxyTest, Umask) {
struct stat buf;
EXPECT_EQ(0, ki_stat("/foo", &buf));
- EXPECT_EQ(0444, buf.st_mode & ~S_IFMT);
+ EXPECT_EQ(0444, buf.st_mode & 0777);
EXPECT_EQ(0, ki_stat("/dir", &buf));
- EXPECT_EQ(0555, buf.st_mode & ~S_IFMT);
+ EXPECT_EQ(0555, buf.st_mode & 0777);
EXPECT_EQ(0222, ki_umask(0));
}
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc ('k') | native_client_sdk/src/tests/nacl_io_test/mem_fs_node_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698