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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/http_fs_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/http_fs_test.cc
diff --git a/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc b/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc
index 0c521dca4dea6b76b4024ecaa8f35107a002019c..6d752988c154510e8fa2426e7e89a56228178d07 100644
--- a/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc
+++ b/native_client_sdk/src/tests/nacl_io_test/http_fs_test.cc
@@ -243,7 +243,8 @@ TEST_P(HttpFsLargeFileTest, GetStat) {
struct stat statbuf;
EXPECT_EQ(0, node->GetStat(&statbuf));
- EXPECT_EQ(S_IFREG | S_IRUSR | S_IRGRP | S_IROTH, statbuf.st_mode);
+ EXPECT_TRUE(S_ISREG(statbuf.st_mode));
+ EXPECT_EQ(S_IRUSR | S_IRGRP | S_IROTH, statbuf.st_mode & S_MODEBITS);
EXPECT_EQ(size, statbuf.st_size);
// These are not currently set.
EXPECT_EQ(0, statbuf.st_atime);

Powered by Google App Engine
This is Rietveld 408576698