You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when function exits with error, output parameter might be left unchanged - IMHO You shouldn't test it unless it's explicitly stated it's also set on error paths
most of our FS-related functions are implemented inside particular filesystem - it's worth to check also how the function behaves on jffs2 and dummyfs (I believe it's possible to test on zynq-qemu as rootfs is jffs2 there and /dev is dummyfs ; currently it's not possible to test other FSes on ia32 due to filesystems/ext2: ext2 doesn't support mounting other filesystems #114)
due to above - please state on which filesystems the bug is present (preferably all fliesystems in single issue)
mateusz-bloch
changed the title
stat() completion successful and set wrong errno, when a component of the path prefix is not a directory
stat() completion successful and set wrong errno, when a component of the path prefix is not a directory [ext2, dummyfs, jffs2]
Apr 21, 2023
I managed to track down the bug to the resolve_path function in libphoenix. According to Open Group it should set errno to ENOTDIR when:
[...] the file_name argument contains at least one non-<slash> character and ends with one or more trailing <slash> characters and the last pathname component names an existing file that is neither a directory nor a symbolic link to a directory.
Instead, the function simply ignores trailing slashes, so it cannot behave correctly.
stat() completion successful and set wrong errno, when a component of the path is existing regular file, not a directory
Tested between ia32-generic and host-generic
Code to reproduction:
Outcome from ia32-generic:
Outcome from host-generic:
Documentation:
The text was updated successfully, but these errors were encountered: