13 * accompanied this code).
14 *
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 /*
25 * @test
26 * @bug 8140520
27 * @summary Setting small CompilerThreadStackSize, ThreadStackSize, and
28 * VMThreadStackSize values should result in an error message that shows
29 * the minimum stack size value for each thread type.
30 * @library /test/lib
31 * @modules java.base/jdk.internal.misc
32 * java.management
33 * @run main TooSmallStackSize
34 */
35
36 /*
37 * The primary purpose of this test is to make sure we can run with a
38 * stack smaller than the minimum without crashing. Also this test will
39 * determine the minimum allowed stack size for the platform (as
40 * provided by the JVM error message when a very small stack is used),
41 * and then verify that the JVM can be launched with that stack size
42 * without a crash or any error messages.
43 *
44 * Note: The '-Xss<size>' and '-XX:ThreadStackSize=<k-bytes>' options
45 * both control Java thread stack size. This repo's version of the test
46 * exercises the '-XX:ThreadStackSize' VM option. The jdk repo's version
47 * of the test exercises the '-Xss' option.
48 */
49
50 import jdk.test.lib.process.ProcessTools;
51 import jdk.test.lib.process.OutputAnalyzer;
52
53 public class TooSmallStackSize {
|
13 * accompanied this code).
14 *
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 /*
25 * @test
26 * @bug 8140520
27 * @summary Setting small CompilerThreadStackSize, ThreadStackSize, and
28 * VMThreadStackSize values should result in an error message that shows
29 * the minimum stack size value for each thread type.
30 * @library /test/lib
31 * @modules java.base/jdk.internal.misc
32 * java.management
33 * @run driver TooSmallStackSize
34 */
35
36 /*
37 * The primary purpose of this test is to make sure we can run with a
38 * stack smaller than the minimum without crashing. Also this test will
39 * determine the minimum allowed stack size for the platform (as
40 * provided by the JVM error message when a very small stack is used),
41 * and then verify that the JVM can be launched with that stack size
42 * without a crash or any error messages.
43 *
44 * Note: The '-Xss<size>' and '-XX:ThreadStackSize=<k-bytes>' options
45 * both control Java thread stack size. This repo's version of the test
46 * exercises the '-XX:ThreadStackSize' VM option. The jdk repo's version
47 * of the test exercises the '-Xss' option.
48 */
49
50 import jdk.test.lib.process.ProcessTools;
51 import jdk.test.lib.process.OutputAnalyzer;
52
53 public class TooSmallStackSize {
|