miri
miri copied to clipboard
Implement `chmod` and `fchmod` for Unix targets
Closes #4202
I was unable to write a test because FileMetadata only returns mode 0o100000 for the files, no permission information is provided.
Please also add tests for the new functions
I've tried. Those tests would rely on file.metadata().unwrap().permissions() to check if the permissions are updated successfully. Which however doesn't return the correct permissions (only 0o100000 instead) under miri. Could you please provide some suggestions on this?
Maybe the shim we use to read permission is unfinished and doesn't work at all even though it could work on Unix?
Yes, according to miri::shims::unix::fs::FileMetadata::from_meta, the perm field contains nothing more than the type of the file.
I think should fix the read functions before making the write functions do anything
Hi @el-ev, this PR appears to be inactive for quite a while, just checking if you're able to continue, or if you'd like any help to move it forward?
I will just mark this as waiting on author for now.
Feel free to ask more questions or mark this as ready (after resolving feedback) by writing @rustbot ready in the comment. ^^
@rustbot author
I'm going to close this PR due to inactivity. Thanks for trying to contribute, and feel free to reopen or make a new PR if you want to get back it it again!