rust-kernel
Rustbelt: a hobby x86_64 kernel written in Rust
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 59 60 61 62 63 64 65 66 67 68 69 70 | #!/usr/bin/env bash
# Check Rustbelt's ext2 writes with the host's own tools (e2fsprogs).
#
# 1. e2fsck the pristine images build.rs made (sanity check of the build).
# 2. Copy them to target/fsck/ and boot Rustbelt on the *writable* copies
# (no snapshot=on), so whatever it writes really lands in the files:
# - the shell self-test (cp B: -> C:, mkdir, echo > file)
# - the tests/ext2.rs kernel (create/write/truncate/unlink/rmdir on
# all three images: 1 KiB blocks, 4 KiB blocks, revision 0)
# 3. `e2fsck -fn` every copy: -f = check even if marked clean, -n = open
# read-only and answer "no" to every question (report, don't fix).
# Any complaint means the driver wrote something inconsistent.
# 4. Show the root directory with debugfs, to see the new files.
#
# Usage: ./scripts/ext2-check.sh (after `cargo build` and
# `cargo test --test ext2`, which build the images and the kernels)
for; do
|| { ; ; }
done
status=0
for; do
done
for; do ; done
EXT2_IMG=target/fsck/selftest.img &&
KERNEL=
[ || { ; ; }
code=
|
[ || { ; ; }
for; do
done
[ && ||
|