| Warning |
|---|
DeprecatedThis page is deprecated and it's content is either old or being moved to the OpenJDK Developers' Guide. Please update your links. |
Running tests and pushing changes
| Expand |
|---|
| title | How to use the submit forest |
|---|
|
Read about the Submit repo here. |
| Expand |
|---|
| title | How to push a change |
|---|
|
| Include Page |
|---|
| Pushing a HotSpot change |
|---|
| Pushing a HotSpot change |
|---|
|
|
Test analysis and bug handling
| Expand |
|---|
| title | How to identify and handle critical failures |
|---|
|
| Include Page |
|---|
| Identifying and handling a critical failure |
|---|
| Identifying and handling a critical failure |
|---|
|
|
| Expand |
|---|
| title | How to know when the nightly starts |
|---|
|
| Include Page |
|---|
Hotspot nightly testing timezone map | Hotspot nightly testing timezone map | | Expand |
|---|
| title | How to open a new bug for a nightly | | Include Page |
|---|
Filing bugs for HotSpot failures | Filing bugs for HotSpot failures |
|---|
| Expand |
|---|
| title | How to determine which team who owns which code |
|---|
|
(C) Compiler - hotspot/
- cpu (C+R) - will have to be decided on a case by case basis
- os (R)
- os_cpu (C)
- share/
- adlc (C)
- aot (C)
- asm (R)
- c1 (C)
- ci (C)
- classfile (R)
- code (C)
- compiler (C)
- gc (G)
- interpreter (R)
- jvmci (C)
- libadt (C)
- logging (R)
- memory (R+G)
- oops (R)
- opto (C)
- precompiled (R)
- prims (R)
- runtime (R)
- services (R)
- trace (R)
- utilities (R)
|
| Expand |
|---|
| title | How to know which subcomponent that belongs to which team |
|---|
|
| Include Page |
|---|
| Hotspot JBS components |
|---|
| Hotspot JBS components |
|---|
|
|
| Expand |
|---|
| title | How to work with labels in JBS |
|---|
|
The integration_blocker label should be used to indicate that a bug is present in a repository but not present upstreams. When filing a new bug found in hotspot testing, the default should be to add the integration_blocker label. If it is verified (when filing or later) that the new failure is already present upstreams from the repository where it was found the label should be removed and an explicit comment must be added to the bug explaining why the bug is not an integration blocker. A failure seen in a project repo is considered escaped when found in jdk/hs. A failure seen in jdk/hs is considered escaped if seen in jdk/jdk or if older failures are found from a date before the last integration to jdk/jdk. | Note |
|---|
If an integration blocker escapes from a project repository it will become an integration blocker in jdk/hs. |
The testbug label should be used for bugs in tests and test infrastructure. There is no fundamental difference between a test bug and a product bug in the eyes of the gatekeeper. Both are considered integration blockers and both should be handled asap when appearing in the testing. |
| Expand |
|---|
| title | How to backout a change |
|---|
|
When a change is identified that causes a regression and the best way to handle it is to back out the change, anyone can do so. It will still go through the standard code review process, but is considered a trivial change and thus it requires only one Reviewer and will avoid the 24h code review window. The idea here is to save time by not having a broken change hindering others. There is also the rationale that the change itself is automatically created by hg, and reviewed by the person who is performing the backout, so only one additional reviewer is required. There are two parts to this task, how to do the bookkeeping in JBS, and how to do the actual backout in mercurial. How to work with JBS when a change is backed out- Close the original JBS issue and mark it with "Fix Failed", which is an alternative on the "Verify" action.
- If the intention is to fix the change and submit it again, create a redo-issue to track that the work still needs to be done. Clone the original JBS issue and use prefix [REDO] on the summary.
- Make sure relevant information is brought to the clone.
- Create a backout-issue:
- Alternative 1 - a regression is identified directly. Create a Sub-Task to the redo-issue with the same summary, but prefix with [BACKOUT].
- Alternative 2 - an investigation issue is created, and during the investigation backing out the change is identified as the best solution.
- Use the investigation issue for the backout.
- Change summary to the same as the issue to back out and prefix with [BACKOUT].
- Link the redo-issue and the backout-issue.
- Alternative 3 - no redo issue was created. Create a backout-issue with the same summary, but prefix with [BACKOUT].
- Link the backout-issue and the original issue.
| Note |
|---|
- Remember that comments are not brought over.
- Quarantine and exclude labels will continue to point to the original bug (unless updated at back out). This is accepted since there is a clone link to follow.
|
How to work with mercurial when a change is backed outIn order to backout a change, the hg backout command is recommended, which essentially applies the anti delta of the change. Make sure you perform the backout in the most upstream repostiory the change has escaped to. | No Format |
|---|
hg backout [OPTION]... [-r] REV
reverse effect of earlier changeset
Prepare a new changeset with the effect of REV undone in the current
working directory.
If REV is the parent of the working directory, then this new changeset is
committed automatically. Otherwise, hg needs to merge the changes and the
merged result is left uncommitted. |
|
| Expand |
|---|
| title | How to quarantine or exclude a test |
|---|
|
To remove noise from our testing, tests that are expected to fail are quarantined or excluded. A quarantined test is removed from standard runs, but run in a separate job. Excluded tests are not run. Test quarantines are done in the file ProblemList.txt while exclusions shall be done in the source code using @ignore. This enables adhoc runs on local machines, it makes it possible to go back in time and get expected results, and (for good and bad) by being part of the standard code review process the visibility increases. For each quarantine and exclude, there should of course be a corresponding bug, which is referenced in the quarantine. Quarantine jtreg testsUse ProblemList.txt and exclude the test in the known issues ignore list. Example where MyTest.java is excluded on windows, tracked by bug JDK-4711: |
sun.tools.jcmd.MyTest.java 4711 windows-all
|
Exclude jtreg tests
Use @Ignore with a bug reference in the test case, to prevent the test from being run.
Example where MyTest.java is excluded, tracked by bug JDK-4711:
/**
* @test
* @ignore 4711
*
|
| Info |
|---|
@ignore should always be placed directly before the first @run line in the test.
|
| Tip |
|---|
| title | Dealing with JBS bugs for test exclusion |
|---|
|
With the quarantine/exclude mechanism in the source code, a check- in
into the repository is needed, which means a unique JBS issue and a code review is needed. This is a good thing since it makes the test problems visible.- Code review: Since it is a trivial change, it only needs a review from one official Reviewer and don't need to wait 24 hour before commit.
- JBS issue: A JBS issue is created for the bug. Create a subtask for the test exclusion checkin.
| Note |
Removing tests should not be the
standard thing to do. A failing test is expected to be a regression, and should be handled promptly with high priority. Preferably it is fixed, possibly it is backed out.| Tip |
|---|
| title | Triage quarantined issues |
|---|
|
After a failure is handled by a test quarantine, the JBS issue for the remaining product/test bug should be re-triaged and possibly given a new priority. This should be handled by the standard triage process. When the triage team does re-triage the issue, it should not only consider the impact of the bug itself, but also the outage on the testing
the quarantine of the test results in.| Info |
|---|
| icon | false |
|---|
| title | Who looks at quarantine batches? |
|---|
|
The gatekeeper does not review the quarantine batches as part of daily work, the point is to reduce the load for the gatekeeper. It is the responsibility of the team who owns the bugs to keep an eye at this in general. It is for a team to be aware of the risk of quarantining tests and fix it accordingly. The batches are still run to verify the state of the quarantine batches and supply statistics on the results. It is a good idea to make sure the state of the batches don't get worse.
| Expand |
|---|
| title | How to get an exception from the no failure policy |
|---|
|
Any rule, any process has exceptions. And in some cases it is better to live with a potential failure and integrate anyway. It should of course be used in rare cases only, for example when it is more important to continue to run the test, and thus at the same time accept the failure. A typical example is an intermittent failure like an intermittent crash (say once a month) in a large system test, or if more info is needed, possibly diagnostics are added to the test, and the risk of not running it is high. | Note |
|---|
| An exception like this requires that someone is actively working on the issue. |
Label the bug with hs-nightly-quarantine-exception. |
| Expand |
|---|
| title | How to know if a bug has escaped |
|---|
|
There are a few ways to figure out if a problem has already escaped a repository: - The easiest way is of course if you know which change that caused the problem. Just have a look at the hg log of the upstream repository to see if the change is in there.
- Searching JBS can give information as well. See if there is more than one bug filed for the issue. If it escaped it is likely that someone else has found it and maybe filed a new bug.
|
...
| Expand |
|---|
| title | How to know when a change will be integrated |
|---|
|
| Include Page |
|---|
| Integration and Integration Blockers |
|---|
| Integration and Integration Blockers |
|---|
|
|
| Expand |
|---|
| title | How to integrate changes between jdk/hs and jdk/jdk |
|---|
| | Include Page |
|---|
Integration from jdk/jdk to jdk/hs | Integration from jdk/jdk to jdk/hs |
| Expand |
|---|
| title | How to fix an incorrect backport creation |
|---|
|
If a main bug is targeted to a release and the fix is pushed to a different release, then a backport bug is automatically created. Usually this is a "good thing", e.g., when you are really backporting a fix to an earlier release, but not always... If the main bug is targeted to a later release (due to schedule planning), but someone finds the time to fix that bug in the current release, then the bug should be retargeted to the current release before pushing the fix. However, sometimes we forget to do that. Here is how to fix that: | Info |
|---|
In this example a fix was pushed to JDK 10 (a.k.a. the current release) while the JBS bug was targeted to JDK 11 (a.k.a. a future release). |
- Reopen the backport bug that was created automatically
- Clean up the main bug
Copy the open push notification comment from the backport bug to the main bug, e.g.: Add a comment like the following to the main bug: | Panel |
|---|
| Fix was pushed while main bug was targeted to '11'. Reset the main bug to fixed in '10' and copied the hgupdater entry here. |
- Reset the main bug 'Fix Version/s' from '11' to '10'.
- Resolve the main bug as "Fixed" in build "team" or in build "master" depending on where the fix was pushed. Pushes to 'jdk/jdk' are fixed in build "master" and pushes to other repos are fixed in build "team".
|
| Expand |
|---|
| title | How to see what changes has been integrated to jdk/jdk |
|---|
|
There are several ways to find out if a change has been integrated to jdk/jdk or not. The easiest way is probably to look at the mercurial log in jdk/jdk and see if your change is there: | Code Block |
|---|
| hg log | grep 1234567 |
Or, if you don't have a recent clone of jdk/jdk available, look at http://hg.openjdk.java.net/jdk/jdk/ |
| Expand |
|---|
| title | How to know if a change was included in a promoted build |
|---|
|
| Include Page |
|---|
| Reading the mercurial graph | Reading the mercurial graph