equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
34 import jdk.test.lib.process.ProcessTools; |
34 import jdk.test.lib.process.ProcessTools; |
35 import jdk.test.lib.process.OutputAnalyzer; |
35 import jdk.test.lib.process.OutputAnalyzer; |
36 import jdk.test.lib.Utils; |
36 import jdk.test.lib.Utils; |
37 import jdk.test.lib.Asserts; |
37 import jdk.test.lib.Asserts; |
38 |
38 |
39 /* |
39 /** |
40 * @test |
40 * @test |
|
41 * @requires vm.hasSAandCanAttach |
41 * @library /test/lib |
42 * @library /test/lib |
42 * @run main/othervm TestClhsdbJstackLock |
43 * @run main/othervm TestClhsdbJstackLock |
43 */ |
44 */ |
44 |
45 |
45 public class TestClhsdbJstackLock { |
46 public class TestClhsdbJstackLock { |
143 |
144 |
144 public static void main (String... args) throws Exception { |
145 public static void main (String... args) throws Exception { |
145 |
146 |
146 LingeredApp app = null; |
147 LingeredApp app = null; |
147 |
148 |
148 if (!Platform.shouldSAAttach()) { |
|
149 System.out.println("SA attach not expected to work - test skipped."); |
|
150 return; |
|
151 } |
|
152 |
|
153 try { |
149 try { |
154 List<String> vmArgs = new ArrayList<String>(Utils.getVmOptions()); |
150 List<String> vmArgs = new ArrayList<String>(Utils.getVmOptions()); |
155 |
151 |
156 app = new LingeredAppWithLock(); |
152 app = new LingeredAppWithLock(); |
157 LingeredApp.startApp(vmArgs, app); |
153 LingeredApp.startApp(vmArgs, app); |