21 * questions.
22 */
23
24 import com.sun.tools.attach.*;
25 import java.net.ServerSocket;
26 import java.net.Socket;
27 import java.io.IOException;
28 import java.util.Properties;
29 import java.util.List;
30 import java.io.File;
31 import jdk.testlibrary.OutputAnalyzer;
32 import jdk.testlibrary.JDKToolLauncher;
33 import jdk.testlibrary.ProcessTools;
34 import jdk.testlibrary.ProcessThread;
35
36 /*
37 * @test
38 * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
39 * @summary Basic unit tests for the VM attach mechanism.
40 * @library /lib/testlibrary
41 * @run build Agent BadAgent RedefineAgent Application Shutdown RedefineDummy
42 * @run main BasicTests
43 *
44 * This test will perform a number of basic attach tests.
45 */
46 public class BasicTests {
47
48 /*
49 * The actual test is in the nested class TestMain.
50 * The responsibility of this class is to:
51 * 1. Build all needed jars.
52 * 2. Start the Application class in a separate process.
53 * 3. Find the pid and shutdown port of the running Application.
54 * 4. Launches the tests in nested class TestMain that will attach to the Application.
55 * 5. Shut down the Application.
56 */
57 public static void main(String args[]) throws Throwable {
58 final String pidFile = "TestsBasic.Application.pid";
59 ProcessThread processThread = null;
60 RunnerUtil.ProcessInfo info = null;
|
21 * questions.
22 */
23
24 import com.sun.tools.attach.*;
25 import java.net.ServerSocket;
26 import java.net.Socket;
27 import java.io.IOException;
28 import java.util.Properties;
29 import java.util.List;
30 import java.io.File;
31 import jdk.testlibrary.OutputAnalyzer;
32 import jdk.testlibrary.JDKToolLauncher;
33 import jdk.testlibrary.ProcessTools;
34 import jdk.testlibrary.ProcessThread;
35
36 /*
37 * @test
38 * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
39 * @summary Basic unit tests for the VM attach mechanism.
40 * @library /lib/testlibrary
41 * @build jdk.testlibrary.*
42 * @run build Agent BadAgent RedefineAgent Application Shutdown RedefineDummy
43 * @run main BasicTests
44 *
45 * This test will perform a number of basic attach tests.
46 */
47 public class BasicTests {
48
49 /*
50 * The actual test is in the nested class TestMain.
51 * The responsibility of this class is to:
52 * 1. Build all needed jars.
53 * 2. Start the Application class in a separate process.
54 * 3. Find the pid and shutdown port of the running Application.
55 * 4. Launches the tests in nested class TestMain that will attach to the Application.
56 * 5. Shut down the Application.
57 */
58 public static void main(String args[]) throws Throwable {
59 final String pidFile = "TestsBasic.Application.pid";
60 ProcessThread processThread = null;
61 RunnerUtil.ProcessInfo info = null;
|