-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8374364: TestCgroupMetrics.java fails when cpuset unmounted #28996
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
base: master
Are you sure you want to change the base?
Conversation
|
👋 Welcome back syan! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@sendaoYan The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
So Maybe it would be better to add this check in a place like |
Only jdk/internal/platform/cgroup/TestCgroupMetrics.java observed fails when docker service unavailable. There are total two tests invoke MetricsTester. The other test jdk/internal/platform/docker/TestSystemMetrics.java already call |
I don't think so. Just imagine someone may call That's why I would suggest adding it in the place where it requires docker directly, not the place indirectly. |
|
@sendaoYan |
Fixed. |
|
/issue JDK-8374364 |
|
@sendaoYan This issue is referenced in the PR title - it will now be updated. |
…ricsTesterCgroupV1.java
dholmes-ora
left a comment
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.
A couple of comments but I'm not sure what the right approach is here. Seems inconsistent to use SkippedException in one place, but not others.
| CgroupV1Metrics metrics = (CgroupV1Metrics)Metrics.systemMetrics(); | ||
| long oldVal = metrics.getCpuPeriod(); | ||
| if (oldVal == CgroupSubsystem.LONG_RETVAL_UNLIMITED) { | ||
| System.out.println("Get cpu period fails, test skipped."); |
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.
Note sure this indicates a "fail" as such.
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.
The getCpuPeriod call getLongValue to read property value from file /sys/fs/cgroup/cpu,cpuacct/system.slice/sshd.service/cpu.cfs_period_us. The getLongValue will return CgroupSubsystem.LONG_RETVAL_UNLIMITED if it can not open the file. So I think it's better to skip this sub-test when there is no /sys/fs/cgroup/cpu,cpuacct/system.slice/sshd.service/cpu.cfs_period_us file.
…hich suggestion from @dholmes-ora Co-authored-by: David Holmes <[email protected]>
This PR use SkippedException instead of report test pass. It's unrelated to the subject, It just fix it by the way |
Hi all,
Test jdk/internal/platform/cgroup/TestCgroupMetrics.java report fails when the cpuset unmounted. The details shows in jbs issue. I think it's better to check the 'cpu period' or 'cpuset' available or not before run the releated tests.
Change has been verified locally. Test-fix only, no risk.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28996/head:pull/28996$ git checkout pull/28996Update a local copy of the PR:
$ git checkout pull/28996$ git pull https://git.openjdk.org/jdk.git pull/28996/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28996View PR using the GUI difftool:
$ git pr show -t 28996Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28996.diff
Using Webrev
Link to Webrev Comment