< prev index next >

test/sun/tools/jcmd/TestJcmdSanity.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


  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 import static jdk.testlibrary.Asserts.*;
  25 
  26 import java.io.File;
  27 import java.io.IOException;
  28 import java.nio.file.Files;
  29 import java.nio.file.Path;
  30 import java.nio.file.Paths;
  31 import java.util.List;
  32 
  33 import jdk.testlibrary.JcmdBase;
  34 import jdk.testlibrary.OutputAnalyzer;
  35 import jdk.testlibrary.ProcessTools;
  36 import jdk.testlibrary.Utils;
  37 
  38 /**
  39  * Unit test for jcmd utility. The test will send different diagnostic command
  40  * requests to the current java process.
  41  */
  42 /*
  43  * @test
  44  * @bug 7104647 7154822



  45  * @library /lib/testlibrary
  46  * @modules java.management
  47  * @build jdk.testlibrary.*
  48  * @run main/othervm -XX:+UsePerfData TestJcmdSanity
  49  */
  50 public class TestJcmdSanity {
  51 
  52     private static final String TEST_SRC = System.getProperty("test.src").trim();
  53     private static final String[] VM_ARGS = new String[] { "-XX:+UsePerfData" };
  54     private static final String JCMD_COMMAND_REGEX = "(\\w|\\.)*";
  55     private static final String PERF_COUNTER_REGEX = "(\\w|\\.)*\\=.*";
  56 
  57     public static void main(String[] args) throws Exception {
  58         testJcmdPidHelp();
  59         testJcmdPidHelpHelp();
  60         testJcmdPid_f();
  61         testJcmdPidPerfCounterPrint();
  62         testJcmdPidBigScript();
  63     }
  64 
  65     /**
  66      * jcmd -J-XX:+UsePerfData pid help




  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 import static jdk.testlibrary.Asserts.*;
  25 
  26 import java.io.File;
  27 import java.io.IOException;
  28 import java.nio.file.Files;
  29 import java.nio.file.Path;
  30 import java.nio.file.Paths;
  31 import java.util.List;
  32 
  33 import jdk.testlibrary.JcmdBase;
  34 import jdk.testlibrary.OutputAnalyzer;
  35 import jdk.testlibrary.ProcessTools;
  36 import jdk.testlibrary.Utils;
  37 




  38 /*
  39  * @test
  40  * @bug 7104647 7154822
  41  * @summary Unit test for jcmd utility. The test will send different diagnostic
  42  * command requests to the current java process.
  43  *
  44  * @library /lib/testlibrary
  45  *
  46  * @build jdk.testlibrary.*
  47  * @run main/othervm -XX:+UsePerfData TestJcmdSanity
  48  */
  49 public class TestJcmdSanity {
  50 
  51     private static final String TEST_SRC = System.getProperty("test.src").trim();
  52     private static final String[] VM_ARGS = new String[] { "-XX:+UsePerfData" };
  53     private static final String JCMD_COMMAND_REGEX = "(\\w|\\.)*";
  54     private static final String PERF_COUNTER_REGEX = "(\\w|\\.)*\\=.*";
  55 
  56     public static void main(String[] args) throws Exception {
  57         testJcmdPidHelp();
  58         testJcmdPidHelpHelp();
  59         testJcmdPid_f();
  60         testJcmdPidPerfCounterPrint();
  61         testJcmdPidBigScript();
  62     }
  63 
  64     /**
  65      * jcmd -J-XX:+UsePerfData pid help


< prev index next >