448 GB/2</em>.</p>
449 <h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
450 <p>The <code>TIMEOUT_FACTOR</code> is forwarded to JTReg framework
451 itself (<code>-timeoutFactor</code>). Also, some test cases that
452 programmatically wait a certain amount of time will apply this factor.
453 If we run in forced compilation mode (<code>-Xcomp</code>), the build
454 system will automatically adjust this factor to compensate for less
455 performance. Defaults to 4.</p>
456 <h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
457 <p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
458 default value is 0. This is only valid if the failure handler is
459 built.</p>
460 <h4 id="test_thread_factory">TEST_THREAD_FACTORY</h4>
461 <p>Sets the <code>-testThreadFactory</code> for JTReg. It should be the
462 fully qualified classname of a class which implements
463 <code>java.util.concurrent.ThreadFactory</code>. One such implementation
464 class, named Virtual, is currently part of the JDK build in the
465 <code>test/jtreg_test_thread_factory/</code> directory. This class gets
466 compiled during the test image build. The implementation of the Virtual
467 class creates a new virtual thread for executing each test class.</p>
468 <h4 id="jvmti_stress_agent">JVMTI_STRESS_AGENT</h4>
469 <p>Executes JTReg tests with JVM TI stress agent. The stress agent is
470 the part of test library and located in
471 <code>test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp</code>. The
472 value of this argument is set as JVM TI agent options. This mode uses
473 ProblemList-jvmti-stress-agent.txt as an additional exclude list.</p>
474 <h4 id="test_mode">TEST_MODE</h4>
475 <p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
476 <p>Defaults to <code>agentvm</code>.</p>
477 <h4 id="assert">ASSERT</h4>
478 <p>Enable asserts (<code>-ea -esa</code>, or none).</p>
479 <p>Set to <code>true</code> or <code>false</code>. If true, adds
480 <code>-ea -esa</code>. Defaults to true, except for hotspot.</p>
481 <h4 id="verbose">VERBOSE</h4>
482 <p>The verbosity level (<code>-verbose</code>).</p>
483 <p>Defaults to <code>fail,error,summary</code>.</p>
484 <h4 id="retain">RETAIN</h4>
485 <p>What test data to retain (<code>-retain</code>).</p>
486 <p>Defaults to <code>fail,error</code>.</p>
487 <h4 id="max_mem">MAX_MEM</h4>
|
448 GB/2</em>.</p>
449 <h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
450 <p>The <code>TIMEOUT_FACTOR</code> is forwarded to JTReg framework
451 itself (<code>-timeoutFactor</code>). Also, some test cases that
452 programmatically wait a certain amount of time will apply this factor.
453 If we run in forced compilation mode (<code>-Xcomp</code>), the build
454 system will automatically adjust this factor to compensate for less
455 performance. Defaults to 4.</p>
456 <h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
457 <p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
458 default value is 0. This is only valid if the failure handler is
459 built.</p>
460 <h4 id="test_thread_factory">TEST_THREAD_FACTORY</h4>
461 <p>Sets the <code>-testThreadFactory</code> for JTReg. It should be the
462 fully qualified classname of a class which implements
463 <code>java.util.concurrent.ThreadFactory</code>. One such implementation
464 class, named Virtual, is currently part of the JDK build in the
465 <code>test/jtreg_test_thread_factory/</code> directory. This class gets
466 compiled during the test image build. The implementation of the Virtual
467 class creates a new virtual thread for executing each test class.</p>
468 <h4 id="value_class_plugin">VALUE_CLASS_PLUGIN</h4>
469 <p>Enables the <code>ValueClassPlugin</code> javac plugin when compiling
470 and running JTReg tests. This is a <strong>temporary mode</strong>
471 intended for use while value classes (JEP 401) are a preview feature.
472 The long-term plan is to replace classes annotated with
473 <code>@jdk.test.lib.valueclass.AsValueClass</code> with plain
474 <code>value class</code> declarations once value classes are
475 finalized.</p>
476 <p>In the meantime, this mode allows test sources to compile and run as
477 either value classes or regular identity classes without source-level
478 changes.</p>
479 <p>When set to any non-empty value, the following options are appended to
480 every JTReg invocation:</p>
481 <ul>
482 <li><code>-cpa:<valueClassPlugin.jar></code> — appends the plugin
483 JAR to the compile-time classpath (only when the JAR is present in the
484 test image under
485 <code>jtreg_value_class_plugin/valueClassPlugin.jar</code>).</li>
486 <li><code>-vmoption:--enable-preview</code> — enables JVM preview
487 features at runtime.</li>
488 <li><code>-javacoption:-XDaccessInternalAPI</code> — grants the compiler
489 access to internal APIs required by the plugin.</li>
490 <li><code>-javacoption:--source <version> --enable-preview</code>
491 — enables preview language features at compile time.</li>
492 <li><code>-javacoption:-Xplugin:ValueClassPlugin</code> — activates the
493 plugin.</li>
494 </ul>
495 <p>The plugin scans each compilation unit after parsing and converts any
496 class annotated with
497 <code>@jdk.test.lib.valueclass.AsValueClass</code> into a value class by
498 setting the internal <code>VALUE_CLASS</code> modifier flag and clearing
499 the <code>IDENTITY_TYPE</code> flag. This transformation only takes
500 effect when <code>--enable-preview</code> is active; without it the
501 annotation is a no-op and the class compiles as an ordinary identity
502 class, so the same test source can exercise both code paths.</p>
503 <p>Example:</p>
504 <pre><code>$ make test TEST=jdk_lang JTREG="VALUE_CLASS_PLUGIN=true"
505 </code></pre>
506 <h4 id="jvmti_stress_agent">JVMTI_STRESS_AGENT</h4>
507 <p>Executes JTReg tests with JVM TI stress agent. The stress agent is
508 the part of test library and located in
509 <code>test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp</code>. The
510 value of this argument is set as JVM TI agent options. This mode uses
511 ProblemList-jvmti-stress-agent.txt as an additional exclude list.</p>
512 <h4 id="test_mode">TEST_MODE</h4>
513 <p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
514 <p>Defaults to <code>agentvm</code>.</p>
515 <h4 id="assert">ASSERT</h4>
516 <p>Enable asserts (<code>-ea -esa</code>, or none).</p>
517 <p>Set to <code>true</code> or <code>false</code>. If true, adds
518 <code>-ea -esa</code>. Defaults to true, except for hotspot.</p>
519 <h4 id="verbose">VERBOSE</h4>
520 <p>The verbosity level (<code>-verbose</code>).</p>
521 <p>Defaults to <code>fail,error,summary</code>.</p>
522 <h4 id="retain">RETAIN</h4>
523 <p>What test data to retain (<code>-retain</code>).</p>
524 <p>Defaults to <code>fail,error</code>.</p>
525 <h4 id="max_mem">MAX_MEM</h4>
|