author | coleenp |
Mon, 29 Jul 2019 10:34:20 -0400 | |
changeset 57567 | b000362a89a0 |
parent 52400 | test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java@ca309ee4fd92 |
child 59053 | ba6c248cae19 |
permissions | -rw-r--r-- |
48138 | 1 |
/* |
57567
b000362a89a0
8202339: [TESTBUG] Consolidate the tests in runtime/SharedArchiveFile and runtime/appcds
coleenp
parents:
52400
diff
changeset
|
2 |
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
48138 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
25 |
// NOTE: the test takes a long time for each VM option combination, so we split |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
26 |
// it into 3 @test parts, so that they can be executed in parallel. If you make a |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
27 |
// change, please ensure all @test blocks are in sync. |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
28 |
|
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
29 |
|
48138 | 30 |
/* |
31 |
* @test |
|
32 |
* @summary Test options that are incompatible with use of shared strings |
|
33 |
* Also test mismatch in oops encoding between dump time and run time |
|
49008
d777541fceba
8191375: Add high-level jtreg VMProps to filter out CDS tests
iklam
parents:
48469
diff
changeset
|
34 |
* @requires vm.cds.archived.java.heap |
52032
2f7a2e7c3221
8210376: [TESTBUG] @requires vm.cds should be replaced by @requires vm.cds.archived.java.heap and documentation is required for vm.gc==null
vaibhav
parents:
51616
diff
changeset
|
35 |
* @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set |
2f7a2e7c3221
8210376: [TESTBUG] @requires vm.cds should be replaced by @requires vm.cds.archived.java.heap and documentation is required for vm.gc==null
vaibhav
parents:
51616
diff
changeset
|
36 |
* via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed |
2f7a2e7c3221
8210376: [TESTBUG] @requires vm.cds should be replaced by @requires vm.cds.archived.java.heap and documentation is required for vm.gc==null
vaibhav
parents:
51616
diff
changeset
|
37 |
* vm options. |
48138 | 38 |
* @requires (vm.gc=="null") |
57567
b000362a89a0
8202339: [TESTBUG] Consolidate the tests in runtime/SharedArchiveFile and runtime/appcds
coleenp
parents:
52400
diff
changeset
|
39 |
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
40 |
* @modules jdk.jartool/sun.tools.jar |
50455
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
41 |
* @build sun.hotspot.WhiteBox |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
42 |
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission |
48138 | 43 |
* @build HelloString |
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
44 |
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 0 |
48138 | 45 |
*/ |
46 |
||
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
47 |
|
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
48 |
/* |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
49 |
* @test |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
50 |
* @requires vm.cds.archived.java.heap |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
51 |
* @requires (vm.gc=="null") |
57567
b000362a89a0
8202339: [TESTBUG] Consolidate the tests in runtime/SharedArchiveFile and runtime/appcds
coleenp
parents:
52400
diff
changeset
|
52 |
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds |
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
53 |
* @modules jdk.jartool/sun.tools.jar |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
54 |
* @build sun.hotspot.WhiteBox |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
55 |
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
56 |
* @build HelloString |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
57 |
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 1 |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
58 |
*/ |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
59 |
|
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
60 |
/* |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
61 |
* @test |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
62 |
* @requires vm.cds.archived.java.heap |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
63 |
* @requires (vm.gc=="null") |
57567
b000362a89a0
8202339: [TESTBUG] Consolidate the tests in runtime/SharedArchiveFile and runtime/appcds
coleenp
parents:
52400
diff
changeset
|
64 |
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds |
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
65 |
* @modules jdk.jartool/sun.tools.jar |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
66 |
* @build sun.hotspot.WhiteBox |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
67 |
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
68 |
* @build HelloString |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
69 |
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 2 |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
70 |
*/ |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
71 |
|
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
72 |
|
48138 | 73 |
import jdk.test.lib.Asserts; |
50864
cc318277c142
8205702: assert(UseCompressedClassPointers) failed in universe.hpp
pliden
parents:
50455
diff
changeset
|
74 |
import jdk.test.lib.Platform; |
48138 | 75 |
import jdk.test.lib.process.OutputAnalyzer; |
76 |
||
50455
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
77 |
import sun.hotspot.code.Compiler; |
51616
b071f4fff1f1
8210259: [testbug] IncompatibleOptions.java fails if VM configured without ZGC
goetz
parents:
51527
diff
changeset
|
78 |
import sun.hotspot.gc.GC; |
50455
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
79 |
|
48138 | 80 |
public class IncompatibleOptions { |
81 |
static final String COOPS_DUMP_WARNING = |
|
82 |
"Cannot dump shared archive when UseCompressedOops or UseCompressedClassPointers is off"; |
|
83 |
static final String COOPS_EXEC_WARNING = |
|
84 |
"UseCompressedOops and UseCompressedClassPointers must be on for UseSharedSpaces"; |
|
85 |
static final String GC_WARNING = |
|
86 |
"Archived java heap is not supported"; |
|
87 |
static final String OBJ_ALIGNMENT_MISMATCH = |
|
88 |
"The shared archive file's ObjectAlignmentInBytes of .* does not equal the current ObjectAlignmentInBytes of"; |
|
89 |
static final String COMPACT_STRING_MISMATCH = |
|
90 |
"The shared archive file's CompactStrings setting .* does not equal the current CompactStrings setting"; |
|
91 |
||
92 |
static String appJar; |
|
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
93 |
static String[] vmOptionsPrefix = {}; |
48138 | 94 |
|
95 |
public static void main(String[] args) throws Exception { |
|
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
96 |
String[] noargs = {}; |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
97 |
SharedStringsUtils.run(Integer.parseInt(args[0]), 3, noargs, IncompatibleOptions::test); |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
98 |
// Add a new @test block if you get an assert ----^ about this number. See |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
99 |
// SharedStringsUtils.java for details. |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
100 |
} |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
101 |
|
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
102 |
public static void test(String[] args_ignored) throws Exception { |
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
103 |
vmOptionsPrefix = SharedStringsUtils.getChildVMOptionsPrefix(); |
48138 | 104 |
appJar = JarBuilder.build("IncompatibleOptions", "HelloString"); |
105 |
||
106 |
// Uncompressed OOPs |
|
107 |
testDump(1, "-XX:+UseG1GC", "-XX:-UseCompressedOops", COOPS_DUMP_WARNING, true); |
|
51616
b071f4fff1f1
8210259: [testbug] IncompatibleOptions.java fails if VM configured without ZGC
goetz
parents:
51527
diff
changeset
|
108 |
if (GC.Z.isSupported()) { // ZGC is included in build. |
50864
cc318277c142
8205702: assert(UseCompressedClassPointers) failed in universe.hpp
pliden
parents:
50455
diff
changeset
|
109 |
testDump(1, "-XX:+UnlockExperimentalVMOptions", "-XX:+UseZGC", COOPS_DUMP_WARNING, true); |
cc318277c142
8205702: assert(UseCompressedClassPointers) failed in universe.hpp
pliden
parents:
50455
diff
changeset
|
110 |
} |
48138 | 111 |
|
112 |
// incompatible GCs |
|
113 |
testDump(2, "-XX:+UseParallelGC", "", GC_WARNING, false); |
|
114 |
testDump(3, "-XX:+UseSerialGC", "", GC_WARNING, false); |
|
50455
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
115 |
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
116 |
testDump(4, "-XX:+UseConcMarkSweepGC", "", GC_WARNING, false); |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
117 |
} |
48138 | 118 |
|
119 |
// ======= archive with compressed oops, run w/o |
|
120 |
testDump(5, "-XX:+UseG1GC", "-XX:+UseCompressedOops", null, false); |
|
121 |
testExec(5, "-XX:+UseG1GC", "-XX:-UseCompressedOops", |
|
122 |
COOPS_EXEC_WARNING, true); |
|
123 |
||
124 |
// NOTE: No warning is displayed, by design |
|
125 |
// Still run, to ensure no crash or exception |
|
126 |
testExec(6, "-XX:+UseParallelGC", "", "", false); |
|
127 |
testExec(7, "-XX:+UseSerialGC", "", "", false); |
|
50455
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
128 |
if (!Compiler.isGraalEnabled()) { // Graal does not support CMS |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
129 |
testExec(8, "-XX:+UseConcMarkSweepGC", "", "", false); |
2b73cce96dce
8202611: [GRAAL] Exclude CMS GC testing from runs with Graal
kvn
parents:
49008
diff
changeset
|
130 |
} |
48138 | 131 |
|
132 |
// Test various oops encodings, by varying ObjectAlignmentInBytes and heap sizes |
|
133 |
testDump(9, "-XX:+UseG1GC", "-XX:ObjectAlignmentInBytes=8", null, false); |
|
134 |
testExec(9, "-XX:+UseG1GC", "-XX:ObjectAlignmentInBytes=16", |
|
135 |
OBJ_ALIGNMENT_MISMATCH, true); |
|
136 |
||
137 |
// See JDK-8081416 - Oops encoding mismatch with shared strings |
|
138 |
// produces unclear or incorrect warning |
|
139 |
// Correct the test case once the above is fixed |
|
140 |
// @ignore JDK-8081416 - for tracking purposes |
|
141 |
// for now, run test as is until the proper behavior is determined |
|
142 |
testDump(10, "-XX:+UseG1GC", "-Xmx1g", null, false); |
|
143 |
testExec(10, "-XX:+UseG1GC", "-Xmx32g", null, true); |
|
144 |
||
145 |
// CompactStrings must match between dump time and run time |
|
146 |
testDump(11, "-XX:+UseG1GC", "-XX:-CompactStrings", null, false); |
|
147 |
testExec(11, "-XX:+UseG1GC", "-XX:+CompactStrings", |
|
148 |
COMPACT_STRING_MISMATCH, true); |
|
149 |
testDump(12, "-XX:+UseG1GC", "-XX:+CompactStrings", null, false); |
|
150 |
testExec(12, "-XX:+UseG1GC", "-XX:-CompactStrings", |
|
151 |
COMPACT_STRING_MISMATCH, true); |
|
152 |
} |
|
153 |
||
154 |
static void testDump(int testCaseNr, String collectorOption, String extraOption, |
|
155 |
String expectedWarning, boolean expectedToFail) throws Exception { |
|
156 |
||
157 |
System.out.println("Testcase: " + testCaseNr); |
|
158 |
OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello"), |
|
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
159 |
TestCommon.concat(vmOptionsPrefix, |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
160 |
"-XX:+UseCompressedOops", |
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
161 |
collectorOption, |
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
162 |
"-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("SharedStringsBasic.txt"), |
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
163 |
"-Xlog:cds,cds+hashtables", |
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
164 |
extraOption)); |
48138 | 165 |
|
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
166 |
if (expectedWarning != null) { |
48138 | 167 |
output.shouldContain(expectedWarning); |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
168 |
} |
48138 | 169 |
|
170 |
if (expectedToFail) { |
|
171 |
Asserts.assertNE(output.getExitValue(), 0, |
|
172 |
"JVM is expected to fail, but did not"); |
|
173 |
} |
|
174 |
} |
|
175 |
||
176 |
static void testExec(int testCaseNr, String collectorOption, String extraOption, |
|
177 |
String expectedWarning, boolean expectedToFail) throws Exception { |
|
178 |
||
179 |
OutputAnalyzer output; |
|
180 |
System.out.println("Testcase: " + testCaseNr); |
|
181 |
||
182 |
// needed, otherwise system considers empty extra option as a |
|
183 |
// main class param, and fails with "Could not find or load main class" |
|
184 |
if (!extraOption.isEmpty()) { |
|
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
185 |
output = TestCommon.exec(appJar, |
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
186 |
TestCommon.concat(vmOptionsPrefix, |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
187 |
"-XX:+UseCompressedOops", |
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
188 |
collectorOption, "-Xlog:cds", extraOption, "HelloString")); |
48138 | 189 |
} else { |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
190 |
output = TestCommon.exec(appJar, |
52400
ca309ee4fd92
8211336: [TESTBUG] appcds tests with incorrect usage of -XX:+UseStringDeduplication
iklam
parents:
52032
diff
changeset
|
191 |
TestCommon.concat(vmOptionsPrefix, |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
192 |
"-XX:+UseCompressedOops", |
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
193 |
collectorOption, "-Xlog:cds", "HelloString")); |
48138 | 194 |
} |
195 |
||
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
196 |
if (expectedWarning != null) { |
48138 | 197 |
output.shouldMatch(expectedWarning); |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
198 |
} |
48138 | 199 |
|
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
200 |
if (expectedToFail) { |
48138 | 201 |
Asserts.assertNE(output.getExitValue(), 0); |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
202 |
} else { |
48138 | 203 |
SharedStringsUtils.checkExec(output); |
51527
dda0f219dafa
8208658: Make CDS archived heap regions usable even if compressed oop encoding has changed
iklam
parents:
51491
diff
changeset
|
204 |
} |
48138 | 205 |
} |
206 |
} |