Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/ValueBasedClassTest/jep390.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
3
<!--
4
Copyright (c) 2021, 2021 IBM Corp. and others
5
6
This program and the accompanying materials are made available under
7
the terms of the Eclipse Public License 2.0 which accompanies this
8
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
9
or the Apache License, Version 2.0 which accompanies this distribution and
10
is available at https://www.apache.org/licenses/LICENSE-2.0.
11
12
This Source Code may also be made available under the following
13
Secondary Licenses when the conditions for such availability set
14
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
15
General Public License, version 2 with the GNU Classpath
16
Exception [1] and GNU General Public License, version 2 with the
17
OpenJDK Assembly Exception [2].
18
19
[1] https://www.gnu.org/software/classpath/license.html
20
[2] http://openjdk.java.net/legal/assembly-exception.html
21
22
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
23
-->
24
25
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">
26
27
<suite id="Value based class tests" timeout="300">
28
<!--
29
This test is for the new command line options added in Java 16 and up by JEP390: Warnings for Value-Based Classes.
30
-XX:DiagnoseSyncOnValueBasedClasses=1 triggers a VirtualMachineError when synchronizing on a object that is value-based.
31
-XX:DiagnoseSyncOnValueBasedClasses=1 triggers a warning message when synchronizing on a object that is value-based.
32
This JEP is to prepare users for the upcoming value-types.
33
-->
34
<test id="Test 1-a Test no error warning or VirtualMachineError if neither of the new CML options is used when calling syncOnValueBasedClass()">
35
<command>$JAVA_EXE$ -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest VB</command>
36
<output regex="no" type="success">ValueBasedClassTest Exit</output>
37
<output regex="no" type="required">Calling method syncOnValueBasedClass()</output>
38
<output type="failure" caseSensitive="no" regex="no">object that is synchronized is value-based</output>
39
<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>
40
<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>
41
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
42
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
43
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
44
</test>
45
46
<test id="Test 1-b Test no error warning or VirtualMachineError if neither of the new CML options is used when calling syncOnObject()">
47
<command>$JAVA_EXE$ -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest OBJ</command>
48
<output regex="no" type="success">ValueBasedClassTest Exit</output>
49
<output regex="no" type="required">Calling method syncOnObject()</output>
50
<output type="failure" caseSensitive="no" regex="no">object that is synchronized is value-based</output>
51
<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>
52
<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>
53
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
54
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
55
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
56
</test>
57
58
<test id="Test 2-a Test error message when calling syncOnValueBasedClass()">
59
<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=1 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest VB</command>
60
<output regex="no" type="success">Calling method syncOnValueBasedClass()</output>
61
<output regex="no" type="required">VirtualMachineError: bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>
62
<output regex="no" type="required">at org.openj9.test.JEP390Test.ValueBasedClassTest.syncOnValueBasedClass(ValueBasedClassTest.java:48)</output>
63
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
64
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
65
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
66
</test>
67
68
<test id="Test 2-b Test error message when calling syncOnObject()">
69
<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=1 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest OBJ</command>
70
<output regex="no" type="success">Calling method syncOnObject()</output>
71
<output regex="no" type="required">VirtualMachineError: bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>
72
<output regex="no" type="required">at org.openj9.test.JEP390Test.ValueBasedClassTest.syncOnObject(ValueBasedClassTest.java:54)</output>
73
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
74
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
75
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
76
</test>
77
78
<test id="Test 3-a Test warning message when calling syncOnValueBasedClass()">
79
<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=2 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest VB</command>
80
<output regex="no" type="success">ValueBasedClassTest Exit</output>
81
<output regex="no" type="required">Calling method syncOnValueBasedClass()</output>
82
<output regex="no" type="required">JVMJ9VM200W bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>
83
<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>
84
<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>
85
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
86
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
87
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
88
</test>
89
90
<test id="Test 3-b Test warning message when calling syncOnObject()">
91
<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=2 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest OBJ</command>
92
<output regex="no" type="success">ValueBasedClassTest Exit</output>
93
<output regex="no" type="required">Calling method syncOnObject()</output>
94
<output regex="no" type="required">JVMJ9VM200W bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>
95
<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>
96
<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>
97
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
98
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
99
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
100
</test>
101
</suite>
102
103