Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8139875: [TESTBUG] Improve nsk/stress/stack/* tests
Use -Xss200k to limit the stack size, avoid running with -Xcomp, and, in one test, reduce iterations.

Reviewed-by: dholmes, lfoltan
  • Loading branch information
Harold Seigel committed Aug 5, 2020
1 parent 5e9aeb3 commit ceb4ae8e078eabcb3617b2824c86cb1990d49d38
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 30 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,7 @@
* @key stress
*
* @summary converted from VM testbase nsk/stress/stack/stack008.
* VM testbase keywords: [stress, stack, nonconcurrent, exclude]
* VM testbase comments: 8139875
* VM testbase keywords: [stress, stack, nonconcurrent]
* VM testbase readme:
* DESCRIPTION
* This test provokes multiple stack overflows in the same thread
@@ -46,9 +45,8 @@
* See the bug:
* 4366625 (P4/S4) multiple stack overflow causes HS crash
*
* @ignore 8139875
* @requires vm.opt.DeoptimizeALot != true
* @run main/othervm/timeout=900 nsk.stress.stack.stack008
* @requires (vm.opt.DeoptimizeALot != true & vm.compMode != "Xcomp")
* @run main/othervm/timeout=900 -Xss200K nsk.stress.stack.stack008
*/

package nsk.stress.stack;
@@ -26,8 +26,7 @@
* @key stress
*
* @summary converted from VM testbase nsk/stress/stack/stack016.
* VM testbase keywords: [stress, diehard, stack, nonconcurrent, exclude]
* VM testbase comments: 8139875
* VM testbase keywords: [stress, diehard, stack, nonconcurrent]
* VM testbase readme:
* DESCRIPTION
* The test provokes second stack overflow from within the
@@ -49,9 +48,10 @@
* See the bug:
* 4366625 (P4/S4) multiple stack overflow causes HS crash
*
* @ignore 8139875
* @requires vm.opt.DeoptimizeALot != true
* @run main/othervm/timeout=900 nsk.stress.stack.stack016 -eager
* @requires (vm.opt.DeoptimizeALot != true & vm.compMode != "Xcomp")
* @library /vmTestbase
* @build nsk.share.Terminator
* @run main/othervm/timeout=900 -Xss200K nsk.stress.stack.stack016 -eager
*/

package nsk.stress.stack;
@@ -26,8 +26,7 @@
* @key stress
*
* @summary converted from VM testbase nsk/stress/stack/stack017.
* VM testbase keywords: [stress, diehard, stack, nonconcurrent, exclude]
* VM testbase comments: 8139875
* VM testbase keywords: [stress, diehard, stack, nonconcurrent]
* VM testbase readme:
* DESCRIPTION
* The test invokes infinitely recursive method from within stack
@@ -42,9 +41,10 @@
* See the bug:
* 4366625 (P4/S4) multiple stack overflow causes HS crash
*
* @ignore 8139875
* @requires vm.opt.DeoptimizeALot != true
* @run main/othervm/timeout=900 nsk.stress.stack.stack017 -eager
* @requires (vm.opt.DeoptimizeALot != true & vm.compMode != "Xcomp")
* @library /vmTestbase
* @build nsk.share.Terminator
* @run main/othervm/timeout=900 -Xss200K nsk.stress.stack.stack017 -eager
*/

package nsk.stress.stack;
@@ -154,7 +154,7 @@ private void trickyRecurse(int depth) {
throw error;

//
// Stack problem caugth: provoke it again,
// Stack problem caught: provoke it again,
// if current stack is enough deep:
//
if (depth < depthToTry - PROBES)
@@ -26,8 +26,7 @@
* @key stress
*
* @summary converted from VM testbase nsk/stress/stack/stack018.
* VM testbase keywords: [stress, diehard, stack, nonconcurrent, exclude]
* VM testbase comments: 8139875
* VM testbase keywords: [stress, diehard, stack, nonconcurrent]
* VM testbase readme:
* DESCRIPTION
* This test provokes multiple stack overflows by invocations via
@@ -47,9 +46,10 @@
* See the bug:
* 4366625 (P4/S4) multiple stack overflow causes HS crash
*
* @ignore 8139875
* @requires vm.opt.DeoptimizeALot != true
* @run main/othervm/timeout=900 nsk.stress.stack.stack018 -eager
* @requires (vm.opt.DeoptimizeALot != true & vm.compMode != "Xcomp")
* @library /vmTestbase
* @build nsk.share.Terminator
* @run main/othervm/timeout=900 -Xss200K nsk.stress.stack.stack018 -eager
*/

package nsk.stress.stack;
@@ -26,8 +26,7 @@
* @key stress
*
* @summary converted from VM testbase nsk/stress/stack/stack019.
* VM testbase keywords: [stress, diehard, stack, nonconcurrent, exclude]
* VM testbase comments: 8139875
* VM testbase keywords: [stress, diehard, stack, nonconcurrent]
* VM testbase readme:
* DESCRIPTION
* The test invokes infinitely recursive method from within stack
@@ -40,9 +39,11 @@
* See the bug:
* 4366625 (P4/S4) multiple stack overflow causes HS crash
*
* @ignore 8139875
* @requires vm.opt.DeoptimizeALot != true
* @run main/othervm/timeout=900 nsk.stress.stack.stack019 -eager
* @requires (vm.opt.DeoptimizeALot != true & vm.compMode != "Xcomp")
* @requires os.family != "windows"
* @library /vmTestbase
* @build nsk.share.Terminator
* @run main/othervm/timeout=900 -Xss200K nsk.stress.stack.stack019 -eager
*/

package nsk.stress.stack;
@@ -53,8 +54,8 @@
import java.io.PrintStream;

public class stack019 {
private final static int CYCLES = 100;
private final static int PROBES = 100;
private final static int CYCLES = 50;
private final static int PROBES = 50;

public static void main(String[] args) {
int exitCode = run(args, System.out);
@@ -123,7 +124,7 @@ private static void trickyRecurse(int depth) {
throw error;

//
// Stack problem caugth: provoke it again,
// Stack problem caught: provoke it again,
// if current stack is enough deep:
//
if (depth < depthToTry - PROBES)

0 comments on commit ceb4ae8

Please sign in to comment.