8195065: runtime/appcds/ProhibitedPackage.java intermittent failure

Reviewed-by: mseledtsov
This commit is contained in:
Ioi Lam 2018-02-24 22:42:37 -08:00
parent 0db8f238af
commit d050bedee8

View File

@ -34,6 +34,7 @@
* @run main ProhibitedPackage * @run main ProhibitedPackage
*/ */
import jdk.test.lib.cds.CDSOptions;
import jdk.test.lib.Platform; import jdk.test.lib.Platform;
import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.OutputAnalyzer;
@ -85,7 +86,8 @@ public class ProhibitedPackage {
output = TestCommon.execAuto( output = TestCommon.execAuto(
"-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI",
"-cp", appJar, "-Xlog:class+load=info", "ProhibitedHelper"); "-cp", appJar, "-Xlog:class+load=info", "ProhibitedHelper");
TestCommon.checkExec(output, "Prohibited package name: java.lang"); CDSOptions opts = (new CDSOptions()).setXShareMode("auto");
TestCommon.checkExec(output, opts, "Prohibited package name: java.lang");
// -Xshare:off // -Xshare:off
output = TestCommon.execOff( output = TestCommon.execOff(