From c847b6d757393960cbe43d6c1bcb68da44090b26 Mon Sep 17 00:00:00 2001 From: japabu Date: Sat, 3 Oct 2026 17:33:25 +0200 Subject: [PATCH] toyos-fat32-check moves to toyos-fat32/check, beside the one subject it judges Step 5 of issues/build/code-used-by-one-program-lives-in-that-program.md. The checker has two consumers, the build (`image::certify` and the metal bench's `--fat32-check`, both `src/`) and `toyos-fat32`'s tests, and one subject, the FAT32 volume. It moves as a nested member of the host workspace, the way `toyos-sched/sim` and `toyos-xhci/sim` already sit under their crate. The package keeps its name, so every `toyos_fat32_check::` use and every lockfile entry is unchanged: Cargo.lock records no path for a path dependency, and `git diff` shows it untouched. What named the old directory, and now names the new one: - the root manifest's workspace member and the build's dependency; - `toyos-fat32`'s dev-dependency, now `path = "check"`; - the three `#[path]` includes of the checker's spec-built fixture (`tests/common/mod.rs`): `toyos-fat32/tests/refused_writes.rs`, `toyos-fat32/tests/replace_rename.rs`, and `userland/fsd/src/fat.rs`, whose include sits on a `#[cfg(test)]` module and so is read by fsd's host tests alone, never by the guest build. The checker's own manifest and module headers name no path and stay true: it still depends on nothing, and `toyos-fat32` still reaches it only as a dev-dependency. `issues/build/the-host-job-runs-the-toolchain-the-runner-ships.md` quotes a 2026-09-03 clippy log naming `toyos-fat32-check/src/dir.rs`; it is a pasted run log, not a pointer into the tree, and stays verbatim. The track's step is deleted, as a track carries only what is still to be built; the remaining steps keep their numbers. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WcU2Dsw6mDYtwYfzVHPzM8 --- Cargo.toml | 4 ++-- .../build/code-used-by-one-program-lives-in-that-program.md | 5 ----- toyos-fat32/Cargo.toml | 2 +- {toyos-fat32-check => toyos-fat32/check}/Cargo.toml | 0 {toyos-fat32-check => toyos-fat32/check}/src/boot.rs | 0 {toyos-fat32-check => toyos-fat32/check}/src/dir.rs | 0 {toyos-fat32-check => toyos-fat32/check}/src/fat.rs | 0 {toyos-fat32-check => toyos-fat32/check}/src/lib.rs | 0 {toyos-fat32-check => toyos-fat32/check}/tests/common/mod.rs | 0 {toyos-fat32-check => toyos-fat32/check}/tests/teeth.rs | 0 toyos-fat32/tests/refused_writes.rs | 2 +- toyos-fat32/tests/replace_rename.rs | 2 +- userland/fsd/src/fat.rs | 2 +- 13 files changed, 6 insertions(+), 11 deletions(-) rename {toyos-fat32-check => toyos-fat32/check}/Cargo.toml (100%) rename {toyos-fat32-check => toyos-fat32/check}/src/boot.rs (100%) rename {toyos-fat32-check => toyos-fat32/check}/src/dir.rs (100%) rename {toyos-fat32-check => toyos-fat32/check}/src/fat.rs (100%) rename {toyos-fat32-check => toyos-fat32/check}/src/lib.rs (100%) rename {toyos-fat32-check => toyos-fat32/check}/tests/common/mod.rs (100%) rename {toyos-fat32-check => toyos-fat32/check}/tests/teeth.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 0b1b3ce1363..53fd3a43517 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ members = [ "toyos-elf", "toyos-elide", "toyos-fat32", - "toyos-fat32-check", + "toyos-fat32/check", "toyos-gicv3", "toyos-gpt", "toyos-hda", @@ -132,7 +132,7 @@ toyos-fat32 = { path = "toyos-fat32" } # The two readers `image::certify` judges every published image with. They are # dependencies of the build rather than of its tests because a flash target is # not published until they have both passed on it. -toyos-fat32-check = { path = "toyos-fat32-check" } +toyos-fat32-check = { path = "toyos-fat32/check" } toyos-gpt = { path = "toyos-gpt" } toyos-keymap = { path = "toyos-keymap" } # The form a program's line takes in a boot's log and the port `logd` serves it diff --git a/issues/build/code-used-by-one-program-lives-in-that-program.md b/issues/build/code-used-by-one-program-lives-in-that-program.md index 1a3d63d3f8a..f46c0a71979 100644 --- a/issues/build/code-used-by-one-program-lives-in-that-program.md +++ b/issues/build/code-used-by-one-program-lives-in-that-program.md @@ -59,11 +59,6 @@ and #631, of which #631 has landed, before the latency work tests, which it lists as escapes today. Check: `--ci host` runs every test each package lists today, and `--clippy` lints them. -5. **`toyos-fat32-check` goes under `toyos-fat32/`.** The build and - `toyos-fat32`'s tests both use it, and it moves to `toyos-fat32/check/`, - beside the one subject it judges. - Check: `--ci host` runs every test the package lists today, and `--clippy` - lints them. **Exit:** no directory this file names as moved or merged still exists, and step 4's count finds no crate outside its one consumer. diff --git a/toyos-fat32/Cargo.toml b/toyos-fat32/Cargo.toml index 13025ddd7ae..362ba47aae0 100644 --- a/toyos-fat32/Cargo.toml +++ b/toyos-fat32/Cargo.toml @@ -28,7 +28,7 @@ toyos-wallclock = { path = "../toyos-wallclock" } # The volume checker this crate's tests are judged by. A dev-dependency and # never a dependency: it is the outside judge of what this crate writes, and it # must not be reachable from the driver it judges. -toyos-fat32-check = { path = "../toyos-fat32-check" } +toyos-fat32-check = { path = "check" } # Test scratch that is gone on every way out; `--ci host` reds on any left behind. toyos-tmpdir = { path = "../toyos-tmpdir" } # The reader this crate's output is read back by: a third party's FAT diff --git a/toyos-fat32-check/Cargo.toml b/toyos-fat32/check/Cargo.toml similarity index 100% rename from toyos-fat32-check/Cargo.toml rename to toyos-fat32/check/Cargo.toml diff --git a/toyos-fat32-check/src/boot.rs b/toyos-fat32/check/src/boot.rs similarity index 100% rename from toyos-fat32-check/src/boot.rs rename to toyos-fat32/check/src/boot.rs diff --git a/toyos-fat32-check/src/dir.rs b/toyos-fat32/check/src/dir.rs similarity index 100% rename from toyos-fat32-check/src/dir.rs rename to toyos-fat32/check/src/dir.rs diff --git a/toyos-fat32-check/src/fat.rs b/toyos-fat32/check/src/fat.rs similarity index 100% rename from toyos-fat32-check/src/fat.rs rename to toyos-fat32/check/src/fat.rs diff --git a/toyos-fat32-check/src/lib.rs b/toyos-fat32/check/src/lib.rs similarity index 100% rename from toyos-fat32-check/src/lib.rs rename to toyos-fat32/check/src/lib.rs diff --git a/toyos-fat32-check/tests/common/mod.rs b/toyos-fat32/check/tests/common/mod.rs similarity index 100% rename from toyos-fat32-check/tests/common/mod.rs rename to toyos-fat32/check/tests/common/mod.rs diff --git a/toyos-fat32-check/tests/teeth.rs b/toyos-fat32/check/tests/teeth.rs similarity index 100% rename from toyos-fat32-check/tests/teeth.rs rename to toyos-fat32/check/tests/teeth.rs diff --git a/toyos-fat32/tests/refused_writes.rs b/toyos-fat32/tests/refused_writes.rs index 4e097be8797..c18a2d7a608 100644 --- a/toyos-fat32/tests/refused_writes.rs +++ b/toyos-fat32/tests/refused_writes.rs @@ -19,7 +19,7 @@ mod common; -#[path = "../../toyos-fat32-check/tests/common/mod.rs"] +#[path = "../check/tests/common/mod.rs"] mod spec_volume; use spec_volume::{fat_offset, Volume, BYTES_PER_SECTOR, CLUSTERS, FAT_SECTORS, NUM_FATS}; diff --git a/toyos-fat32/tests/replace_rename.rs b/toyos-fat32/tests/replace_rename.rs index 70ce4ae363f..615f68f1df5 100644 --- a/toyos-fat32/tests/replace_rename.rs +++ b/toyos-fat32/tests/replace_rename.rs @@ -1,7 +1,7 @@ //! Replacing rename's device-error window, exercised against the real writer //! and judged by the independent FAT checker. -#[path = "../../toyos-fat32-check/tests/common/mod.rs"] +#[path = "../check/tests/common/mod.rs"] mod spec_volume; use spec_volume::{cluster_offset, Volume, DIR_FST_CLUS_HI, DIR_FST_CLUS_LO, ROOT_CLUSTER}; diff --git a/userland/fsd/src/fat.rs b/userland/fsd/src/fat.rs index 5eb5bbbf496..f3b6a3652b3 100644 --- a/userland/fsd/src/fat.rs +++ b/userland/fsd/src/fat.rs @@ -429,7 +429,7 @@ impl Volume for FatVolume { /// A FAT32 volume built from fatgen103 by the checker's tests, and not by the /// driver under test. #[cfg(test)] -#[path = "../../../toyos-fat32-check/tests/common/mod.rs"] +#[path = "../../../toyos-fat32/check/tests/common/mod.rs"] mod spec_volume; #[cfg(test)]