mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
gh-90473: wasmtime does not support absolute symlinks (GH-93490)
This commit is contained in:
parent
713eb184b5
commit
6f8367d348
5 changed files with 20 additions and 23 deletions
|
|
@ -171,9 +171,13 @@ def can_symlink():
|
|||
global _can_symlink
|
||||
if _can_symlink is not None:
|
||||
return _can_symlink
|
||||
symlink_path = TESTFN + "can_symlink"
|
||||
# WASI / wasmtime prevents symlinks with absolute paths, see man
|
||||
# openat2(2) RESOLVE_BENEATH. Almost all symlink tests use absolute
|
||||
# paths. Skip symlink tests on WASI for now.
|
||||
src = os.path.abspath(TESTFN)
|
||||
symlink_path = src + "can_symlink"
|
||||
try:
|
||||
os.symlink(TESTFN, symlink_path)
|
||||
os.symlink(src, symlink_path)
|
||||
can = True
|
||||
except (OSError, NotImplementedError, AttributeError):
|
||||
can = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue