-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Changed /sys/kernel/address_bits
to /sys/kernel/profiling
in test_cp
#6294
Changed /sys/kernel/address_bits
to /sys/kernel/profiling
in test_cp
#6294
Conversation
GNU testsuite comparison:
|
a565508
to
7bcdc68
Compare
Do you know when in which Linux kernel versions |
tests/by-util/test_cp.rs
Outdated
@@ -3956,7 +3956,7 @@ fn test_cp_default_virtual_file() { | |||
let ts = TestScenario::new(util_name!()); | |||
let at = &ts.fixtures; | |||
ts.ucmd() | |||
.arg("/sys/kernel/address_bits") | |||
.arg("/sys/kernel/profiling") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a check like
if exits /sys/kernel/address_bits then
/sys/kernel/address_bits
else
/sys/kernel/profiling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I assumed that /sys/kernel/profiling
was chosen by Anirban because it is supported by "all" Linux versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it for real ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the assumption is that /sys/kernel/profiling
is supported by almost all linux versions . It should be fine to totally just replace /sys/kernel/address_bits
with it.
At the moment I am looking into the changelogs to find out when it was actually added to make sure the assumption actually holds and we don't get a repeat of the same issue few months later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, sounds good :)
GNU testsuite comparison:
|
7bcdc68
to
3fe701c
Compare
GNU testsuite comparison:
|
3fe701c
to
e0540f8
Compare
GNU testsuite comparison:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! The choice of the file looks good, please add a comment so that future readers will immediately know why that file was chosen. (Especially in case there's some other problem and we need to pick yet another file.)
Also, please take the PR out of draft-mode before pushing, so that all checks run.
e0540f8
to
9dc85d7
Compare
Did i make a mistake force pushing my formatting commit ? Seems like all of the lints keep failing . |
@AnirbanHalder654322 those clippy errors are unrelated to your PR, they fail because there was a new Rust release today. It's addressed in #6330. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Let's see whether any CI platform is missing this file, then this can be merged (or more likely: squashed)
GNU testsuite comparison:
|
Looks like all CI failures are due to other things:
In other words: CI is as green as it can be, given the current circumstances. |
TIL: The "Squash and merge" commits generated by Github are ugly as hell. Lesson learned, I'll take more care to edit the message next time. |
/sys/kernel/address_bits
was introduced in #6220 and is not present in older distros according to #6276 .This should fix it.