The source code is not public yet. This page is the testing guide for people and agents who have it; the public repository holds only these pages.
Linux x86-64 with go, zig (0.16 used), cc, python3 (3.11 used),
node (24 used; the Chrome tests need a global WebSocket), git,
e2fsprogs, squashfs-tools, and google-chrome for browser tests.
Not in the repository:
tools/toolchain.sh /path/to/machin (a clone of
github.com/javimosch/machin).git clone https://github.com/riscv-software-src/riscv-tests vendor/riscv-tests
git -C vendor/riscv-tests checkout 1b3f8bd665d79e5985753a558dae4e3718e2edc8build/linux/: Image, initramfs.cpio,
busybox.stripped, dropbearmulti, LICENSE.dropbear. Build them as in
linux/README.md with linux/build-kernel.sh, build-busybox.sh and
build-dropbear.sh. These builds take minutes. Verify checksums after copying files
between machines.for t in go zig cc python3 node git mke2fs e2fsck debugfs dumpe2fs mksquashfs google-chrome; do
command -v $t >/dev/null || echo "MISSING tool: $t"; done
for f in vendor/toolchain/machin vendor/riscv-tests/env/p/link.ld build/linux/Image \
build/linux/initramfs.cpio build/linux/busybox.stripped build/linux/dropbearmulti build/linux/LICENSE.dropbear; do
[ -e $f ] || echo "MISSING file: $f"; done
SKIPPED is not a pass. Without build/linux/, several tests print
SKIPPED and exit 0, and quick.sh can still say it passed. A result counts only
if the exit status is 0, the success line below is present, and the output has no
SKIPPED. quick.sh keeps each test's output in build/quick/*.out: search those too.
The two node tests/linux-*.mjs tests do not skip; without the binaries they fail.
./build.sh wasm # native and wasm
./build.sh web # the same, plus the site in build/web/
Build output matters: if a build fails, later tests run the previous binaries.
timeout 30 tests/quick.sh
grep -l SKIPPED build/quick/*.out # must print nothing
Success: quick checks passed: N runs on sosie sosie-ref wasm-mfl wasm-c.
Run one command at a time under a limit, as timeout --kill-after=2 28 COMMAND. Each
fit that on the development machine (about 1 to 25 s); a slower one may need longer, and a
time-out is “no result”, not a pass or a failure. Run browser and two-machine tests alone.
| Command | Success line contains | Covers |
|---|---|---|
tests/machine/blk.py | disk tests passed | both disk slots, hostile requests |
tests/machine/net.py | network card tests passed | network card with an echoing host |
| Command | Success line contains | Covers |
|---|---|---|
node tests/disk-cache.mjs | disk cache tests passed | cache against a model |
node tests/disk-pin.mjs | disk pin tests passed | kept copies and updates |
node tests/disk-save.mjs | save-now tests passed | Save now, made-up guest and clock |
| Command | Success line contains | Covers |
|---|---|---|
tests/linux/disk.py | linux disk tests passed: rw failing crash | ext4: reboot, failing disk, kill |
tests/linux/disk.py --wasm | linux disk tests passed: rw failing | same through the browser cache |
tests/linux/layers.py | layer tests passed: keep broken | all of / kept; safe mode; broken disks |
tests/linux/layers.py keep --wasm | layer tests passed: keep (wasm) | |
tests/linux/net.py | two machines passed | ping, 256 KiB over TCP, real-time waits |
python3 -u tests/linux/ssh.py login | ssh between two machines passed: login | locked as shipped, refusals, login |
python3 -u tests/linux/ssh.py session | ssh between two machines passed: session | interactive shell, scp |
| Command | Success line contains | Covers |
|---|---|---|
python3 tests/browser.py chrome --page=linux-selftest.html | chrome linux-selftest.html: ok | boot, workload, Ctrl-C |
python3 tests/browser.py chrome "--page=disk-selftest.html?kills=2" | 0 failures | IndexedDB, kills, failed saves |
node tests/linux-page.mjs kill | ui test passed | browser killed during writes |
node tests/linux-page.mjs reload | ui test passed | page reloaded during writes |
node tests/linux-page.mjs savenow | ui test passed | Save now, with a control |
node tests/linux-page.mjs layers | ui test passed | safe mode, damaged chunk |
node tests/linux-page.mjs update | ui test passed | a real site update |
node tests/linux-tabs.mjs | tabs test passed | two tabs: ping, file, SSH |
Outputs worth knowing: linux-page.mjs prints “0 times” for the parts you did not ask for.
tests/linux/ssh.py takes login or session, one per run.
tests/run.sh is the full suite and takes many minutes. tests/browser.py without
--page runs several pages, in Chrome and Firefox: always name both a browser and a page.
A killed test can leave processes behind. Stop only this checkout's (the brackets stop the pattern matching the shell that runs it):
pkill -f "[u]ser-data-dir=$PWD/build/profile-"
pkill -f "[w]asm/run.mjs build/sosie-mfl.wasm"
The second also stops such emulators started from other checkouts. If a
linux-page.mjs run was interrupted while it had replaced site files, run
./build.sh web again before testing further.
./build.sh web
python3 -m http.server -d build/web --bind 127.0.0.1 8000
Open http://127.0.0.1:8000/linux.html. Use 127.0.0.1, localhost or HTTPS: Web
Locks and hashing are not available to a page served over plain HTTP from another address.
| Do | Expect |
|---|---|
| Boot with Keep changes | “Changes to / are kept on your saved disk” |
echo hi > /etc/mine, press Save now, wait for “saved”, reload, Boot, cat /etc/mine | hi |
| Open the same page in a second tab and Boot | Refused: the saved disk is in use |
Open ?safe=1, Boot, cat /etc/mine | No such file; “Changes are NOT being saved” |
Power off, Delete saved disk, Boot, cat /etc/mine | No such file |
| The two-tab SSH steps on Network and SSH | A shell on sosie2 |