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

test_posix_fallocate() fails under test_posix under WASI #111804

Closed
brettcannon opened this issue Nov 7, 2023 · 3 comments
Closed

test_posix_fallocate() fails under test_posix under WASI #111804

brettcannon opened this issue Nov 7, 2023 · 3 comments
Assignees
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes OS-wasi stdlib Python modules in the Lib dir

Comments

@brettcannon
Copy link
Member

brettcannon commented Nov 7, 2023

======================================================================
ERROR: test_posix_fallocate (__main__.PosixTester.test_posix_fallocate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Lib/test/test_posix.py", line 405, in test_posix_fallocate
    posix.posix_fallocate(fd, 0, 10)
OSError: [Errno 58] Not supported

----------------------------------------------------------------------

Detected with WASI-SDK 20 and wasmtime 14.

Linked PRs

@brettcannon
Copy link
Member Author

I have asked at https://bytecodealliance.zulipchat.com/#narrow/stream/219900-wasi/topic/Who.20is.20expected.20to.20make.20.60posix_fallocate.60.20work.3F to find out who I should reach out to for finding out what this function errors out.

@brettcannon
Copy link
Member Author

Turns out posix_fallocate() was in WASI preview1, but has been yanked in preview2 due to inconsistent semantics across OSs. Best solution then is to just skip posix_fallocate() on WASI unconditionally.

@brettcannon brettcannon added stdlib Python modules in the Lib dir 3.11 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes labels Nov 9, 2023
brettcannon added a commit that referenced this issue Nov 9, 2023
Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
@brettcannon
Copy link
Member Author

Fixed in main, but the backports to 3.11 and 3.12 still need to be done.

@brettcannon brettcannon self-assigned this Nov 9, 2023
brettcannon added a commit to brettcannon/cpython that referenced this issue Nov 9, 2023
Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.

(cherry picked from commit 97c4c06)
brettcannon added a commit to brettcannon/cpython that referenced this issue Nov 9, 2023
Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.

(cherry picked from commit 97c4c06)
brettcannon added a commit to brettcannon/cpython that referenced this issue Nov 9, 2023
Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
brettcannon added a commit that referenced this issue Nov 9, 2023
…11919)

GH-111804: Drop posix.fallocate() under WASI (GH-111869)

Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
brettcannon added a commit that referenced this issue Nov 9, 2023
…11920)

GH-111804: Drop posix.fallocate() under WASI (GH-111869)

Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
Drop posix.fallocate() under WASI.

The underlying POSIX function, posix_fallocate(), was found to vary too
much between implementations to remain in WASI. As such, while it was
available in WASI preview1, it's been dropped in preview2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes OS-wasi stdlib Python modules in the Lib dir
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant