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