feat(storage): ext4-only disk via mkfs.ext4 -d; drop FAT16; feature-gated mount (ro on unknown ro_compat); ext4 read spans blocks, delete clears inode, mkdir counts dir; virtio-blk writes; test-qemu e2fsck gate

This commit is contained in:
2026-10-27 17:09:35 +01:00
parent 4030dd4315
commit 0fd568cdad
24 changed files with 390 additions and 809 deletions

View File

@@ -17,7 +17,19 @@ timeout ${QT:-120} qemu-system-riscv64 -machine virt -smp "${SMP}" -bios default
status=$?
grep -a "smptest:\|spawntest:\|Hello\|SMPTEST" "${LOG}"
if grep -aq "SMPTEST PASS" "${LOG}"; then
# What k-os wrote must be ext4 that the real tools accept.
disk_ok=1
if command -v e2fsck >/dev/null && command -v debugfs >/dev/null; then
if ! e2fsck -fn "${IMAGE}" >"${LOG}.fsck" 2>&1; then
echo "test-qemu: e2fsck rejects the disk:"; cat "${LOG}.fsck"; disk_ok=0
elif [ "$(debugfs -R 'cat /selftest.txt' "${IMAGE}" 2>/dev/null)" != "written by k-os on ext4" ]; then
echo "test-qemu: /selftest.txt is not on the disk"; disk_ok=0
else
echo "test-qemu: e2fsck clean, file on disk"
fi
rm -f "${LOG}.fsck"
fi
if [ "${disk_ok}" -eq 1 ] && grep -aq "SMPTEST PASS" "${LOG}"; then
echo "test-qemu: pass (${SMP} harts)"
rm -f "${LOG}"
exit 0