8218128: vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003 and 004 use wrong path to test classes
Reviewed-by: cjplummer, dholmes, lmesnik
This commit is contained in:
parent
ed3542d53b
commit
c986cef7ba
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,6 +26,8 @@ import java.io.File;
|
|||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.security.ProtectionDomain;
|
import java.security.ProtectionDomain;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
|
||||||
import nsk.share.Consts;
|
import nsk.share.Consts;
|
||||||
import nsk.share.test.Stresser;
|
import nsk.share.test.Stresser;
|
||||||
@ -77,12 +79,20 @@ public class resexhausted003 {
|
|||||||
|
|
||||||
|
|
||||||
public static int run(String args[], PrintStream out) {
|
public static int run(String args[], PrintStream out) {
|
||||||
if ( args == null || args.length < 1 ) {
|
String testclasspath = System.getProperty("test.class.path");
|
||||||
System.err.println("TEST BUG: Classes directory should be the first argument. Check .cfg file.");
|
String [] testpaths = testclasspath.split(System.getProperty("path.separator"));
|
||||||
|
String classesDir = "";
|
||||||
|
|
||||||
|
Pattern pattern = Pattern.compile("^(.*)classes(.*)vmTestbase(.*)$");
|
||||||
|
for (int i = 0 ; i < testpaths.length; i++) {
|
||||||
|
if (pattern.matcher(testpaths[i]).matches()) {
|
||||||
|
classesDir = testpaths[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (classesDir.equals("")) {
|
||||||
|
System.err.println("TEST BUG: Classes directory not found in test,class.path.");
|
||||||
return Consts.TEST_FAILED;
|
return Consts.TEST_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
String classesDir = args[0];
|
|
||||||
Stresser stress = new Stresser(args);
|
Stresser stress = new Stresser(args);
|
||||||
|
|
||||||
String className = Helper.class.getName();
|
String className = Helper.class.getName();
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2019, 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
|
||||||
|
# under the terms of the GNU General Public License version 2 only, as
|
||||||
|
# published by the Free Software Foundation.
|
||||||
|
#
|
||||||
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# version 2 for more details (a copy is included in the LICENSE file that
|
||||||
|
# accompanied this code).
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License version
|
||||||
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
#
|
||||||
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||||
|
# or visit www.oracle.com if you need additional information or have any
|
||||||
|
# questions.
|
||||||
|
#
|
||||||
|
|
||||||
|
exclusiveAccess.dirs=.
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -45,6 +45,5 @@
|
|||||||
* -XX:MaxMetaspaceSize=9m
|
* -XX:MaxMetaspaceSize=9m
|
||||||
* -XX:-UseGCOverheadLimit
|
* -XX:-UseGCOverheadLimit
|
||||||
* nsk.jvmti.ResourceExhausted.resexhausted003
|
* nsk.jvmti.ResourceExhausted.resexhausted003
|
||||||
* ../../classes/0/vmTestbase
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -39,14 +39,12 @@
|
|||||||
* @library /vmTestbase
|
* @library /vmTestbase
|
||||||
* /test/lib
|
* /test/lib
|
||||||
* @run driver jdk.test.lib.FileInstaller . .
|
* @run driver jdk.test.lib.FileInstaller . .
|
||||||
* @ignore 7013634 6606767
|
|
||||||
* @run main/othervm/native
|
* @run main/othervm/native
|
||||||
* -agentlib:resexhausted=-waittime=5
|
* -agentlib:resexhausted=-waittime=5
|
||||||
* -Xms16m
|
* -Xms16m
|
||||||
* -Xmx16m
|
* -Xmx16m
|
||||||
* -XX:MaxMetaspaceSize=8m
|
* -XX:MaxMetaspaceSize=9m
|
||||||
* -XX:-UseGCOverheadLimit
|
* -XX:-UseGCOverheadLimit
|
||||||
* nsk.jvmti.ResourceExhausted.resexhausted004
|
* nsk.jvmti.ResourceExhausted.resexhausted004
|
||||||
* ./bin/classes
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user