update
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# Test Case: Basic Mount and Unmount
|
||||
|
||||
**Test ID**: TC001-mount-basic
|
||||
|
||||
## Objective
|
||||
|
||||
Verify that the exact G1 KLD mounts a valid image read-only, exposes source
|
||||
data exactly, and unmounts cleanly.
|
||||
|
||||
## Fixture
|
||||
|
||||
Use `images/compact.erofs` and `source/compact/root.txt` generated by
|
||||
`tests/prepare_g1_fixtures.sh`. Follow `tests/G1-MANUAL-SETUP.md` and record the
|
||||
image, source, and KLD SHA256 values.
|
||||
|
||||
## Procedure
|
||||
|
||||
```sh
|
||||
image=/tmp/repo22-g1/images/compact.erofs
|
||||
source=/tmp/repo22-g1/source/compact/root.txt
|
||||
mnt=/mnt/repo22-g1-001
|
||||
md=$(mdconfig -a -t vnode -f "$image")
|
||||
mkdir -p "$mnt"
|
||||
kldstat | grep -i erofs
|
||||
mount -t erofs -o ro "/dev/$md" "$mnt"
|
||||
mount -p | awk -v p="$mnt" '$2 == p'
|
||||
cmp "$source" "$mnt/root.txt"
|
||||
sha256 "$source" "$mnt/root.txt"
|
||||
./statfs_probe "$mnt"
|
||||
umount "$mnt"
|
||||
mdconfig -d -u "${md#md}"
|
||||
rmdir "$mnt"
|
||||
```
|
||||
|
||||
## Expected Results
|
||||
|
||||
- Mount, `cmp`, `statfs_probe`, unmount, and detach all return zero.
|
||||
- The mount entry is `erofs` and read-only; both file hashes are identical.
|
||||
- Cleanup leaves neither this mount point nor its md provider.
|
||||
Reference in New Issue
Block a user