< prev index next >

test/jdk/sun/tools/jcmd/TestJcmdSanity.java

Print this page
rev 51731 : imported patch 8210732


  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 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.test.lib.process.OutputAnalyzer;
  34 import jdk.test.lib.process.ProcessTools;
  35 import jdk.testlibrary.Utils;
  36 
  37 /*
  38  * @test
  39  * @bug 7104647 7154822
  40  * @summary Unit test for jcmd utility. The test will send different diagnostic
  41  * command requests to the current java process.
  42  *
  43  * @library /lib/testlibrary
  44  * @library /test/lib
  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 




  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 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.test.lib.process.OutputAnalyzer;
  34 import jdk.test.lib.process.ProcessTools;
  35 import jdk.test.lib.Utils;
  36 
  37 /*
  38  * @test
  39  * @bug 7104647 7154822
  40  * @summary Unit test for jcmd utility. The test will send different diagnostic
  41  * command requests to the current java process.
  42  *
  43  * @library /lib/testlibrary
  44  * @library /test/lib
  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 


< prev index next >