Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8289146: containers/docker/TestMemoryWithCgroupV1.java fails on linux…
… ppc64le machine with missing Memory and Swap Limit output

Reviewed-by: sgehwolf, mdoerr, iklam
  • Loading branch information
MBaesken committed Jul 6, 2022
1 parent f783244 commit d8f4e97
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java
Expand Up @@ -81,10 +81,19 @@ private static void testMemoryLimitWithSwappiness(String dockerMemLimit, String
Common.addWhiteBoxOpts(opts);

OutputAnalyzer out = Common.run(opts);
out.shouldContain("Memory and Swap Limit is: " + expectedReadLimit)
// in case of warnings like : "Your kernel does not support swap limit
// capabilities or the cgroup is not mounted. Memory limited without swap."
// we only have Memory and Swap Limit is: <huge integer> in the output
try {
out.shouldContain("Memory and Swap Limit is: " + expectedReadLimit)
.shouldContain(
"Memory and Swap Limit has been reset to " + expectedResetLimit + " because swappiness is 0")
.shouldContain("Memory & Swap Limit: " + expectedLimit);
} catch (RuntimeException ex) {
System.out.println("Expected Memory and Swap Limit output missing.");
System.out.println("You may need to add 'cgroup_enable=memory swapaccount=1' to the Linux kernel boot parameters.");
throw ex;
}
}

private static void testOSBeanSwappinessMemory(String memoryAllocation, String swapAllocation,
Expand Down

5 comments on commit d8f4e97

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBaesken
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on d8f4e97 Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBaesken Could not automatically backport d8f4e97b to openjdk/jdk17u-dev due to conflicts in the following files:

  • test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk17u-dev:

$ git checkout -b MBaesken-backport-d8f4e97b
$ git fetch --no-tags https://git.openjdk.org/jdk d8f4e97bd3f4e50902e80b4b6b4eb3268c6d4a9d
$ git cherry-pick --no-commit d8f4e97bd3f4e50902e80b4b6b4eb3268c6d4a9d
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport d8f4e97bd3f4e50902e80b4b6b4eb3268c6d4a9d'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport d8f4e97bd3f4e50902e80b4b6b4eb3268c6d4a9d.

@MBaesken
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on d8f4e97 Aug 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MBaesken the backport was successfully created on the branch MBaesken-backport-d8f4e97b in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit d8f4e97b from the openjdk/jdk repository.

The commit being backported was authored by Matthias Baesken on 6 Jul 2022 and was reviewed by Severin Gehwolf, Martin Doerr and Ioi Lam.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev MBaesken-backport-d8f4e97b:MBaesken-backport-d8f4e97b
$ git checkout MBaesken-backport-d8f4e97b
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev MBaesken-backport-d8f4e97b

Please sign in to comment.