Skip to content

Make open O_CREATE mode 0 work #23137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 19, 2024

Conversation

hoodmane
Copy link
Collaborator

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.

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.
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Can we combine the test into and existing test for open flags?

@hoodmane
Copy link
Collaborator Author

hoodmane commented Dec 18, 2024

Well I think the right test would be test_fcntl_open.c. But yet again, that test is currently not running in nodefs or noderawfs and trying to run it on noderawfs reveals a seemingly interesting failure. It looks fixable, so I'll put a comment saying to merge the tests here and then in a followup I'll try to fix that test and put them together.

This is an automatic change generated by tools/maint/rebaseline_tests.py.

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%)
```
@hoodmane hoodmane merged commit 89c946e into emscripten-core:main Dec 19, 2024
29 checks passed
@hoodmane hoodmane deleted the open-create-no-permissions branch December 19, 2024 12:12
hoodmane added a commit that referenced this pull request Dec 19, 2024
So that the behavior matches the behavior on linux. This makes the test
pass on nodefs and noderawfs. This allows merging the test added in
#23137 into test_fcntl_open.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants