Skip to content

Commit

Permalink
Merge pull request #10718 from llxia/test7
Browse files Browse the repository at this point in the history
Port cmdLineTester_fastClassHashTable into openj9
  • Loading branch information
pshipton authored Oct 15, 2020
2 parents 7c560a5 + 4d4ebd8 commit 6553cea
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 0 deletions.
44 changes: 44 additions & 0 deletions test/functional/cmdLineTests/fastClassHashTable/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0"?>

<!--
Copyright (c) 2020, 2020 IBM Corp. and others
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
[1] https://www.gnu.org/software/classpath/license.html
[2] http://openjdk.java.net/legal/assembly-exception.html
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
-->

<project name="cmdLineTests" default="build" basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<description>
Build cmdLineTests fastClassHashTable
</description>

<!-- set properties for this build -->
<property name="DEST" value="${BUILD_ROOT}/functional/cmdLineTests/fastClassHashTable" />
<property name="src" location="." />

<target name="dist" description="generate the distribution">
<copy todir="${DEST}">
<fileset dir="${src}" includes="*.xml,*.mk"/>
</copy>
</target>

<target name="build" >
<antcall target="dist" inheritall="true" />
</target>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!--
Copyright (c) 2016, 2020 IBM Corp. and others
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
[1] https://www.gnu.org/software/classpath/license.html
[2] http://openjdk.java.net/legal/assembly-exception.html
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
-->

<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">

<suite id="SIGXFSZ Handling Tests" timeout="2400">
<variable name="CP" value="-cp $Q$$RESJAR$$Q$" />
<variable name="FASTTABLE" value="-XX:+FastClassHashTable" />
<variable name="NOTFASTTABLE" value="-XX:-FastClassHashTable" />
<variable name="TRACE" value="-Xtrace:print={j9vm.480-482}" />

<test id="Default">
<command>$EXE$ $TRACE$ $CP$ j9vm.test.fastclasshashtable.FastClassHashTableTest</command>
<output regex="yes" type="required">.*jvmPhaseChange occured (Phase = 2).*</output>
<output regex="yes" type="required">.*Enabled FastClassHashTable.*</output>
<output regex="yes" type="success">.* Freeing previous hashtable .* for FastClasshashTable.*</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">core dump</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">corrupt</output>
<output regex="no" type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
</test>

<test id="-XX:-FastClasshashTable -XX:+FastClasshashTable">
<command>$EXE$ $TRACE$ $CP$ $NOTFASTTABLE$ $FASTTABLE$ j9vm.test.fastclasshashtable.FastClassHashTableTest</command>
<output regex="yes" type="required">.*jvmPhaseChange occured (Phase = 2).*</output>
<output regex="yes" type="required">.*Enabled FastClassHashTable.*</output>
<output regex="yes" type="success">.* Freeing previous hashtable .* for FastClasshashTable.*</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">core dump</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">corrupt</output>
<output regex="no" type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
</test>

<test id="-XX:+FastClasshashTable -XX:-FastClasshashTable">
<command>$EXE$ $TRACE$ $CP$ $FASTTABLE$ $NOTFASTTABLE$ j9vm.test.fastclasshashtable.FastClassHashTableTest</command>
<output regex="yes" type="success">.*jvmPhaseChange occured (Phase = 2).*</output>
<output regex="yes" type="failure">.*Enabled FastClassHashTable.*</output>
<output regex="yes" type="failure">.* Freeing previous hashtable .* for FastClasshashTable.*</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">core dump</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output regex="no" type="failure" caseSensitive="no" regex="no">corrupt</output>
<output regex="no" type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
</test>

</suite>
50 changes: 50 additions & 0 deletions test/functional/cmdLineTests/fastClassHashTable/playlist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright (c) 2020, 2020 IBM Corp. and others
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
[1] https://www.gnu.org/software/classpath/license.html
[2] http://openjdk.java.net/legal/assembly-exception.html
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
-->

<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../TKG/playlist.xsd">
<test>
<testCaseName>cmdLineTester_fastClassHashTable</testCaseName>
<variations>
<variation>NoOptions</variation>
</variations>
<command>$(JAVA_COMMAND) $(JVM_OPTIONS) \
-DEXE=$(SQ)$(JAVA_COMMAND) $(JVM_OPTIONS)$(SQ) -DRESJAR=$(CMDLINETESTER_RESJAR) -jar $(CMDLINETESTER_JAR) \
-config $(Q)$(TEST_RESROOT)$(D)fastClassHashTableTest.xml$(Q) \
-nonZeroExitWhenError; \
${TEST_STATUS}</command>
<levels>
<level>extended</level>
</levels>
<groups>
<group>functional</group>
</groups>
<subsets>
<subset>8+</subset>
</subsets>
<impls>
<impl>openj9</impl>
<impl>ibm</impl>
</impls>
</test>
</playlist>

0 comments on commit 6553cea

Please sign in to comment.