You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Limit memory consumption (<code>-Xmx</code> and <code>-vmoption:-Xmx</code>, or none).</p>
154
156
<p>Limit memory consumption for JTReg test framework and VM under test. Set to 0 to disable the limits.</p>
155
157
<p>Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).</p>
158
+
<h4id="max_output">MAX_OUTPUT</h4>
159
+
<p>Set the property <code>javatest.maxOutputSize</code> for the launcher, to change the default JTReg log limit.</p>
156
160
<h4id="keywords">KEYWORDS</h4>
157
-
<p>JTReg kewords sent to JTReg using <code>-k</code>. Please be careful in making sure that spaces and special characters (like <code>!</code>) are properly quoted. To avoid some issues, the special value <code>%20</code> can be used instead of space.</p>
161
+
<p>JTReg keywords sent to JTReg using <code>-k</code>. Please be careful in making sure that spaces and special characters (like <code>!</code>) are properly quoted. To avoid some issues, the special value <code>%20</code> can be used instead of space.</p>
<p>Additional Java options to be used when compiling and running classes (sent to JTReg as <code>-vmoption</code>).</p>
172
176
<p>This option is only needed in special circumstances. To pass Java options to your test classes, use <code>JAVA_OPTIONS</code>.</p>
177
+
<h4id="launcher_options">LAUNCHER_OPTIONS</h4>
178
+
<p>Additional Java options that are sent to the java launcher that starts the JTReg harness.</p>
173
179
<h4id="aot_modules-1">AOT_MODULES</h4>
174
180
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
<p>Docker tests with default parameters may fail on systems with glibc versions not compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86). For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:</p>
206
212
<pre><code>$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker"</code></pre>
207
213
<p>To run these tests correctly, additional parameters for the correct docker image are required on Ubuntu 18.04 by using <code>JAVA_OPTIONS</code>.</p>
208
-
<pre><code>$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"</code></pre>
214
+
<pre><code>$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" \
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases. For example:</p>
218
+
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases.</p>
219
+
<p>For example:</p>
211
220
<pre><code>$ export LANG="en_US" && make test TEST=...
212
221
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...</code></pre>
213
222
<h3id="pkcs11-tests">PKCS11 Tests</h3>
214
-
<p>It is highly recommended to use the latest NSS version when running PKCS11 tests. Improper NSS version may lead to unexpected failures which are hard to diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04 with the default NSS version in the system. To run these tests correctly, the system property <code>test.nss.lib.paths</code> is required on Ubuntu 18.04 to specify the alternative NSS lib directories. For example:</p>
215
-
<pre><code>$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"</code></pre>
223
+
<p>It is highly recommended to use the latest NSS version when running PKCS11 tests. Improper NSS version may lead to unexpected failures which are hard to diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04 with the default NSS version in the system. To run these tests correctly, the system property <code>test.nss.lib.paths</code> is required on Ubuntu 18.04 to specify the alternative NSS lib directories.</p>
224
+
<p>For example:</p>
225
+
<pre><code>$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
<p>For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.</p>
217
228
<h3id="client-ui-tests">Client UI Tests</h3>
218
229
<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
264
266
JOBS, except for Hotspot, where the default is *number of CPU cores/2*,
265
267
but never more than *memory size in GB/2*.
266
268
267
269
#### TIMEOUT_FACTOR
270
+
268
271
The timeout factor (`-timeoutFactor`).
269
272
270
273
Defaults to 4.
271
274
275
+
#### FAILURE_HANDLER_TIMEOUT
276
+
277
+
Sets the argument `-timeoutHandlerTimeout` for JTReg. The default value is 0.
278
+
This is only valid if the failure handler is built.
279
+
272
280
#### TEST_MODE
281
+
273
282
The test mode (`agentvm` or `othervm`).
274
283
275
284
Defaults to `agentvm`.
276
285
277
286
#### ASSERT
287
+
278
288
Enable asserts (`-ea -esa`, or none).
279
289
280
290
Set to `true` or `false`. If true, adds `-ea -esa`. Defaults to true, except
281
291
for hotspot.
282
292
283
293
#### VERBOSE
294
+
284
295
The verbosity level (`-verbose`).
285
296
286
297
Defaults to `fail,error,summary`.
287
298
288
299
#### RETAIN
300
+
289
301
What test data to retain (`-retain`).
290
302
291
303
Defaults to `fail,error`.
292
304
293
305
#### MAX_MEM
306
+
294
307
Limit memory consumption (`-Xmx` and `-vmoption:-Xmx`, or none).
295
308
296
309
Limit memory consumption for JTReg test framework and VM under test. Set to 0
297
310
to disable the limits.
298
311
299
312
Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).
300
313
314
+
#### MAX_OUTPUT
315
+
316
+
Set the property `javatest.maxOutputSize` for the launcher, to change the
317
+
default JTReg log limit.
318
+
301
319
#### KEYWORDS
302
320
303
-
JTReg kewords sent to JTReg using `-k`. Please be careful in making sure that
321
+
JTReg keywords sent to JTReg using `-k`. Please be careful in making sure that
304
322
spaces and special characters (like `!`) are properly quoted. To avoid some
305
323
issues, the special value `%20` can be used instead of space.
306
324
@@ -323,23 +341,30 @@ Set to `true` or `false`.
323
341
If `true`, JTReg will use `-match:` option, otherwise `-exclude:` will be used.
324
342
Default is `false`.
325
343
326
-
327
344
#### OPTIONS
345
+
328
346
Additional options to the JTReg test framework.
329
347
330
348
Use `JTREG="OPTIONS=--help all"` to see all available JTReg options.
331
349
332
350
#### JAVA_OPTIONS
351
+
333
352
Additional Java options for running test classes (sent to JTReg as
334
353
`-javaoption`).
335
354
336
355
#### VM_OPTIONS
356
+
337
357
Additional Java options to be used when compiling and running classes (sent to
338
358
JTReg as `-vmoption`).
339
359
340
360
This option is only needed in special circumstances. To pass Java options to
341
361
your test classes, use `JAVA_OPTIONS`.
342
362
363
+
#### LAUNCHER_OPTIONS
364
+
365
+
Additional Java options that are sent to the java launcher that starts the
366
+
JTReg harness.
367
+
343
368
#### AOT_MODULES
344
369
345
370
Generate AOT modules before testing for the specified module, or set of
@@ -353,13 +378,15 @@ Retry failed tests up to a set number of times. Defaults to 0.
353
378
### Gtest keywords
354
379
355
380
#### REPEAT
381
+
356
382
The number of times to repeat the tests (`--gtest_repeat`).
357
383
358
384
Default is 1. Set to -1 to repeat indefinitely. This can be especially useful
359
385
combined with `OPTIONS=--gtest_break_on_failure` to reproduce an intermittent
360
386
problem.
361
387
362
388
#### OPTIONS
389
+
363
390
Additional options to the Gtest test framework.
364
391
365
392
Use `GTEST="OPTIONS=--help"` to see all available Gtest options.
@@ -373,98 +400,127 @@ modules. If multiple modules are specified, they should be separated by space
373
400
### Microbenchmark keywords
374
401
375
402
#### FORK
403
+
376
404
Override the number of benchmark forks to spawn. Same as specifying `-f <num>`.
377
405
378
406
#### ITER
407
+
379
408
Number of measurement iterations per fork. Same as specifying `-i <num>`.
380
409
381
410
#### TIME
411
+
382
412
Amount of time to spend in each measurement iteration, in seconds. Same as
383
413
specifying `-r <num>`
384
414
385
415
#### WARMUP_ITER
416
+
386
417
Number of warmup iterations to run before the measurement phase in each fork.
387
418
Same as specifying `-wi <num>`.
388
419
389
420
#### WARMUP_TIME
421
+
390
422
Amount of time to spend in each warmup iteration. Same as specifying `-w <num>`.
391
423
392
424
#### RESULTS_FORMAT
425
+
393
426
Specify to have the test run save a log of the values. Accepts the same values
394
427
as `-rff`, i.e., `text`, `csv`, `scsv`, `json`, or `latex`.
395
428
396
429
#### VM_OPTIONS
430
+
397
431
Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
398
432
399
433
#### OPTIONS
434
+
400
435
Additional arguments to send to JMH.
401
436
402
437
## Notes for Specific Tests
403
438
404
439
### Docker Tests
405
440
406
-
Docker tests with default parameters may fail on systems with glibc versions not
407
-
compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86).
408
-
For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:
441
+
Docker tests with default parameters may fail on systems with glibc versions
442
+
not compatible with the one used in the default docker image (e.g., Oracle
443
+
Linux 7.6 for x86). For example, they pass on Ubuntu 16.04 but fail on Ubuntu
444
+
18.04 if run like this on x86:
409
445
410
-
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker"
446
+
```
447
+
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker"
448
+
```
411
449
412
-
To run these tests correctly, additional parameters for the correct docker image are
413
-
required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
450
+
To run these tests correctly, additional parameters for the correct docker
451
+
image are required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
414
452
415
-
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
453
+
```
454
+
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" \
0 commit comments