This appears to have been this way for a while (it's not a new bug).
jtreg using -bug BUGID options fails to select tests if two situations:
1. If there is more than one @bug tag
2. If the next line of text following a @bug tag line starts with 'bug'
The jtreg faq states how to use @bug but not any limitations, so if it is allowed, jtreg with -bug BUGID fails to find tests which have more than one @bug tag. It also fails to select tests if the next text is 'bug'.
Create test/temp/foo.java
8<- - foo.java- - - - - - - - - - - - - - - - - - - - -
/*
* @test
* @bug 7654321
*/
public class foo { public static void main(String... args) { new foo(); }}
- - - - - - - - - - - - - - - - - - - - - - ->8
[]% jtreg -jdk <myjdkpath> -bug:7654321 temp
[]% Test results: passed: 1
8<- - edit foo.java- - - - - - - - - - - - - - - - - - - - -
/*
* @test
* @bug 7654321
* bug 1234567
*/
public class foo { public static void main(String... args) { new foo(); }}
- - - - - - - - - - - - - - - - - - - - - - ->8
[]% jtreg -jdk <myjdkpath> -bug:7654321 temp
[]% Test results: no tests selected
Note I does not even need @bug but bug after firest @bug cause same reaction as @bug 1234567 as 2nd bug tag.
Some scenarios
The 1st form above passes as does this(bug is after intervening tags):
/*
* @test
* @bug 7654321
* @summary 1234567
* bug 1234567
*/
while these results in "no tests selected:
/*
* @test
* @bug 7654321
* @summary 1234567
* @bug 1234567
*/
/*
* @test
* @bug 7654321
* @bug 1234567
* @summary 1234567
*/
/*
* @test
* @bug 7654321
* bug 1234567
* @summary 1234567
*/
jtreg using -bug BUGID options fails to select tests if two situations:
1. If there is more than one @bug tag
2. If the next line of text following a @bug tag line starts with 'bug'
The jtreg faq states how to use @bug but not any limitations, so if it is allowed, jtreg with -bug BUGID fails to find tests which have more than one @bug tag. It also fails to select tests if the next text is 'bug'.
Create test/temp/foo.java
8<- - foo.java- - - - - - - - - - - - - - - - - - - - -
/*
* @test
* @bug 7654321
*/
public class foo { public static void main(String... args) { new foo(); }}
- - - - - - - - - - - - - - - - - - - - - - ->8
[]% jtreg -jdk <myjdkpath> -bug:7654321 temp
[]% Test results: passed: 1
8<- - edit foo.java- - - - - - - - - - - - - - - - - - - - -
/*
* @test
* @bug 7654321
* bug 1234567
*/
public class foo { public static void main(String... args) { new foo(); }}
- - - - - - - - - - - - - - - - - - - - - - ->8
[]% jtreg -jdk <myjdkpath> -bug:7654321 temp
[]% Test results: no tests selected
Note I does not even need @bug but bug after firest @bug cause same reaction as @bug 1234567 as 2nd bug tag.
Some scenarios
The 1st form above passes as does this(bug is after intervening tags):
/*
* @test
* @bug 7654321
* @summary 1234567
* bug 1234567
*/
while these results in "no tests selected:
/*
* @test
* @bug 7654321
* @summary 1234567
* @bug 1234567
*/
/*
* @test
* @bug 7654321
* @bug 1234567
* @summary 1234567
*/
/*
* @test
* @bug 7654321
* bug 1234567
* @summary 1234567
*/