Skip to content
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

Opening a directory with O_CREAT should return EISDIR #23218

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

hoodmane
Copy link
Collaborator

@hoodmane hoodmane commented Dec 18, 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

@hoodmane
Copy link
Collaborator Author

This seems to require also changing the behavior of open on a directory in wasmfs.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 18, 2024

This seems to require also changing the behavior of open on a directory in wasmfs.

As long we we are moving towards standard/POSIX behviour that is great. We want wamfs and the old FS to be in sync as much as possible while we make the transition to wasmfs and improvements to wasmfs are absolutely welcome.

@hoodmane
Copy link
Collaborator Author

It's a simple enough fix in wasmfs too.

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.

Great!

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

The following (9) test expectation files were updated by
running the tests with `--rebaseline`:

```
other/codesize/test_codesize_cxx_ctors1.gzsize: 8351 => 8355 [+4 bytes / +0.05%]
other/codesize/test_codesize_cxx_ctors2.gzsize: 8334 => 8337 [+3 bytes / +0.04%]
other/codesize/test_codesize_cxx_except.gzsize: 9356 => 9357 [+1 bytes / +0.01%]
other/codesize/test_codesize_cxx_except_wasm.gzsize: 8321 => 8323 [+2 bytes / +0.02%]
other/codesize/test_codesize_cxx_except_wasm_exnref.gzsize: 8321 => 8323 [+2 bytes / +0.02%]
other/codesize/test_codesize_cxx_lto.gzsize: 8347 => 8349 [+2 bytes / +0.02%]
other/codesize/test_codesize_cxx_mangle.gzsize: 9359 => 9361 [+2 bytes / +0.02%]
other/codesize/test_codesize_cxx_noexcept.gzsize: 8351 => 8355 [+4 bytes / +0.05%]
other/codesize/test_codesize_files_js_fs.gzsize: 7654 => 7656 [+2 bytes / +0.03%]

Average change: +0.03% (+0.01% - +0.05%)
```
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (9) test expectation files were updated by
running the tests with `--rebaseline`:

```
other/codesize/test_codesize_cxx_ctors1.gzsize: 8407 => 8408 [+1 bytes / +0.01%]
other/codesize/test_codesize_cxx_ctors2.gzsize: 8390 => 8392 [+2 bytes / +0.02%]
other/codesize/test_codesize_cxx_except.gzsize: 9411 => 9413 [+2 bytes / +0.02%]
other/codesize/test_codesize_cxx_except_wasm.gzsize: 8373 => 8374 [+1 bytes / +0.01%]
other/codesize/test_codesize_cxx_except_wasm_exnref.gzsize: 8373 => 8374 [+1 bytes / +0.01%]
other/codesize/test_codesize_cxx_lto.gzsize: 8404 => 8406 [+2 bytes / +0.02%]
other/codesize/test_codesize_cxx_mangle.gzsize: 9416 => 9417 [+1 bytes / +0.01%]
other/codesize/test_codesize_cxx_noexcept.gzsize: 8407 => 8408 [+1 bytes / +0.01%]
other/codesize/test_codesize_files_js_fs.gzsize: 7702 => 7704 [+2 bytes / +0.03%]

Average change: +0.02% (+0.01% - +0.03%)
```
@hoodmane hoodmane merged commit 021e174 into emscripten-core:main Dec 19, 2024
29 checks passed
@hoodmane hoodmane deleted the ocreate-directory-eisdir branch December 19, 2024 16:00
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