[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-jtreg-use
Subject:    Re: How do I execute individual subtests?
From:       Thomas_Stüfe <thomas.stuefe () gmail ! com>
Date:       2021-10-20 8:04:55
Message-ID: CAA-vtUy1-v3uCwjwgL59t_tjgQ8edhryF3E8ztHCy8b3iVBscw () mail ! gmail ! com
[Download RAW message or body]

Thanks David.

Seems jtreg cannot deal with dashes in the subtest id. "debugnone" works,
"debug-none" does not.

Cheers, Thomas

On Wed, Oct 20, 2021 at 9:17 AM David Holmes <david.holmes@oracle.com>
wrote:

> Hi Thomas,
> 
> On 20/10/2021 5:11 pm, Thomas Stüfe wrote:
> > Hi,
> > 
> > I am not able to start individual jtreg subtests using the way specified
> > in the JTReg FAQ
> > (
> http://openjdk.java.net/jtreg/faq.html#how-do-i-specify-which-tests-to-run
> > <
> http://openjdk.java.net/jtreg/faq.html#how-do-i-specify-which-tests-to-run
> > ):
> > 
> > ```
> > 3.1 How do I specify which tests to run?
> > 
> > The most basic way to specify which tests to run is to give one or more
> > paths directly on the command line, for directories and files containing
> > tests. If a file contains multiple tests, you can specify the name of a
> > test within that file by appending #idN to the file path, where N is the
> > number of the test within the file, where 0 identifies the first test.
> > ```
> > 
> > But that does not seem to work:
> > 
> > jtreg  ..
> > 
> /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/Metaspace/elastic/TestMetaspaceAllocationMT2.java#id1
>  
> The subtests got renamed so you could reliably re-run them even if the
> order were changed or a new subtest introduced.
> 
> e.g
> 
> * @test id=debug-default
> 
> so you need to use these names.
> 
> Cheers,
> David
> 
> 
> > jtreg  ..
> > 
> /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/Metaspace/elastic/TestMetaspaceAllocationMT2.java#1
> 
> > 
> > all yield a "Error: Not a test or directory containing tests" error.
> > 
> > Tried specifying the subtest name (e.g. "#debug-none"), that does not
> > work either.
> > 
> > Leaving the '#..' suffix out and just running all tests works, so the
> > file is there and formatted correctly.
> > 
> > I am using jtreg 6.
> > 
> > Am I doing something wrong?
> > 
> > Thanks, Thomas
> 


[Attachment #3 (text/html)]

<div dir="ltr">Thanks David.<div><br></div><div>Seems jtreg cannot deal with dashes \
in the subtest id. &quot;debugnone&quot; works, &quot;debug-none&quot; does \
not.</div><div><br></div><div>Cheers, Thomas</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 20, 2021 at 9:17 AM \
David Holmes &lt;<a href="mailto:david.holmes@oracle.com">david.holmes@oracle.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Thomas,<br> <br>
On 20/10/2021 5:11 pm, Thomas Stüfe wrote:<br>
&gt; Hi,<br>
&gt; <br>
&gt; I am not able to start individual jtreg subtests using the way specified <br>
&gt; in the JTReg FAQ <br>
&gt; (<a href="http://openjdk.java.net/jtreg/faq.html#how-do-i-specify-which-tests-to-run" \
rel="noreferrer" target="_blank">http://openjdk.java.net/jtreg/faq.html#how-do-i-specify-which-tests-to-run</a> \
<br> &gt; &lt;<a href="http://openjdk.java.net/jtreg/faq.html#how-do-i-specify-which-tests-to-run" \
rel="noreferrer" target="_blank">http://openjdk.java.net/jtreg/faq.html#how-do-i-specify-which-tests-to-run</a>&gt;):<br>
 &gt; <br>
&gt; ```<br>
&gt; 3.1 How do I specify which tests to run?<br>
&gt; <br>
&gt; The most basic way to specify which tests to run is to give one or more <br>
&gt; paths directly on the command line, for directories and files containing <br>
&gt; tests. If a file contains multiple tests, you can specify the name of a <br>
&gt; test within that file by appending #idN to the file path, where N is the <br>
&gt; number of the test within the file, where 0 identifies the first test.<br>
&gt; ```<br>
&gt; <br>
&gt; But that does not seem to work:<br>
&gt; <br>
&gt; jtreg   .. <br>
&gt;     /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/Metaspace/elastic/TestMetaspaceAllocationMT2.java#id1<br>
 <br>
The subtests got renamed so you could reliably re-run them even if the <br>
order were changed or a new subtest introduced.<br>
<br>
e.g<br>
<br>
   * @test id=debug-default<br>
<br>
so you need to use these names.<br>
<br>
Cheers,<br>
David<br>
<br>
<br>
&gt; jtreg   .. <br>
&gt;     /shared/projects/openjdk/jdk-jdk/source/test/hotspot/jtreg/runtime/Metaspace/elastic/TestMetaspaceAllocationMT2.java#1<br>
 &gt; <br>
&gt; all yield a &quot;Error: Not a test or directory containing tests&quot; \
error.<br> &gt; <br>
&gt; Tried specifying the subtest name (e.g. &quot;#debug-none&quot;), that does not \
<br> &gt; work either.<br>
&gt; <br>
&gt; Leaving the &#39;#..&#39; suffix out and just running all tests works, so the \
<br> &gt; file is there and formatted correctly.<br>
&gt; <br>
&gt; I am using jtreg 6.<br>
&gt; <br>
&gt; Am I doing something wrong?<br>
&gt; <br>
&gt; Thanks, Thomas<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic