Path: blob/master/test/functional/cmdLineTests/ValueBasedClassTest/jep390.xml
6004 views
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>12<!--3Copyright (c) 2021, 2021 IBM Corp. and others45This program and the accompanying materials are made available under6the terms of the Eclipse Public License 2.0 which accompanies this7distribution and is available at https://www.eclipse.org/legal/epl-2.0/8or the Apache License, Version 2.0 which accompanies this distribution and9is available at https://www.apache.org/licenses/LICENSE-2.0.1011This Source Code may also be made available under the following12Secondary Licenses when the conditions for such availability set13forth in the Eclipse Public License, v. 2.0 are satisfied: GNU14General Public License, version 2 with the GNU Classpath15Exception [1] and GNU General Public License, version 2 with the16OpenJDK Assembly Exception [2].1718[1] https://www.gnu.org/software/classpath/license.html19[2] http://openjdk.java.net/legal/assembly-exception.html2021SPDX-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-exception22-->2324<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">2526<suite id="Value based class tests" timeout="300">27<!--28This test is for the new command line options added in Java 16 and up by JEP390: Warnings for Value-Based Classes.29-XX:DiagnoseSyncOnValueBasedClasses=1 triggers a VirtualMachineError when synchronizing on a object that is value-based.30-XX:DiagnoseSyncOnValueBasedClasses=1 triggers a warning message when synchronizing on a object that is value-based.31This JEP is to prepare users for the upcoming value-types.32-->33<test id="Test 1-a Test no error warning or VirtualMachineError if neither of the new CML options is used when calling syncOnValueBasedClass()">34<command>$JAVA_EXE$ -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest VB</command>35<output regex="no" type="success">ValueBasedClassTest Exit</output>36<output regex="no" type="required">Calling method syncOnValueBasedClass()</output>37<output type="failure" caseSensitive="no" regex="no">object that is synchronized is value-based</output>38<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>39<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>40<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>41<output type="failure" caseSensitive="yes" regex="no">Exception:</output>42<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>43</test>4445<test id="Test 1-b Test no error warning or VirtualMachineError if neither of the new CML options is used when calling syncOnObject()">46<command>$JAVA_EXE$ -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest OBJ</command>47<output regex="no" type="success">ValueBasedClassTest Exit</output>48<output regex="no" type="required">Calling method syncOnObject()</output>49<output type="failure" caseSensitive="no" regex="no">object that is synchronized is value-based</output>50<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>51<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>52<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>53<output type="failure" caseSensitive="yes" regex="no">Exception:</output>54<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>55</test>5657<test id="Test 2-a Test error message when calling syncOnValueBasedClass()">58<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=1 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest VB</command>59<output regex="no" type="success">Calling method syncOnValueBasedClass()</output>60<output regex="no" type="required">VirtualMachineError: bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>61<output regex="no" type="required">at org.openj9.test.JEP390Test.ValueBasedClassTest.syncOnValueBasedClass(ValueBasedClassTest.java:48)</output>62<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>63<output type="failure" caseSensitive="yes" regex="no">Exception:</output>64<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>65</test>6667<test id="Test 2-b Test error message when calling syncOnObject()">68<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=1 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest OBJ</command>69<output regex="no" type="success">Calling method syncOnObject()</output>70<output regex="no" type="required">VirtualMachineError: bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>71<output regex="no" type="required">at org.openj9.test.JEP390Test.ValueBasedClassTest.syncOnObject(ValueBasedClassTest.java:54)</output>72<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>73<output type="failure" caseSensitive="yes" regex="no">Exception:</output>74<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>75</test>7677<test id="Test 3-a Test warning message when calling syncOnValueBasedClass()">78<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=2 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest VB</command>79<output regex="no" type="success">ValueBasedClassTest Exit</output>80<output regex="no" type="required">Calling method syncOnValueBasedClass()</output>81<output regex="no" type="required">JVMJ9VM200W bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>82<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>83<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>84<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>85<output type="failure" caseSensitive="yes" regex="no">Exception:</output>86<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>87</test>8889<test id="Test 3-b Test warning message when calling syncOnObject()">90<command>$JAVA_EXE$ -XX:DiagnoseSyncOnValueBasedClasses=2 -cp $Q$$JARPATH$$Q$ org.openj9.test.JEP390Test.ValueBasedClassTest OBJ</command>91<output regex="no" type="success">ValueBasedClassTest Exit</output>92<output regex="no" type="required">Calling method syncOnObject()</output>93<output regex="no" type="required">JVMJ9VM200W bad object type org/openj9/test/JEP390Test/ValueBasedClass: object that is synchronized is value-based</output>94<output type="failure" caseSensitive="no" regex="no">VirtualMachineError</output>95<output type="failure" caseSensitive="no" regex="no">ValueBasedClassTest.java</output>96<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>97<output type="failure" caseSensitive="yes" regex="no">Exception:</output>98<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>99</test>100</suite>101102103