From thomas.stuefe at gmail.com Wed Oct 20 07:11:43 2021 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Wed, 20 Oct 2021 09:11:43 +0200 Subject: How do I execute individual subtests? Message-ID: 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): ``` 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 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.holmes at oracle.com Wed Oct 20 07:17:22 2021 From: david.holmes at oracle.com (David Holmes) Date: Wed, 20 Oct 2021 17:17:22 +1000 Subject: How do I execute individual subtests? In-Reply-To: References: Message-ID: 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 > ): > > ``` > 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 From thomas.stuefe at gmail.com Wed Oct 20 08:04:55 2021 From: thomas.stuefe at gmail.com (=?UTF-8?Q?Thomas_St=C3=BCfe?=) Date: Wed, 20 Oct 2021 10:04:55 +0200 Subject: How do I execute individual subtests? In-Reply-To: References: Message-ID: 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 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: