Add stat and lstat shims for all Unixes#4934
Conversation
|
Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two. |
There was a problem hiding this comment.
Sorry for the slow review.
This looks just right, thanks! However, the test could do with a bit of code deduplication.
@rustbot author
|
Reminder, once the PR becomes ready for a review, use |
1f04647 to
e3e2bc4
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@rustbot ready |
e3e2bc4 to
7469a49
Compare
| } | ||
|
|
||
| /// Check that all common fields of a `stat` struct are initialized. | ||
| pub fn check_stat_fields(stat: &libc::stat) { |
There was a problem hiding this comment.
You added this right in the middle of a block of functions that clearly belong together. Please be mindful of the surrounding code when deciding where to place new functions.
7469a49 to
cacdc00
Compare
Closes #4744
Adds
statandlstatshims for Linux, following the same approach as #4714 did forfstat."stat"and"lstat"arms to the generic Unix foreign items handlerOs::Linuxto the supported targets infs.rsfor both functionsstatandlstat. The test forlstatverifies it does not follow symlinks