--- old/test/hotspot/jtreg/containers/docker/TestJFREvents.java 2019-07-12 19:37:54.037385386 +0200 +++ new/test/hotspot/jtreg/containers/docker/TestJFREvents.java 2019-07-12 19:37:53.621384449 +0200 @@ -135,6 +135,7 @@ // Environment variable set in host system should not be visible inside a container, // and should not be reported by JFR. pb.environment().put(TEST_ENV_VARIABLE, TEST_ENV_VALUE); + pb.environment().put("PATH", System.getenv("PATH") + ":/usr/sbin"); System.out.println("[COMMAND]\n" + Utils.getCommandLine(pb)); OutputAnalyzer out = new OutputAnalyzer(pb.start()); --- old/test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java 2019-07-12 19:37:55.051387670 +0200 +++ new/test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java 2019-07-12 19:37:54.669386809 +0200 @@ -531,16 +531,20 @@ long newUsage = metrics.getCpuUsage(); long[] newPerCpu = metrics.getPerCpuUsage(); - if (newSysVal <= startSysVal) { + // system/user CPU usage counters may be slowly increasing. + // allow for equal values for a pass + if (newSysVal < startSysVal) { fail(SubSystem.CPU, "getCpuSystemUsage", newSysVal, startSysVal); } - if (newUserVal <= startUserVal) { + // system/user CPU usage counters may be slowly increasing. + // allow for equal values for a pass + if (newUserVal < startUserVal) { fail(SubSystem.CPU, "getCpuUserUsage", newUserVal, startUserVal); } if (newUsage <= startUsage) { - fail(SubSystem.CPU, "getCpuUserUsage", newUsage, startUsage); + fail(SubSystem.CPU, "getCpuUsage", newUsage, startUsage); } boolean success = false; --- old/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java 2019-07-12 19:37:56.065389954 +0200 +++ new/test/lib/jdk/test/lib/containers/docker/DockerTestUtils.java 2019-07-12 19:37:55.708389150 +0200 @@ -37,6 +37,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Map; import jdk.test.lib.Utils; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; @@ -180,8 +181,7 @@ try { // Build the docker execute(DOCKER_COMMAND, "build", "--no-cache", "--tag", imageName, buildDir.toString()) - .shouldHaveExitValue(0) - .shouldContain("Successfully built"); + .shouldHaveExitValue(0); } catch (Exception e) { // If docker image building fails there is a good chance it happens due to environment and/or // configuration other than product failure. Throw jtreg skipped exception in such case @@ -271,6 +271,10 @@ public static OutputAnalyzer execute(String... command) throws Exception { ProcessBuilder pb = new ProcessBuilder(command); + // Add /usr/sbin to PATH so as to allow for podman compatibility + // which relies on iptables being on the PATH + Map env = pb.environment(); + env.put("PATH", System.getenv("PATH") + ":/usr/sbin"); System.out.println("[COMMAND]\n" + Utils.getCommandLine(pb)); long started = System.currentTimeMillis();