doc/testing.md
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54570 93b702d2a0cb
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
    21 
    21 
    22     $ make test-tier1
    22     $ make test-tier1
    23     $ make test-jdk_lang JTREG="JOBS=8"
    23     $ make test-jdk_lang JTREG="JOBS=8"
    24     $ make test TEST=jdk_lang
    24     $ make test TEST=jdk_lang
    25     $ make test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
    25     $ make test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1"
    26     $ make test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"
    26     $ make test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT_FACTOR=8;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"
    27     $ make test TEST="jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java"
    27     $ make test TEST="jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java"
    28     $ make test TEST="micro:java.lang.reflect" MICRO="FORK=1;WARMUP_ITER=2"
    28     $ make test TEST="micro:java.lang.reflect" MICRO="FORK=1;WARMUP_ITER=2"
    29     $ make exploded-test TEST=tier2
    29     $ make exploded-test TEST=tier2
    30 
    30 
    31 ### Configuration
    31 ### Configuration
   178 
   178 
   179 It is possible to control various aspects of the test suites using make control
   179 It is possible to control various aspects of the test suites using make control
   180 variables.
   180 variables.
   181 
   181 
   182 These variables use a keyword=value approach to allow multiple values to be
   182 These variables use a keyword=value approach to allow multiple values to be
   183 set. So, for instance, `JTREG="JOBS=1;TIMEOUT=8"` will set the JTReg
   183 set. So, for instance, `JTREG="JOBS=1;TIMEOUT_FACTOR=8"` will set the JTReg
   184 concurrency level to 1 and the timeout factor to 8. This is equivalent to
   184 concurrency level to 1 and the timeout factor to 8. This is equivalent to
   185 setting `JTREG_JOBS=1 JTREG_TIMEOUT=8`, but using the keyword format means that
   185 setting `JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8`, but using the keyword format means that
   186 the `JTREG` variable is parsed and verified for correctness, so
   186 the `JTREG` variable is parsed and verified for correctness, so
   187 `JTREG="TMIEOUT=8"` would give an error, while `JTREG_TMIEOUT=8` would just
   187 `JTREG="TMIEOUT_FACTOR=8"` would give an error, while `JTREG_TMIEOUT_FACTOR=8` would just
   188 pass unnoticed.
   188 pass unnoticed.
   189 
   189 
   190 To separate multiple keyword=value pairs, use `;` (semicolon). Since the shell
   190 To separate multiple keyword=value pairs, use `;` (semicolon). Since the shell
   191 normally eats `;`, the recommended usage is to write the assignment inside
   191 normally eats `;`, the recommended usage is to write the assignment inside
   192 qoutes, e.g. `JTREG="...;..."`. This will also make sure spaces are preserved,
   192 qoutes, e.g. `JTREG="...;..."`. This will also make sure spaces are preserved,
   193 as in `JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"`.
   193 as in `JTREG="VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug"`.
   194 
   194 
   195 (Other ways are possible, e.g. using backslash: `JTREG=JOBS=1\;TIMEOUT=8`.
   195 (Other ways are possible, e.g. using backslash: `JTREG=JOBS=1\;TIMEOUT_FACTOR=8`.
   196 Also, as a special technique, the string `%20` will be replaced with space for
   196 Also, as a special technique, the string `%20` will be replaced with space for
   197 certain options, e.g. `JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug`.
   197 certain options, e.g. `JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug`.
   198 This can be useful if you have layers of scripts and have trouble getting
   198 This can be useful if you have layers of scripts and have trouble getting
   199 proper quoting of command line arguments through.)
   199 proper quoting of command line arguments through.)
   200 
   200 
   303 If multiple file names are specified, they should be separated by space (or, to
   303 If multiple file names are specified, they should be separated by space (or, to
   304 help avoid quoting issues, the special value `%20`).
   304 help avoid quoting issues, the special value `%20`).
   305 
   305 
   306 The file names should be either absolute, or relative to the JTReg test root of
   306 The file names should be either absolute, or relative to the JTReg test root of
   307 the tests to be run.
   307 the tests to be run.
       
   308 
       
   309 #### RUN_PROBLEM_LISTS
       
   310 
       
   311 Use the problem lists to select tests instead of excluding them.
       
   312 
       
   313 Set to `true` or `false`.
       
   314 If `true`, JTReg will use `-match:` option, otherwise `-exclude:` will be used.
       
   315 Default is `false`.
   308 
   316 
   309 
   317 
   310 #### OPTIONS
   318 #### OPTIONS
   311 Additional options to the JTReg test framework.
   319 Additional options to the JTReg test framework.
   312 
   320 
   396 `JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but not all test cases.
   404 `JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but not all test cases.
   397 For example:
   405 For example:
   398 
   406 
   399     $ export LANG="en_US" && make test TEST=...
   407     $ export LANG="en_US" && make test TEST=...
   400     $ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...
   408     $ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...
       
   409 
       
   410 ### PKCS11 Tests
       
   411 
       
   412 It is highly recommended to use the latest NSS version when running PKCS11 tests.
       
   413 Improper NSS version may lead to unexpected failures which are hard to diagnose.
       
   414 For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu
       
   415 18.04 with the default NSS version in the system.
       
   416 To run these tests correctly, the system property `test.nss.lib.paths` is required
       
   417 on Ubuntu 18.04 to specify the alternative NSS lib directories.
       
   418 For example:
       
   419 
       
   420     $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"
       
   421 
       
   422 For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.
   401 
   423 
   402 ---
   424 ---
   403 # Override some definitions in the global css file that are not optimal for
   425 # Override some definitions in the global css file that are not optimal for
   404 # this document.
   426 # this document.
   405 header-includes:
   427 header-includes: