This page is obsolete, with the information incorporated into the updated HotSpot Style Guide.
Background
The tests in the hotspot/test/
folder are grouped by component; compiler
, gc
, runtime
and serviceability
. Within these folders the convention used to be to add a folder with the bug number for the test and in that folder add a file called Test[bug_number].java
.
This convention makes it hard to find tests for a particular part of a component. It uses up the folder and file names for duplicate information that is already available with the @bug
keyword in JTReg.
Also, it is very hard to map a nightly failure to an actual test file since you have to remember bug numbers rather than meaningful names.
New Naming Scheme
HotSpot should be using a naming scheme that is closer to what the rest of the JDK is using. That is, to use folder and file names to give some meaning to the file structure and to use the @bug
keyword to tag tests for a particular bug.
It is up to each group to organize the file structure within the corresponding component folder. To again be inspired by the other JDK teams, who normally use the java package names to group tests, it is suggested to use a simplified version of the src/
folder structure. As an example, for GC this would mean that one folder for each GC will be added.
This means that the current test called test/gc/8000311/Test8000311.java
should instead be called test/gc/g1/TestResizePLAB.java
.
This test can still be executed based on its bug number by doing:
jtreg -bug:8000311
But with the new naming it is also possible to for example run all G1 tests when a change to G1 has been made by doing:
jtreg test/gc/g1