27 import java.net.Socket;
28 import java.util.List;
29 import java.util.Properties;
30
31 import jdk.test.lib.thread.ProcessThread;
32 import jdk.test.lib.process.OutputAnalyzer;
33 import jdk.test.lib.process.ProcessTools;
34
35 import com.sun.tools.attach.AgentInitializationException;
36 import com.sun.tools.attach.AgentLoadException;
37 import com.sun.tools.attach.VirtualMachine;
38 import com.sun.tools.attach.VirtualMachineDescriptor;
39
40 /*
41 * @test
42 * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
43 * @key intermittent
44 * @summary Basic unit tests for the VM attach mechanism. This test will perform
45 * a number of basic attach tests.
46 *
47 * @library /lib/testlibrary
48 * @library /test/lib
49 * @modules java.instrument
50 * jdk.attach
51 * jdk.jartool/sun.tools.jar
52 *
53 * @run build jdk.testlibrary.* Agent BadAgent RedefineAgent Application RedefineDummy RunnerUtil
54 * @run main BasicTests
55 */
56 public class BasicTests {
57
58 /*
59 * The actual test is in the nested class TestMain.
60 * The responsibility of this class is to:
61 * 1. Build all needed jars.
62 * 2. Start the Application class in a separate process.
63 * 3. Find the pid and shutdown port of the running Application.
64 * 4. Launches the tests in nested class TestMain that will attach to the Application.
65 * 5. Shut down the Application.
66 */
67 public static void main(String args[]) throws Throwable {
68 ProcessThread processThread = null;
69 try {
70 buildJars();
71 processThread = RunnerUtil.startApplication();
72 runTests(processThread.getPid());
73 } catch (Throwable t) {
|
27 import java.net.Socket;
28 import java.util.List;
29 import java.util.Properties;
30
31 import jdk.test.lib.thread.ProcessThread;
32 import jdk.test.lib.process.OutputAnalyzer;
33 import jdk.test.lib.process.ProcessTools;
34
35 import com.sun.tools.attach.AgentInitializationException;
36 import com.sun.tools.attach.AgentLoadException;
37 import com.sun.tools.attach.VirtualMachine;
38 import com.sun.tools.attach.VirtualMachineDescriptor;
39
40 /*
41 * @test
42 * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
43 * @key intermittent
44 * @summary Basic unit tests for the VM attach mechanism. This test will perform
45 * a number of basic attach tests.
46 *
47 * @library /test/lib
48 * @modules java.instrument
49 * jdk.attach
50 * jdk.jartool/sun.tools.jar
51 *
52 * @run build Agent BadAgent RedefineAgent Application RedefineDummy RunnerUtil
53 * @run main BasicTests
54 */
55 public class BasicTests {
56
57 /*
58 * The actual test is in the nested class TestMain.
59 * The responsibility of this class is to:
60 * 1. Build all needed jars.
61 * 2. Start the Application class in a separate process.
62 * 3. Find the pid and shutdown port of the running Application.
63 * 4. Launches the tests in nested class TestMain that will attach to the Application.
64 * 5. Shut down the Application.
65 */
66 public static void main(String args[]) throws Throwable {
67 ProcessThread processThread = null;
68 try {
69 buildJars();
70 processThread = RunnerUtil.startApplication();
71 runTests(processThread.getPid());
72 } catch (Throwable t) {
|