SlopOS
Development

Adding Tests

Kernel, userland, host, and verification tests

SlopOS has multiple test layers. Pick the lowest layer that exercises the behavior without unnecessary boot cost, then add QEMU coverage for integration.

Test Types

TypeMacro or commandUse
Kernel teststest!Kernel logic and QEMU integration
Userland testutest! plus a userland test binarySyscall and runtime behavior from Ring 3
Host Rust testcargo test -p ... or just test-hostPure crate logic
Go harness testjust check-tests-hostParser and renderer behavior
Miri testjust check-miriOSTD UB-sensitive code
Verus proofjust verifyCritical invariant logic

Running

just test
just test FILTER='slopos_mm::*'
just test-rerun-failed
just test-verbose FILTER='ring::*'
just test-userland-only

The harness records the previous failing names in builddir/last-fail.list.

Naming

Kernel tests are emitted as <module>::<name>. Keep names specific enough that filtering is useful. Userland tests should report subtests with stable names via the test-report syscall.

KTAP Expectations

If a test fails, the kernel must emit a top-level not ok line and a diagnostic block with captured klog. Userland tests emit subtests first and then a parent result once the test process exits.

See KTAP Test Output for the wire contract.

Count Guard

If a change intentionally removes tests, update the baseline deliberately. Otherwise just check-test-count should catch accidental drops.

On this page