8316464: 3 sun/tools tests ignore VM flags
Reviewed-by: sspitsyn, cjplummer
This commit is contained in:
parent
17535c34bc
commit
993951b85e
@ -50,8 +50,9 @@ import jdk.test.lib.util.ModuleInfoWriter;
|
||||
* @test
|
||||
* @bug 8205654
|
||||
* @summary Unit test for sun.tools.ProcessHelper class. The test launches Java processes with different Java options
|
||||
* and checks that sun.tools.ProcessHelper.getMainClass(pid) method returns a correct main class. return a .
|
||||
* and checks that sun.tools.ProcessHelper.getMainClass(pid) method returns a correct main class.
|
||||
*
|
||||
* @requires vm.flagless
|
||||
* @requires os.family == "linux"
|
||||
* @modules jdk.jcmd/sun.tools.common:+open
|
||||
* java.base/jdk.internal.classfile
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2023, 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
|
||||
@ -60,9 +60,8 @@ public class JInfoTest {
|
||||
LingeredApp app1 = new JInfoTestLingeredApp();
|
||||
LingeredApp app2 = new JInfoTestLingeredApp();
|
||||
try {
|
||||
String[] params = new String[0];;
|
||||
LingeredApp.startAppExactJvmOpts(app1, params);
|
||||
LingeredApp.startAppExactJvmOpts(app2, params);
|
||||
LingeredApp.startApp(app1);
|
||||
LingeredApp.startApp(app2);
|
||||
OutputAnalyzer output = jinfo("-flag", "MinHeapFreeRatio=1", "JInfoTestLingeredApp");
|
||||
output.shouldHaveExitValue(0);
|
||||
output = jinfo("-flag", "MinHeapFreeRatio", "JInfoTestLingeredApp");
|
||||
@ -89,9 +88,8 @@ public class JInfoTest {
|
||||
LingeredApp app1 = new JInfoTestLingeredApp();
|
||||
LingeredApp app2 = new JInfoTestLingeredApp();
|
||||
try {
|
||||
String[] params = new String[0];
|
||||
LingeredApp.startAppExactJvmOpts(app1, params);
|
||||
LingeredApp.startAppExactJvmOpts(app2, params);
|
||||
LingeredApp.startApp(app1);
|
||||
LingeredApp.startApp(app2);
|
||||
OutputAnalyzer output = jinfo("JInfoTestLingeredApp");
|
||||
output.shouldHaveExitValue(0);
|
||||
// "Runtime Environment" written once per proc
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2023, 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
|
||||
@ -24,6 +24,7 @@
|
||||
/**
|
||||
* @test
|
||||
* @bug 8035668
|
||||
* @requires vm.flagless
|
||||
* @library /test/lib
|
||||
* @summary Test checks case when target application finishes execution and jstat didn't complete work.
|
||||
jstat is started with interval = 100 (jstat -compiler 100) and monitored application finishes
|
||||
@ -60,9 +61,7 @@ public class JStatInterval {
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
"-cp",
|
||||
System.getProperty("test.class.path"),
|
||||
ProcessBuilder pb = ProcessTools.createTestJvm(
|
||||
"-XX:+UsePerfData",
|
||||
Application.class.getName()
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user