Skip to content

Commit

Permalink
enable cmdLine tests on OpenJ9
Browse files Browse the repository at this point in the history
* enable cmdLine tests on Openj9
* excluded some failed test and open issues for them

Fixes:eclipse-openj9#305
Signed-off-by: Tianyu Zuo <[email protected]>
  • Loading branch information
Tianyu Zuo authored and JamesKingdon committed Apr 18, 2019
1 parent 28210be commit 0d2339e
Show file tree
Hide file tree
Showing 23 changed files with 117 additions and 97 deletions.
1 change: 0 additions & 1 deletion test/TestConfig/scripts/build_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
<property name="compiler.javac" value="${JAVAC}" />
<fileset dir="../../" includes="${build.list}" >
<exclude name="TEST_*/build.xml" />
<exclude name="cmd*/build.xml" />
<exclude name="Jsr292/build.xml" />
<exclude name="Jsr335/build.xml" />
<exclude name="NativeTest/build.xml" />
Expand Down
2 changes: 1 addition & 1 deletion test/TestConfig/scripts/testKitGen/makeGenTool/mkgen.pl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ sub generateOnDir {
while ( my $entry = readdir $dir ) {
next if $entry eq '.' or $entry eq '..';
# temporarily exclude projects for CCM build (i.e., when JCL_VERSION is latest)
my $latestDisabledDir = "cmdline_options_tester cmdline_options_testresources cmdLineTests Jsr292 Jsr335 Panama NativeTest UnsafeTest SharedCPEntryInvokerTests gcCheck classvertest";
my $latestDisabledDir = "jvmtitests proxyFieldAccess classesdbgddrext dumpromtests jep178staticLinkingTest getCallerClassTests pltest Jsr292 Jsr335 Panama NativeTest UnsafeTest SharedCPEntryInvokerTests gcCheck classvertest";
# Temporarily exclude SVT_Modularity tests from integration build where we are still using b148 JCL level
my $currentDisableDir= "SVT_Modularity OpenJ9_Jsr_292_API";
if ((($JCL_VERSION eq "latest") and ($latestDisabledDir !~ $entry )) or (($JCL_VERSION eq "current") and ($currentDisableDir !~ $entry ))) {
Expand Down
10 changes: 10 additions & 0 deletions test/cmdLineTests/URLClassLoaderTests/exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,14 @@
<!-- PR 133321 -->
<exclude id="JarExtensionsTests.SingleJarInManifest.Verify1" platform="all"><reason>Failure condition was not found</reason></exclude>
<exclude id="JarExtensionsTests.MultipleJarsInManifests.Verify1" platform="all"><reason>Failure condition was not found</reason></exclude>

<exclude id="Sanity.verifySuccess" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>
<exclude id="FindStore.FindExplicit" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>
<exclude id="FindStore.FindRelative" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>
<exclude id="FindStore.FindNetUse" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>
<exclude id="FindStore.FindClassfile" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>
<exclude id="FindStore.FindDiffcpClassfile" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>
<exclude id="JarExtensionsTests.SingleJarInManifestWithIndex.Verify1" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>
<exclude id="JarExtensionsTests.MultipleJarsInManifestsWithIndex.Verify1" platform="all"><reason>Unexpected message printed out in cmdLineTester_SCURLClassLoaderNPTests_SE90 and cmdLineTester_SCURLClassLoaderTests_SE90</reason></exclude>

</suite>
19 changes: 16 additions & 3 deletions test/cmdLineTests/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,22 @@
</target>

<target name="build" depends="dist">
<subant target="">
<fileset dir="." includes="*/build.xml" />
</subant>
<if>
<equals arg1="${JCL_VERSION}" arg2="latest" />
<then>
<subant target="">
<fileset dir="." includes="*/build.xml">
<exclude name="jvmtitests/build.xml" />
<exclude name="proxyFieldAccess/build.xml" />
</fileset>
</subant>
</then>
<else>
<subant target="">
<fileset dir="." includes="*/build.xml" />
</subant>
</else>
</if>
</target>

<target name="dist" depends="init">
Expand Down
14 changes: 7 additions & 7 deletions test/cmdLineTests/cmdLineTest_J9tests/j9tests_Java8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -432,26 +432,26 @@

<test id="Test entitledcpus option accepted">
<command>$EXE$ -Xentitledcpus5 $VERSION$ </command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="failure">JVMJ9VM013W</output>
</test>

<test id="Test entitledcpus negative value">
<command>$EXE$ -Xentitledcpus-1 $VERSION$ </command>
<output regex="no" type="success">JVMJ9VM013W</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>

<test id="Test entitledcpus non-numeric value">
<command>$EXE$ -XentitledcpusZ $VERSION$ </command>
<output regex="no" type="success">JVMJ9VM013W</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>

<test id="Test entitledcpus alphanumeric value">
<command>$EXE$ -Xentitledcpus123Z $VERSION$ </command>
<output regex="no" type="success">JVMJ9VM013W</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>


Expand All @@ -470,18 +470,18 @@
<test id="Verify a very long (~1500 bytes) command line option">
<command>$EXE$ -Djava.home=$INVALIDVERYLONGOPTION$ $VERSION$</command>
<output regex="no" type="success">Error: Could not create the Java Virtual Machine</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>

<test id="Test combining options -Xint and -XtlhPrefetch">
<command>$EXE$ -Xint -XtlhPrefetch -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="failure">JVMJ9VM007E</output>
</test>

<test id="Test option -Xtrace:output" timeout="60">
<command>$EXE$ -Xtrace:output=testTraceOutput.trc -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
</test>

<test id="-XX:-InterleaveMemory">
Expand Down
14 changes: 7 additions & 7 deletions test/cmdLineTests/cmdLineTest_J9tests/j9tests_Java9.xml
Original file line number Diff line number Diff line change
Expand Up @@ -420,26 +420,26 @@

<test id="Test entitledcpus option accepted">
<command>$EXE$ -Xentitledcpus5 $VERSION$ </command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="failure">JVMJ9VM013W</output>
</test>

<test id="Test entitledcpus negative value">
<command>$EXE$ -Xentitledcpus-1 $VERSION$ </command>
<output regex="no" type="success">JVMJ9VM013W</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>

<test id="Test entitledcpus non-numeric value">
<command>$EXE$ -XentitledcpusZ $VERSION$ </command>
<output regex="no" type="success">JVMJ9VM013W</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>

<test id="Test entitledcpus alphanumeric value">
<command>$EXE$ -Xentitledcpus123Z $VERSION$ </command>
<output regex="no" type="success">JVMJ9VM013W</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>


Expand All @@ -458,18 +458,18 @@
<test id="Verify a very long (~1500 bytes) command line option">
<command>$EXE$ -Djava.home=$INVALIDVERYLONGOPTION$ $VERSION$</command>
<output regex="no" type="success">Error: Could not create the Java Virtual Machine</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>

<test id="Test combining options -Xint and -XtlhPrefetch">
<command>$EXE$ -Xint -XtlhPrefetch -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="failure">JVMJ9VM007E</output>
</test>

<test id="Test option -Xtrace:output" timeout="60">
<command>$EXE$ -Xtrace:output=testTraceOutput.trc -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
</test>

<test id="-XX:-InterleaveMemory">
Expand Down
14 changes: 7 additions & 7 deletions test/cmdLineTests/gcRegressionTests/gcRegressionTests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,22 +108,22 @@
</test>
<test id="-Xmaxf0.75">
<command>$EXE$ -Xmaxf0.75 -version</command>
<output regex="no" type="success">java version</output><!-- Ensure 0.75 is accepted as a valid input -->
<output regex="no" type="success">version</output><!-- Ensure 0.75 is accepted as a valid input -->
<output regex="no" type="success">JVMJ9VM007E</output><!-- Command-line option unrecognised, required since -Xmaxf is not supported when gc_realtime is enabled -->
</test>
<test id="-Xmaxf1">
<command>$EXE$ -Xmaxf1 -version</command>
<output regex="no" type="success">java version</output><!-- Ensure 1 is accepted as a valid input -->
<output regex="no" type="success">version</output><!-- Ensure 1 is accepted as a valid input -->
<output regex="no" type="success">JVMJ9VM007E</output><!-- Command-line option unrecognised, required since -Xmaxf is not supported when gc_realtime is enabled -->
</test>
<test id="-Xmaxf1.0">
<command>$EXE$ -Xmaxf1.0 -version</command>
<output regex="no" type="success">java version</output><!-- Ensure 1.0 is accepted as a valid input -->
<output regex="no" type="success">version</output><!-- Ensure 1.0 is accepted as a valid input -->
<output regex="no" type="success">JVMJ9VM007E</output><!-- Command-line option unrecognised, required since -Xmaxf is not supported when gc_realtime is enabled -->
</test>
<test id="-Xmaxf1.00">
<command>$EXE$ -Xmaxf1.00 -version</command>
<output regex="no" type="success">java version</output<!-- Ensure 1.00 is accepted as a valid input -->
<output regex="no" type="success">version</output<!-- Ensure 1.00 is accepted as a valid input -->
<output regex="no" type="success">JVMJ9VM007E</output><!-- Command-line option unrecognised, required since -Xmaxf is not supported when gc_realtime is enabled -->
</test>

Expand Down Expand Up @@ -328,17 +328,17 @@
<exec command="rm foo.*.log" />
<command>$EXE$ $XINT$ $ARGS_FOR_ALL_TESTS$ -verbose:gc -Xverbosegclog:foo/bar/foo.log -version</command>
<output regex="yes" type="success">JVMJ9GC063E.*'foo/bar/foo\.log'.*</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
</test>
-->

<test id="-verbose:gc -Xverbosegclog:<verylong>,10,10 - use a very long log file name">
<exec command="rm foo.*.log" />
<command>$EXE$ $XINT$ $ARGS_FOR_ALL_TESTS$ -verbose:gc -Xverbosegclog:foo.#######################################################################################################################################################################################################################################################################################################################.log,10,10 -version</command>
<!-- two success modes -- unable to open file (with correct name), or java version printed -->
<!-- two success modes -- unable to open file (with correct name), or version printed -->
<!-- use a regex to allow for translated messages -->
<output regex="yes" type="success">JVMJ9GC063E.*'foo\.001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001\.log'.*</output>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
</test>
<test id="-verbose:gc -Xcheck:memory - check for memory corruption">
<command>$EXE$ $XINT$ $ARGS_FOR_ALL_TESTS$ -verbose:gc -Dibm.java9.forceCommonCleanerShutdown=true -Xcheck:memory:ignoreUnfreedCallsite=zip/:dbgwrapper:unknown:wrapper -version</command>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@
<exclude id="Excessive GC throws OOM" platform="Mode301" shouldFix="true"><reason>Metronome and Staccato do not use excessive GC</reason></exclude>
<exclude id="Excessive GC appears in verbose log" platform="Mode301" shouldFix="true"><reason>Metronome and Staccato do not use excessive GC</reason></exclude>

<exclude id="Ensure no core files have been produced by the preceding tests" platform="all" shouldFix="true"><reason>Extra core files were created which caused failure</reason></exclude>
</suite>

2 changes: 1 addition & 1 deletion test/cmdLineTests/gcRegressionTests/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</variations>
<command>$(JAVA_COMMAND) $(JVM_OPTIONS) -DTESTSJARPATH=$(Q)$(TEST_RESROOT)$(D)gcRegressionTests.jar$(Q) -DRESJAR=$(CMDLINETESTER_RESJAR) \
-DEXE='$(JAVA_COMMAND) $(JVM_OPTIONS)' -Xint -jar $(CMDLINETESTER_JAR) -config $(Q)$(TEST_RESROOT)$(D)gcRegressionTests.xml$(Q) \
-verbose -explainExcludes -nonZeroExitWhenError; \
-verbose -explainExcludes -xids all,$(PLATFORM),$(VARIATION) -plats all,$(PLATFORM),$(VARIATION) -xlist $(Q)$(TEST_RESROOT)$(D)gcRegressionTests_excludes.xml$(Q) -nonZeroExitWhenError; \
$(TEST_STATUS)</command>
<tags>
<tag>sanity</tag>
Expand Down
26 changes: 13 additions & 13 deletions test/cmdLineTests/gcsuballoctests/gcsuballoctests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<test id="-Xgc:suballocatorInitialSize=100m">
<command>$EXE$ -Xgc:suballocatorInitialSize=100m -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="required">Runtime Environment</output>
<output regex="no" type="failure">Exception</output>
<output regex="no" type="failure">Error</output>
Expand All @@ -41,7 +41,7 @@

<test id="-Xgc:suballocatorCommitSize=10m">
<command>$EXE$ -Xgc:suballocatorCommitSize=10m -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="required">Runtime Environment</output>
<output regex="no" type="failure">Exception</output>
<output regex="no" type="failure">Error</output>
Expand All @@ -56,7 +56,7 @@
<!-- JVMJ9VM015W Initialization error for library j9gc26(2): Failed to initialize -->
<output regex="no" type="required">JVMJ9VM015W</output>
<output regex="no" caseSensitive="no" type="required">Could not create the Java Virtual Machine.</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
<output regex="no" type="failure">Runtime Environment</output>
<output regex="no" type="failure">JVMDUMP006I</output>
<output regex="no" type="failure">Processing dump event</output>
Expand All @@ -69,7 +69,7 @@
<!-- JVMJ9VM015W Initialization error for library j9gc26(2): Failed to initialize -->
<output regex="no" type="required">JVMJ9VM015W</output>
<output regex="no" caseSensitive="no" type="required">Could not create the Java Virtual Machine.</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
<output regex="no" type="failure">Runtime Environment</output>
<output regex="no" type="failure">JVMDUMP006I</output>
<output regex="no" type="failure">Processing dump event</output>
Expand All @@ -82,7 +82,7 @@
<!-- JVMJ9VM015W Initialization error for library j9gc26(2): Failed to initialize -->
<output regex="no" type="required">JVMJ9VM015W</output>
<output regex="no" caseSensitive="no" type="required">Could not create the Java Virtual Machine.</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
<output regex="no" type="failure">Runtime Environment</output>
<output regex="no" type="failure">JVMDUMP006I</output>
<output regex="no" type="failure">Processing dump event</output>
Expand All @@ -95,15 +95,15 @@
<!-- JVMJ9VM015W Initialization error for library j9gc26(2): Failed to initialize -->
<output regex="no" type="required">JVMJ9VM015W</output>
<output regex="no" caseSensitive="no" type="required">Could not create the Java Virtual Machine.</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
<output regex="no" type="failure">Runtime Environment</output>
<output regex="no" type="failure">JVMDUMP006I</output>
<output regex="no" type="failure">Processing dump event</output>
</test>

<test id="-Xgc:suballocatorCommitSize=256m -Xgc:suballocatorInitialSize=512m">
<command>$EXE$ -Xgc:suballocatorCommitSize=256m -Xgc:suballocatorInitialSize=512m -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="required">Runtime Environment</output>
<output regex="no" type="failure">Exception</output>
<output regex="no" type="failure">Error</output>
Expand All @@ -113,7 +113,7 @@

<test id="-Xgc:suballocatorCommitSize=1m -Xgc:suballocatorInitialSize=1m">
<command>$EXE$ -Xgc:suballocatorCommitSize=1m -Xgc:suballocatorInitialSize=1m -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="required">Runtime Environment</output>
<output regex="no" type="failure">Exception</output>
<output regex="no" type="failure">Error</output>
Expand All @@ -123,7 +123,7 @@

<test id="-Xmcrs100m">
<command>$EXE$ -Xmcrs100m -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="required">Runtime Environment</output>
<output regex="no" type="failure">Exception</output>
<output regex="no" type="failure">Error</output>
Expand All @@ -137,15 +137,15 @@
<output regex="no" type="success">JVMJ9GC036E</output>
<output regex="no" type="required">JVMJ9VM015W</output>
<output regex="no" caseSensitive="no" type="required">Could not create the Java Virtual Machine.</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
<output regex="no" type="failure">Runtime Environment</output>
<output regex="no" type="failure">JVMDUMP006I</output>
<output regex="no" type="failure">Processing dump event</output>
</test>

<test id="-Xmcrs10m -Xgc:suballocatorCommitSize=80m">
<command>$EXE$ -Xmcrs10m -Xgc:suballocatorCommitSize=80m -version</command>
<output regex="no" type="success">java version</output>
<output regex="no" type="success">version</output>
<output regex="no" type="required">Runtime Environment</output>
<output regex="no" type="failure">Exception</output>
<output regex="no" type="failure">Error</output>
Expand All @@ -159,7 +159,7 @@
<output regex="no" type="success">JVMJ9GC038E</output>
<output regex="no" type="required">JVMJ9VM015W</output>
<output regex="no" caseSensitive="no" type="required">Could not create the Java Virtual Machine.</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
<output regex="no" type="failure">Runtime Environment</output>
<output regex="no" type="failure">JVMDUMP006I</output>
<output regex="no" type="failure">Processing dump event</output>
Expand All @@ -169,7 +169,7 @@
<command>$EXE$ -Xmcrs4294967040 -version</command>
<output regex="no" type="success">JVMJ9VM015W</output>
<output regex="no" caseSensitive="no" type="required">Could not create the Java Virtual Machine.</output>
<output regex="no" type="failure">java version</output>
<output regex="no" type="failure">version</output>
<output regex="no" type="failure">Runtime Environment</output>
<output regex="no" type="failure">JVMDUMP006I</output>
<output regex="no" type="failure">Processing dump event</output>
Expand Down
Loading

0 comments on commit 0d2339e

Please sign in to comment.