< prev index next >

test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java

Print this page
rev 12341 : 8078450: Implement consistent process for quarantine of tests


  26 import java.util.jar.JarEntry;
  27 import java.util.jar.JarOutputStream;
  28 import java.util.jar.Manifest;
  29 import jdk.test.lib.Platform;
  30 import jdk.test.lib.process.OutputAnalyzer;
  31 import jdk.test.lib.dcmd.*;
  32 import org.testng.annotations.Test;
  33 
  34 /*
  35  * Test to attach JVMTI java agent.
  36  *
  37  * @test
  38  * @bug 8147388
  39  * @library /test/lib
  40  * @modules java.base/jdk.internal.misc
  41  *          java.compiler
  42  *          java.instrument
  43  *          java.management
  44  *          jdk.jvmstat/sun.jvmstat.monitor
  45  * @build SimpleJvmtiAgent
  46  * @ignore 8150318
  47  * @run main ClassFileInstaller SimpleJvmtiAgent
  48  * @run testng LoadAgentDcmdTest
  49  */
  50 public class LoadAgentDcmdTest {
  51 
  52     public String getLibInstrumentPath() throws FileNotFoundException {
  53         String jdkPath = System.getProperty("test.jdk");
  54 
  55         if (jdkPath == null) {
  56             throw new RuntimeException(
  57                       "System property 'test.jdk' not set. " +
  58                       "This property is normally set by jtreg. " +
  59                       "When running test separately, set this property using " +
  60                       "'-Dtest.jdk=/path/to/jdk'.");
  61         }
  62 
  63         Path libpath = Paths.get(jdkPath, jdkLibPath(), sharedObjectName("instrument"));
  64 
  65         if (!libpath.toFile().exists()) {
  66             throw new FileNotFoundException(




  26 import java.util.jar.JarEntry;
  27 import java.util.jar.JarOutputStream;
  28 import java.util.jar.Manifest;
  29 import jdk.test.lib.Platform;
  30 import jdk.test.lib.process.OutputAnalyzer;
  31 import jdk.test.lib.dcmd.*;
  32 import org.testng.annotations.Test;
  33 
  34 /*
  35  * Test to attach JVMTI java agent.
  36  *
  37  * @test
  38  * @bug 8147388
  39  * @library /test/lib
  40  * @modules java.base/jdk.internal.misc
  41  *          java.compiler
  42  *          java.instrument
  43  *          java.management
  44  *          jdk.jvmstat/sun.jvmstat.monitor
  45  * @build SimpleJvmtiAgent

  46  * @run main ClassFileInstaller SimpleJvmtiAgent
  47  * @run testng LoadAgentDcmdTest
  48  */
  49 public class LoadAgentDcmdTest {
  50 
  51     public String getLibInstrumentPath() throws FileNotFoundException {
  52         String jdkPath = System.getProperty("test.jdk");
  53 
  54         if (jdkPath == null) {
  55             throw new RuntimeException(
  56                       "System property 'test.jdk' not set. " +
  57                       "This property is normally set by jtreg. " +
  58                       "When running test separately, set this property using " +
  59                       "'-Dtest.jdk=/path/to/jdk'.");
  60         }
  61 
  62         Path libpath = Paths.get(jdkPath, jdkLibPath(), sharedObjectName("instrument"));
  63 
  64         if (!libpath.toFile().exists()) {
  65             throw new FileNotFoundException(


< prev index next >