Skip to content


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

Backport-of: d8f4e97bd3f4e50902e80b4b6b4eb3268c6d4a9d
  • Loading branch information
MBaesken committed Sep 6, 2022
1 parent 94618a2 commit c4721bc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/hotspot/jtreg/containers/docker/
Expand Up @@ -81,10 +81,19 @@ private static void testMemoryLimitWithSwappiness(String dockerMemLimit, String

OutputAnalyzer out =;
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)
"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

1 comment on commit c4721bc

Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.