[NSKIP026] FAT VFS returns wrong errno for path-edge cases
Skip message
NSKIP026: FAT VFS returns wrong errno for path-edge cases
Root cause
The FAT VFS error mapping diverges from POSIX for several path edge
cases. Documented variants:
mkdir('/') returns ENOENT instead of EEXIST
mkdir(over_existing_file) returns EINVAL instead of EEXIST
mkdir(path_under_a_file) returns EINVAL instead of ENOTDIR
scandir('') returns EINVAL instead of FileNotFoundError
shutil.copyfile(src, nonexistent_dst_dir/x) does not raise
FileNotFoundError
CPython tests that assert on the specific errno class are skipped on
hosted Nanvix.
Inline repro
import os, errno
try:
os.mkdir('/')
except OSError as e:
print(e.errno, errno.errorcode.get(e.errno)) # ENOENT not EEXIST
open('/tmp/m_file', 'wb').write(b'x')
try:
os.mkdir('/tmp/m_file')
except OSError as e:
print(e.errno, errno.errorcode.get(e.errno)) # EINVAL not EEXIST
Finding the footprint
Parent
Tracked in #371.
[NSKIP026] FAT VFS returns wrong errno for path-edge cases
Skip message
Root cause
The FAT VFS error mapping diverges from POSIX for several path edge
cases. Documented variants:
mkdir('/')returnsENOENTinstead ofEEXISTmkdir(over_existing_file)returnsEINVALinstead ofEEXISTmkdir(path_under_a_file)returnsEINVALinstead ofENOTDIRscandir('')returnsEINVALinstead ofFileNotFoundErrorshutil.copyfile(src, nonexistent_dst_dir/x)does not raiseFileNotFoundErrorCPython tests that assert on the specific errno class are skipped on
hosted Nanvix.
Inline repro
Finding the footprint
Parent
Tracked in #371.