Self-verifying Java programs that exercise the VM + class library. Every test is a
standalone main that prints [PASS]/[FAIL] per check and a final
<Class> RESULT: PASS|FAIL line, and exits 0 on success / 1 on any failure.
tests/
java8/ API + language regression suite, Java 8 — 16 tests, package java8.*
java17/ API + language regression suite, Java 17 — 9 tests, package java17.*
regression/ project regression tests (the forum-0.5.x fixes + a broad smoke)
gui/ AWT/Swing programs (need a display — run on the Amiga toolkit)
conformance/ the Phase-3 bring-up / headless conformance programs
native/ native (C) helpers
Directories mirror the JDK package each test exercises, e.g.
java8/java/util/stream/StreamTest.java is class java8.java.util.stream.StreamTest
(the java8./java17. prefix keeps the test classes out of the real java.*
namespace, which you may not declare).
java8/is compiled to Java 8 bytecode (class-file major 52) and runs on the current JamVM / OpenJDK 8 runtime — this is the conformance suite for the shipping VM.java17/is compiled to Java 17 bytecode (major 61) and covers Java 9–17 language + API features (records, sealed types, switch expressions, text blocks, pattern matching,List.of,Stream.toList,Files.readString, …). It is for the OpenJDK 17 Zero port; the Java 8 VM rejects it up front withUnsupportedClassVersionError(by design — seeregression/VersionGateTest).
VmSuite— broad VM smoke (lang, collections, streams, reflection, threads, IO).CloseTest— fix #1: a SwingEXIT_ON_CLOSEframe must close + exit, not hang.KeyBindTest— fix #4:WHEN_IN_FOCUSED_WINDOWkey bindings must fire.VersionGateTest— fix #5: a major-53 class must be rejected withUnsupportedClassVersionError.BootClassPathTest— fix #6 (forum 0.5.3):sun.boot.class.pathmust bepath.separator-joined and resolvable, so there is no "Please insert volume niopatch.zip" requester andsun.reflect.misc.MethodUtil'sTrampolineis not defined by the bootstrap loader (java.beans.Expressionreflective bounce works).
Build (and self-check on the image's reference JDK):
docker run --rm -v "<proj>:/work" -w /work javaos4-build:latest \
sh /work/tools/run-regression.sh # build + run + "ALL GREEN"tools/build-regression.sh alone produces build/suite8.jar, build/suite17.jar
and the test-class lists build/suite8.tests / build/suite17.tests.
Run a single test (host or Amiga):
java -cp suite8.jar java8.java.util.stream.StreamTestOn the Amiga, deploy suite8.jar and run the java8 tests with the java launcher,
one FQN per build/suite8.tests line; a non-PASS RESULT: line marks a gap in the
VM/class library. The gui/ programs run under the native sun.awt.amiga toolkit;
regression/ and conformance/ are built into build/testsuite.zip by
tools/build-tests.sh.
- Put it under
java8/<pkg-path>/orjava17/<pkg-path>/withpackage java8.<pkg>;/package java17.<pkg>;matching the directory. - Self-verify with the
ck(name, got, expected)helper; assert known values, stay deterministic (fixed seeds,Locale.US, no wall-clock), headless, no network. - File/IO tests use a relative file named after the class and delete it; do not
use
File.createTempFileorSecureRandom(the Amiga runtime lacks the entropy native) or absolute paths.
