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 com.sun.tools.attach.VirtualMachine;
25 import com.sun.tools.attach.AttachNotSupportedException;
26 import java.util.Properties;
27 import java.io.File;
28 import jdk.testlibrary.OutputAnalyzer;
29 import jdk.testlibrary.ProcessTools;
30 import jdk.testlibrary.ProcessThread;
31
32 /*
33 * @test
34 * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
35 * @summary Basic unit tests for the VM attach mechanism.
36 * @library /lib/testlibrary
37 * @run build Application Shutdown
38 * @run main PermissionTest
39 *
40 * Unit test for Attach API -
41 * this checks that a SecurityException is thrown as expected.
42 */
43 public class PermissionTest {
44
45 /*
46 * The actual test is in the nested class TestMain.
47 * The responsibility of this class is to:
48 * 1. Start the Application class in a separate process.
49 * 2. Find the pid and shutdown port of the running Application.
50 * 3. Run the tests in TstMain that will attach to the Application.
51 * 4. Shut down the Application.
52 */
53 public static void main(String args[]) throws Throwable {
54 final String pidFile ="TestPermission.Application.pid";
55 ProcessThread processThread = null;
56 RunnerUtil.ProcessInfo info = null;
57 try {
|
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 com.sun.tools.attach.VirtualMachine;
25 import com.sun.tools.attach.AttachNotSupportedException;
26 import java.util.Properties;
27 import java.io.File;
28 import jdk.testlibrary.OutputAnalyzer;
29 import jdk.testlibrary.ProcessTools;
30 import jdk.testlibrary.ProcessThread;
31
32 /*
33 * @test
34 * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
35 * @summary Basic unit tests for the VM attach mechanism.
36 * @library /lib/testlibrary
37 * @run build jdk.testlibrary.* Application Shutdown
38 * @run main PermissionTest
39 *
40 * Unit test for Attach API -
41 * this checks that a SecurityException is thrown as expected.
42 */
43 public class PermissionTest {
44
45 /*
46 * The actual test is in the nested class TestMain.
47 * The responsibility of this class is to:
48 * 1. Start the Application class in a separate process.
49 * 2. Find the pid and shutdown port of the running Application.
50 * 3. Run the tests in TstMain that will attach to the Application.
51 * 4. Shut down the Application.
52 */
53 public static void main(String args[]) throws Throwable {
54 final String pidFile ="TestPermission.Application.pid";
55 ProcessThread processThread = null;
56 RunnerUtil.ProcessInfo info = null;
57 try {
|