Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit

Permalink
8139875: [TESTBUG] Improve nsk/stress/stack/* tests
Browse files Browse the repository at this point in the history
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 ceb4ae8
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 30 deletions.
10 changes: 4 additions & 6 deletions test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack008.java
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack016.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack017.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack018.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
17 changes: 9 additions & 8 deletions test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack019.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ceb4ae8

Please sign in to comment.