Skip to content

(v0.48.0) Fix testXXArgumentTesting #20190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions test/functional/cmdLineTests/xxargtest/XXArgumentTesting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,53 +25,6 @@
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">
<suite id="XXArgumentTesting.xml" timeout="1000">

<test id="Ensure -XXnosuballoc32bitmem is recognized on all platforms">
<command>$EXE$ -Xcompressedrefs -XXnosuballoc32bitmem -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
<output regex="no" type="failure">Command-line option unrecognised</output>
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
</test>

<exec command="rm -f testjavacore.txt" quiet="false"/>

<test id="Generate a javacore without -XXnosuballoc32bitmem">
<command>$EXE$ -Xcompressedrefs -Xdump:java:events=vmstop,file=testjavacore.txt -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
<output regex="no" type="failure">Command-line option unrecognised</output>
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
</test>

<test id="Verify that the sub allocator memory is listed in the javacore">
<command>cat testjavacore.txt</command>
<output type="success" caseSensitive="no" regex="no">32bit allocation regions</output>
</test>

<exec command="rm -f testjavacore.txt" quiet="false"/>

<test id="Generate a javacore with -XXnosuballoc32bitmem">
<command>$EXE$ -Xcompressedrefs -XXnosuballoc32bitmem -Xdump:java:events=vmstop,file=testjavacore.txt -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
<output regex="no" type="failure">Command-line option unrecognised</output>
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
</test>

<test id="Verify that the sub allocator memory is not listed in the javacore on z/OS. All other platforms should use the sub-allocator when -XXnosuballoc32bitmem is used.">
<command>cat testjavacore.txt</command>
<output type="success" caseSensitive="no" regex="no">Javacore filename</output>
<output type="failure" caseSensitive="no" regex="no" platforms="zos_390-64_cmprssptrs.*">32bit allocation regions</output>
</test>

<test id="Verify -XX:MaxHeapSize -XX:InitialHeapSize -XX:ThreadStackSize">
<command>$EXE$ -XX:MaxHeapSize=234m -XX:InitialHeapSize=11m -verbose:sizes -version</command>
<output type="success" caseSensitive="no" regex="no">OpenJ9</output>
<output type="required" caseSensitive="no" regex="no">-Xmx234M</output>
<output type="required" caseSensitive="no" regex="no">-Xms11M</output>
</test>

<test id="Verify -XX:+PrintFlagsFinal">
<command>$EXE$ -XX:+PrintFlagsFinal -version</command>
<output type="success" caseSensitive="no" regex="no">[Global flags]</output>
Expand Down
47 changes: 47 additions & 0 deletions test/functional/cmdLineTests/xxargtest/XXArgumentTesting_j9.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,53 @@
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">
<suite id="XXArgumentTesting.xml" timeout="1000">

<test id="Ensure -XXnosuballoc32bitmem is recognized on all platforms">
<command>$EXE$ -Xcompressedrefs -XXnosuballoc32bitmem -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
<output regex="no" type="failure">Command-line option unrecognised</output>
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
</test>

<exec command="rm -f testjavacore.txt" quiet="false"/>

<test id="Generate a javacore without -XXnosuballoc32bitmem">
<command>$EXE$ -Xcompressedrefs -Xdump:java:events=vmstop,file=testjavacore.txt -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
<output regex="no" type="failure">Command-line option unrecognised</output>
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
</test>

<test id="Verify that the sub allocator memory is listed in the javacore">
<command>cat testjavacore.txt</command>
<output type="success" caseSensitive="no" regex="no">32bit allocation regions</output>
</test>

<exec command="rm -f testjavacore.txt" quiet="false"/>

<test id="Generate a javacore with -XXnosuballoc32bitmem">
<command>$EXE$ -Xcompressedrefs -XXnosuballoc32bitmem -Xdump:java:events=vmstop,file=testjavacore.txt -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
<output regex="no" type="failure">Command-line option unrecognised</output>
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
</test>

<test id="Verify that the sub allocator memory is not listed in the javacore on z/OS. All other platforms should use the sub-allocator when -XXnosuballoc32bitmem is used.">
<command>cat testjavacore.txt</command>
<output type="success" caseSensitive="no" regex="no">Javacore filename</output>
<output type="failure" caseSensitive="no" regex="no" platforms="zos_390-64_cmprssptrs.*">32bit allocation regions</output>
</test>

<test id="Verify -XX:MaxHeapSize -XX:InitialHeapSize -XX:ThreadStackSize">
<command>$EXE$ -XX:MaxHeapSize=234m -XX:InitialHeapSize=11m -verbose:sizes -version</command>
<output type="success" caseSensitive="no" regex="no">OpenJ9</output>
<output type="required" caseSensitive="no" regex="no">-Xmx234M</output>
<output type="required" caseSensitive="no" regex="no">-Xms11M</output>
</test>

<test id="Verify single/rightmost -XX:+UseCompressedOops overrides earlier -XX:-UseCompressedOops or -Xnocompressedrefs (based on mode options)">
<command>$EXE$ -XX:+UseCompressedOops -version</command>
<output type="success" caseSensitive="yes" regex="no">Compressed References</output>
Expand Down
3 changes: 2 additions & 1 deletion test/functional/cmdLineTests/xxargtest/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<variation>Mode150</variation>
</variations>
<command>$(JAVA_COMMAND) -DEXE=$(SQ)$(JAVA_COMMAND) $(CMDLINETESTER_JVM_OPTIONS)$(SQ) -jar $(CMDLINETESTER_JAR) \
-config $(Q)$(TEST_RESROOT)$(D)XXArgumentTesting.xml$(Q); \
-config $(Q)$(TEST_RESROOT)$(D)XXArgumentTesting.xml$(Q) \
-nonZeroExitWhenError; \
$(TEST_STATUS)</command>
<levels>
<level>sanity</level>
Expand Down