-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make open O_CREATE mode 0 work (#23137)
In nodefs we first create the node with permissions 0 and then try to open it. The open fails because we don't have read permissions. The following (18) test expectation files were updated by running the tests with `--rebaseline`: ``` other/codesize/test_codesize_cxx_ctors1.gzsize: 8351 => 8407 [+56 bytes / +0.67%] other/codesize/test_codesize_cxx_ctors1.jssize: 20343 => 20486 [+143 bytes / +0.70%] other/codesize/test_codesize_cxx_ctors2.gzsize: 8334 => 8390 [+56 bytes / +0.67%] other/codesize/test_codesize_cxx_ctors2.jssize: 20311 => 20454 [+143 bytes / +0.70%] other/codesize/test_codesize_cxx_except.gzsize: 9356 => 9411 [+55 bytes / +0.59%] other/codesize/test_codesize_cxx_except.jssize: 24112 => 24255 [+143 bytes / +0.59%] other/codesize/test_codesize_cxx_except_wasm.gzsize: 8321 => 8373 [+52 bytes / +0.62%] other/codesize/test_codesize_cxx_except_wasm.jssize: 20236 => 20379 [+143 bytes / +0.71%] other/codesize/test_codesize_cxx_except_wasm_exnref.gzsize: 8321 => 8373 [+52 bytes / +0.62%] other/codesize/test_codesize_cxx_except_wasm_exnref.jssize: 20236 => 20379 [+143 bytes / +0.71%] other/codesize/test_codesize_cxx_lto.gzsize: 8347 => 8404 [+57 bytes / +0.68%] other/codesize/test_codesize_cxx_lto.jssize: 20367 => 20510 [+143 bytes / +0.70%] other/codesize/test_codesize_cxx_mangle.gzsize: 9359 => 9416 [+57 bytes / +0.61%] other/codesize/test_codesize_cxx_mangle.jssize: 24112 => 24255 [+143 bytes / +0.59%] other/codesize/test_codesize_cxx_noexcept.gzsize: 8351 => 8407 [+56 bytes / +0.67%] other/codesize/test_codesize_cxx_noexcept.jssize: 20343 => 20486 [+143 bytes / +0.70%] other/codesize/test_codesize_files_js_fs.gzsize: 7654 => 7702 [+48 bytes / +0.63%] other/codesize/test_codesize_files_js_fs.jssize: 18838 => 18980 [+142 bytes / +0.75%] Average change: +0.66% (+0.59% - +0.75%) ```
- Loading branch information
Showing
21 changed files
with
50 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <stdio.h> | ||
#include <unistd.h> | ||
#include <assert.h> | ||
#include <fcntl.h> | ||
#include <string.h> | ||
#include <sys/stat.h> | ||
#include <assert.h> | ||
#include <errno.h> | ||
#include <string.h> | ||
|
||
// TODO: Combine this with test_fcntl_open.c. First requires fixing | ||
// test_fcntl_open.c on noderawfs. | ||
int main() { | ||
int res = open("a", O_CREAT, 0); | ||
printf("error: %s\n", strerror(errno)); | ||
assert(res >= 0); | ||
struct stat st; | ||
assert(stat("a", &st) == 0); | ||
assert((st.st_mode & 0777) == 0); | ||
printf("success\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8351 | ||
8407 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20343 | ||
20486 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8334 | ||
8390 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20311 | ||
20454 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
9356 | ||
9411 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
24112 | ||
24255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8321 | ||
8373 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20236 | ||
20379 |
2 changes: 1 addition & 1 deletion
2
test/other/codesize/test_codesize_cxx_except_wasm_exnref.gzsize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8321 | ||
8373 |
2 changes: 1 addition & 1 deletion
2
test/other/codesize/test_codesize_cxx_except_wasm_exnref.jssize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20236 | ||
20379 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8347 | ||
8404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20367 | ||
20510 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
9359 | ||
9416 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
24112 | ||
24255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
8351 | ||
8407 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20343 | ||
20486 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7654 | ||
7702 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18838 | ||
18980 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters