foundry
Foundry OS: the operating system built on the Rustbelt kernel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #!/usr/bin/env bash
# After `make test-v2`: check, on the host, the disk image the run wrote to.
# * every file system is still consistent: e2fsck (A:), fsck.fat (B:),
# fsck.exfat (C:), all read-only (-n);
# * the share is a plain single-FAT exFAT volume, and the file the
# self-test left there (dash's /mnt/share/from-foundry.txt) reads back
# on the host -- through scripts/exfat.py, not the kernel's driver;
# * the files the self-test created and deleted are really gone.
# Nothing is mounted (no root needed). Usage: scripts/check-v2-image.sh IMAGE
IMAGE=
PATH=:/usr/sbin:/sbin
HERE=
WORK=;
fail=0
# Partition start/size in sectors, from the GPT.
for; do
done
&& || { ; ; }
# The kernel's FAT driver (the fatfs crate) sets the volume's "dirty" bit
# (boot sector byte 65, bit 0) on the first write and clears it only on
# unmount, which Rustbelt 0.21 never does before QEMU exits. That is a
# known kernel issue (docs/kernel-requests.md), so it is a warning here:
# clear the bit in our extracted copy, then check everything else.
if [; then
|
fi
&& || { ; ; }
&& || { ; ; }
info=
case in *"1 FAT(s)"*) ;; *) ;; esac
got=
[ && ||
listing=
|
for; do
| && ||
done
| ||
# A: and B: through e2fsprogs/mtools: the test files are gone, /etc is there.
| && ||
[ \
&& ||
MTOOLS_SKIP_CHECK=1 | && ||
[ && || { ; ; }
|