test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff test/hotspot/jtreg/runtime/containers/docker

test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java

Print this page




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 
  25 /*
  26  * @test
  27  * @summary Test JVM's awareness of cpu sets (cpus and mems)
  28  * @requires docker.support
  29  * @requires (os.arch != "s390x")
  30  * @library /test/lib
  31  * @modules java.base/jdk.internal.misc
  32  *          java.management
  33  *          jdk.jartool/sun.tools.jar
  34  * @build Common AttemptOOM CPUSetsReader sun.hotspot.WhiteBox PrintContainerInfo
  35  * @run driver ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  36  * @run driver TestCPUSets
  37  */
  38 import java.util.List;

  39 import jdk.test.lib.containers.docker.DockerRunOptions;
  40 import jdk.test.lib.containers.docker.DockerTestUtils;

  41 import jdk.test.lib.Asserts;
  42 import jdk.test.lib.Platform;
  43 import jdk.test.lib.Utils;
  44 import jdk.test.lib.process.OutputAnalyzer;
  45 
  46 
  47 public class TestCPUSets {
  48     private static final String imageName = Common.imageName("cpusets");
  49 
  50     public static void main(String[] args) throws Exception {
  51         if (!DockerTestUtils.canTestDocker()) {
  52             return;
  53         }
  54 
  55         Common.prepareWhiteBox();
  56         DockerTestUtils.buildJdkDockerImage(imageName, "Dockerfile-BasicTest", "jdk-docker");
  57 
  58         try {
  59             // Sanity test the cpu sets reader and parser
  60             CPUSetsReader.test();




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 
  25 /*
  26  * @test
  27  * @summary Test JVM's awareness of cpu sets (cpus and mems)
  28  * @requires docker.support
  29  * @requires (os.arch != "s390x")
  30  * @library /test/lib
  31  * @modules java.base/jdk.internal.misc
  32  *          java.management
  33  *          jdk.jartool/sun.tools.jar
  34  * @build AttemptOOM sun.hotspot.WhiteBox PrintContainerInfo
  35  * @run driver ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  36  * @run driver TestCPUSets
  37  */
  38 import java.util.List;
  39 import jdk.test.lib.containers.docker.Common;
  40 import jdk.test.lib.containers.docker.DockerRunOptions;
  41 import jdk.test.lib.containers.docker.DockerTestUtils;
  42 import jdk.test.lib.containers.cgroup.CPUSetsReader;
  43 import jdk.test.lib.Asserts;
  44 import jdk.test.lib.Platform;
  45 import jdk.test.lib.Utils;
  46 import jdk.test.lib.process.OutputAnalyzer;
  47 
  48 
  49 public class TestCPUSets {
  50     private static final String imageName = Common.imageName("cpusets");
  51 
  52     public static void main(String[] args) throws Exception {
  53         if (!DockerTestUtils.canTestDocker()) {
  54             return;
  55         }
  56 
  57         Common.prepareWhiteBox();
  58         DockerTestUtils.buildJdkDockerImage(imageName, "Dockerfile-BasicTest", "jdk-docker");
  59 
  60         try {
  61             // Sanity test the cpu sets reader and parser
  62             CPUSetsReader.test();


test/hotspot/jtreg/runtime/containers/docker/TestCPUSets.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File