8305421: Work around JDK-8305420 in CDSJDITest.java

Reviewed-by: cjplummer
This commit is contained in:
Ioi Lam 2023-04-03 22:28:58 +00:00
parent b062b1bd81
commit 9ce5fdc962

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2023, 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
@ -61,7 +61,6 @@ public class CDSJDITest {
// pass them as JVM arguments to the debuggee process it creates. // pass them as JVM arguments to the debuggee process it creates.
"-Xbootclasspath/a:" + appJar, "-Xbootclasspath/a:" + appJar,
"-XX:+UnlockDiagnosticVMOptions", "-XX:+UnlockDiagnosticVMOptions",
"-Xlog:class+path=info",
"-XX:SharedArchiveFile=./SharedArchiveFile.jsa", "-XX:SharedArchiveFile=./SharedArchiveFile.jsa",
"-Xshare:on", "-Xshare:on",
"-showversion" "-showversion"
@ -73,7 +72,7 @@ public class CDSJDITest {
"-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./SharedArchiveFile.jsa", "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./SharedArchiveFile.jsa",
"-XX:ExtraSharedClassListFile=" + jarClasslistFile.getPath(), "-XX:ExtraSharedClassListFile=" + jarClasslistFile.getPath(),
"-Xshare:dump", "-Xlog:cds"); "-Xshare:dump", "-Xlog:cds");
OutputAnalyzer outputDump = executeAndLog(pb, "exec"); OutputAnalyzer outputDump = executeAndLog(pb, "dump");
for (String jarClass : jarClasses) { for (String jarClass : jarClasses) {
outputDump.shouldNotContain("Cannot find " + jarClass); outputDump.shouldNotContain("Cannot find " + jarClass);
} }