jtreg update, March 2012

There is a new update for jtreg 4.1, b04, available. The primary changes have been to support faster and more reliable test runs, especially for tests in the jdk/ repository.

jtreg can be downloaded from the OpenJDK jtreg page: http://openjdk.java.net/jtreg/.

Scratch directories

On platforms like Windows, if a test leaves a file open when the test is over, that can cause a problem for downstream tests, because the scratch directory cannot be emptied beforehand. This is addressed in agentvm mode by discarding any agents using that scratch directory and starting new agents using a new empty scratch directory. Successive directives use suffices _1, _2, etc. If you see such directories appearing in the work directory, that is an indication that files were left open in the preceding directory in the series.

Locking support

Some tests use shared system resources such as fixed port numbers. This causes a problem when running tests concurrently. So, you can now mark a directory such that all the tests within all such directories will be run sequentially, even if you use -concurrency:N on the command line to run the rest of the tests in parallel. This is seen as a short term solution: it is recommended that tests not use shared system resources whenever possible.

If you are running multiple instances of jtreg on the same machine at the same time, you can use a new option -lock:file to specify a file to be used for file locking; otherwise, the locking will just be within the JVM used to run jtreg.

"autovm mode"

By default, if no options to the contrary are given on the command line, tests will be run in othervm mode. Now, a test suite can be marked so that the default execution mode is "agentvm" mode.

In conjunction with this, you can now mark a directory such that all the tests within that directory will be run in "othervm" mode. Conceptually, this is equivalent to putting /othervm on every appropriate action on every test in that directory and any subdirectories. This is seen as a short term solution: it is recommended tests be adapted to use agentvm mode, or use "@run main/othervm" explicitly.

Info in test result files

The user name and jtreg version info are now stored in the properties near the beginning of the .jtr file.

Build

The makefiles used to build and test jtreg have been reorganized and simplified. jtreg is now using JT Harness version 4.4.

Other

  • jtreg provides access to GNOME_DESKTOP_SESSION_ID when set.
  • jtreg ensures that shell tests are given an absolute path for the JDK under test.
  • jtreg now honors the "first sentence rule" for the description given by @summary.
  • jtreg saves the default locale before executing a test in samevm or agentvm mode, and restores it afterwards.

Bug fixes

  • jtreg tried to execute a test even if the compilation failed in agentvm mode because of a JVM crash.
  • jtreg did not correctly handle the -compilejdk option.

Acknowledgements

Thanks to Alan, Amy, Andrey, Brad, Christine, Dima, Max, Mike, Sherman, Steve and others for their help, suggestions, bug reports and for testing this latest version.

Comments:

Post a Comment:
Comments are closed for this entry.
About

Discussions about technical life in my part of the OpenJDK world.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today