--- name: schunix-verify-by-driving-shell description: "Boots to a prompt" is not a passing test for Schunix — drive real commands over the serial console metadata: type: feedback --- Reaching `init: ready (pid 1)` and a `#` prompt proves almost nothing about Schunix. A filesystem change shipped looking "verified" that way and the user found the breakage by typing one command. **Why:** nothing in the boot path opens a file from `/bin` or reads a non-root inode. An image with corrupt inodes boots to a perfectly healthy prompt and dies on the first `ls`. **How to apply:** after any change to `tools/mkfs.c`, the on-disk format, or `kernel/fs/*`, drive actual commands and read the output. QEMU's serial line is an input console, but it has no flow control — a burst of piped input loses about half its characters, and input sent before the shell is up is discarded entirely. Both problems go away with: wait ~20s for boot, then send one character every ~0.12s. ```sh send() { s="$1"; i=0 while [ $i -lt ${#s} ]; do printf '%s' "$(expr substr "$s" $((i+1)) 1)"; sleep 0.12; i=$((i+1)); done printf '\n'; sleep 7; } sleep 20; send "ls"; send "ls /bin"; send "cat /etc/motd" ``` Pipe that into `qemu ... -serial stdio -display none` and read the log. `ls`, `ls /bin` and `cat` on a real file are the minimum bar. See [[schfs-v2-and-ramdisk]], [[schunix-build-environment]].