This succeeds, but the directory is not created on the host file system.
Investigation reveals that os.getcwd() here leads to the getcwd() syscall being invoked, so it returns the expected value.
But the path_create syscall invoked actually uses the path /test123, so apth resolution logic in libc assumes the CWD to be /.
There seems to be a problem with working directory handling in the runtime and in the WASIX libc.
To illustrate:
wasmer --dir .
is supposed to mount the current dir at/home
, and to set the working dir to/home
.This works correctly!
But:
wasmer run wasmer/python --dir . -- -c "import os; os.makedirs('./test123)"
This succeeds, but the directory is not created on the host file system.
Investigation reveals that
os.getcwd()
here leads to thegetcwd()
syscall being invoked, so it returns the expected value. But the path_create syscall invoked actually uses the path/test123
, so apth resolution logic in libc assumes the CWD to be/
.