9 Commits
Author SHA1 Message Date
velzieandClaude Opus 5.5 a6e7c17f9e Restructure: hosts/, page/, ports/, site/, toolchain/, wine/, scripts/
The tree by what each part is, behind the top-level Makefile:
- shims/ -> hosts/ (the browser, kernel, native and Wayland hosts)
- web/ -> page/ (the page's source, build and serve), ports/mesa,
  ports/xwayland and ports/tint (the ports the page loads), site/ (static
  sites and the eject page)
- tools/gexcc -> toolchain/gexcc, with the sysroot and busybox builds from
  tools/wine-wasm in toolchain/sysroot and toolchain/busybox, and one
  toolchain/pins (musl, the LP64 musl, LLVM, busybox)
- tools/wine-wasm -> wine/: dist.sh (was wine64-dist.sh), wine.pins (64-bit
  Wine, and the 32-bit tree its wineserver builds from), libs.pins (the Unix
  libraries), the 32-bit-only pieces in wine/legacy32 (its own pins and
  legacy.mk, which wine/Makefile includes)
- tools/*.py and tools/*.sh -> scripts/ (the GL generators in scripts/gl)
- wine32/src.sh is scripts/fetch-pinned.sh, which takes the trees the old
  script marked as its own

References follow the moves: paths from the tree's root by the map, paths
from a script's own directory by where their target went.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_e0aa53aa95eb4b86910519b4d14812a5
2026-11-04 17:30:24 -05:00
velzieandClaude Opus 5.5 ba37891a3e test: wine exit-stat rows wait for the program's own exit line before shutdown
xcache's "save DLL blocks" swung between 0 and 4300 for three reasons:
- t.logs answered before the child's last stdout/stderr lines reached the
  runner; it now writes a marker to both streams and the runner answers
  once both markers have arrived;
- run() resolves when the kernel publishes the exit, but the xcache save
  and the process's exit line come after that, so shutdown cut them off;
  exitLineOf waits for the process's own exit line (a check that fails
  after 60 s);
- exitStats' pid regex kept a trailing colon, so a process line looked
  like a thread line.

xcache, xcache2, dllcycle, dllswap and vmdata wait for the exit line.
The existing "blocks > 1000" save check is the row that fails at 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-31 21:27:44 -04:00
velzieandClaude Opus 5.5 3ffcb00efc test: wine/vmdata, a Wine run's renderer VmData, and meta.alone
legs/v's check over the runtime API with 64-bit Wine: the renderer's VmData
is sampled every 500 ms while rpccom.exe runs, which brings up most of
Wine's processes, and must stay at or under 8 GiB, Chrome's RLIMIT_DATA on
small machines. The check is known to fail for now. Each 64-bit Wine
process's memory grows to about 2.1 GiB, so the run's eight processes
peak at 17.04 GiB. Browser only, since Node's VmData counts its own wasm
reservations (42 GiB).

t.procStatus gives /proc's VmData, VmRSS and VmHWM, for the process on
Node or for the one renderer over 256 MiB in the browser. meta.alone runs
a test after every other job, one at a time, so that renderer is the
test's own (dllcycle and vmdata).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-30 14:14:26 -04:00
velzieandClaude Opus 5.5 08d0c240a7 test: the DLL cases' bounds, from the runtime's exit lines and peak RSS
Under log=debug each process's exit line gives its dispatch slots left and
its blocks by object (wine.mjs exitStats, blocksIn).
- xcache and xcache2: the restored run translates under 5% of the first
  run's blocks in the DLLs. In xcache, the moved run translates at least
  half of them again.
- dllcycle and dllswap: further loads spend under 4096 dispatch slots each.
- dllcycle: each further load also adds under 18 MiB to the peak RSS.
t.peakRss gives the phase's process's maxRSS on Node. In the browser it
gives the VmHWM of the one renderer that holds over 256 MiB, or null when
several do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-30 14:14:26 -04:00
velzieandClaude Opus 5.5 f4ff0e2c79 test: t.logs, the runtime's log lines on both hosts; a minute for Chromium to start
On the browser host, the page's and its Workers' console. On the node
host, the test process's output, which the runner keeps: its Workers
write there directly. Chromium that does not come up is stopped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-30 14:14:26 -04:00
velzieandClaude Opus 5.5 a0b737903b test: 64-bit Wine through the runtime's classes, in the page and under Node
The wine64 image lays Wine's install at /wine64 and a page prefix at
/pfx, its big files lazy from the work directory; win-progs builds the
Windows test programs. wine/hello runs a console program and checks its
arguments, output and exit code. A lazy entry can carry a mode (the
loader and server are lazy and must stay executable), a lazy list at a
file URL is read under Node, and tar times are whole seconds (Wine
compares wine.inf's with the prefix's record to the second).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-30 14:14:26 -04:00
velzieandClaude Opus 5.5 49d707c564 test: --gpu, --timed and --prebuilt; the GL probes on both arches
--gpu runs Chromium on the machine's GPU; on one the GL probes may leave
none out. --timed takes only the tests marked timed, and only under
bench.sh. --prebuilt uses a work directory's images as they are, for a
bench host the images were synced to. The probe image is built for
aarch64 musl as well as x86-64 glibc.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-30 14:14:26 -04:00
velzieandClaude Opus 5.5 5c0199ea9f test: the page runtime's guest-program tests, first batch
test/lib/guest.mjs runs a guest on the page's shim directly through
run-node.mjs, below the runtime API, on the node host. It builds programs
from fixtures/programs (zig musl, gcc or zig glibc), caching each by its
content in the work directory. It also makes seeds with gexc, finds the
loader and libc a glibc program needs (the host's, or A64_ROOTFS's), runs the
single-thread build, and lists the page's legs per arch. A missing piece is
a skip.

The new page group holds output-order, exec-relative, pipe-eagain,
mkdir-parent, thread-signal, mtime, panic, poll-timeout, reuse, dethread and
spawn. Each script's checks are kept, on both arches with the single-thread
leg where the script had one. A test's meta can now name its arches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-30 14:14:26 -04:00
velzieandClaude Opus 5.5 59c2c07ac2 test: one runner for gex's tests, on a browser and a Node host
test/run.mjs runs test/GROUP/NAME.test.js modules, with no HTML. A browser
test runs in a page of its own, in a fresh context of one headless Chromium
under vite; a node test runs in a forked Node process. Each test runs on the
hosts its `meta` allows and for each --arch. It prints one JSON line per test,
host and arch (schema in test/README.md) and exits 0 only when all are ok.
Images are made once into the work directory (fixtures/images.mjs) and kept
while their inputs are unchanged; a test whose image is missing is skipped,
which fails the run unless --allow-skip is given.

The runtime's pages move in as the core, windows, gl and image groups.
Their .html pages, lib.js and the old run.mjs go. The pointer-lock page's
scene-compositor variant is a test of its own. A missing WebGPU adapter or
Mesa is now a skip, not an ok. basic, init, mount and gamepad also run on
node. persist waits 30 s, not 10, for its first save under a loaded machine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_c8c04c00da9a4525ab21b0b9f146c598
2026-10-30 14:14:26 -04:00