Skip to content

Commit

Permalink
Update xtraceTests.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
h3110n3rv3 committed Dec 17, 2024
1 parent f1a4e90 commit a02170c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/functional/cmdLineTests/xtraceTests/xtraceTests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@
<!-- These tests check -Xtrace is working correctly and error/warning messages are proper. -->

<test id="Test 1 - invalid argument - 'a'">
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},methodStrArgLen='a',print=mt -version</command>
<output regex="no" type="success">Trace option unrecognized: -Xtrace:methodStrArgLen</output>
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},maxstringlength='a',print=mt -version</command>
<output regex="no" type="success">Trace option unrecognized: -Xtrace:maxstringlength</output>
<output regex="no" type="required">Error processing trace option, detail: methodstrarglen takes an unsigned integer value from 1 to 128</output>
<output regex="no" type="required">Error processing trace option, detail: Invalid character(s) encountered in decimal number</output>
</test>

<test id="Test 2 - out of range invalid argument - 129">
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},methodStrArgLen=129,print=mt -version</command>
<output regex="no" type="success">Trace option unrecognized: -Xtrace:methodStrArgLen</output>
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},maxstringlength=129,print=mt -version</command>
<output regex="no" type="success">Trace option unrecognized: -Xtrace:maxstringlength</output>
<output regex="no" type="required">Error processing trace option, detail: methodstrarglen takes an unsigned integer value from 1 to 128</output>
<output regex="no" type="required">Error processing trace option: -Xtrace:methodStrArgLen=129</output>
<output regex="no" type="required">Error processing trace option: -Xtrace:maxstringlength=129</output>
</test>

<test id="Test 3 - valid argument length 1" runPath=".">
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},methodStrArgLen=1,print=mt -version</command>
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},maxstringlength=1,print=mt -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(.)*method arguments: \(\(String\)"(\w)"\.{3}\)</output>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
</test>


<test id="Test 4 - valid argument length" runPath=".">
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},methodStrArgLen=6,print=mt -version</command>
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},maxstringlength=6,print=mt -version</command>

<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(.)*method arguments: \(\(String\)"(\w{6})"\.{3}\)</output>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
</test>

<test id="Test 5 - out of range invalid argument - 0">
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},methodStrArgLen=0,print=mt -version</command>
<command>$EXE$ -Xtrace:methods={java/lang/String.concat()},maxstringlength=0,print=mt -version</command>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(.)*method arguments: \(\(String\)"([\x00-\x7F]{0,32})"\)</output>
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
</test>
Expand Down

0 comments on commit a02170c

Please sign in to comment.