-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add statx #1181
Add statx #1181
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I don’t understand from the log why some of the Travis builds failed, especially since one of them is the exact platform I use and did the test on (Rust stable, Note that I still got, before and after my changes, some errors (which might be related to a more recent than average glibc?):
|
You are probably just running the tests on a Linux version that differs from the one in |
@gnzlbg do I need to change something, and if yes, what? |
@ariasuni the "problem" is that the linux version on your machine, and the linux version that The error message is not 100% clear, but it basically tells you that:
I might have some time tomorrow to look into these in more detail, but in the mean time that should get you started. If you have docker installed, you can "reproduce" libc's CI on your linux machine by using the |
Note that the errors I get locally are very different from the ones on the CI, and I should probably not change things that are working on CI and not related to my changes. |
☔ The latest upstream changes (presumably #1195) made this pull request unmergeable. Please resolve the merge conflicts. |
33cca7e
to
8d91a9b
Compare
Any progress on this? |
Well I don’t think I can change anything without more feedback. I just don’t break what’s already passing on the CI and would like someone to confirm my addition doesn’t add errors and is complete (I am mostly unsure about the syscall numbers, see my first comment). |
It is often best to just check out the source of the kernel itself. While there are "generic" syscall numbers, each architecture often has different ones. For #define __NR_statx 397 the syscall number for The easiest way to be sure is to just write a small program that performs the syscall and tests whether it behaves correctly.
To reproduce the CI environment locally (same version of the OS, libraries, etc.), if you are using Linux, you can just use the same Docker containers that libc uses, e.g., If you are not using Linux, your best bet is to just modify the PR and inspect the output on travis. As mentioned above, the travis error messages tell you which byte value differs and which value each byte should have, so you can go from the decimal number to hex, change the appropriate hex number to the value on travis, convert back to decimal, and modify the PR. If you need interactive help, I am on Rust's Zulip and Discord, and there are also a bunch helpful users there that can help if you get stuck. |
Sadly I don’t have a ARM64 machine where I could try this syscall, and I’m not familiar enough with the Linux kernel to understand everything (though I tried to skim through the Linux source code first). Also, all the builds that are not allowed to fail, fail with |
☔ The latest upstream changes (presumably #1228) made this pull request unmergeable. Please resolve the merge conflicts. |
I'm closing this due to lack of activity, please feel free to reopen if you want to keep working on this. |
Fix #1178
According to this website, syscall number for
statx
onarm64
should be 291 but it’s already the value ofSYS_syscalls
, is it an error?libc/src/unix/notbsd/linux/other/b64/aarch64.rs
Line 821 in c1ae35d