Skip to content

chore(os): shared loop-partition wait, drop the dead --vm flag - #919

Merged
VijitSingh97 merged 3 commits into
develop-v2from
chore/simplify-os-harness
Aug 13, 2026
Merged

chore(os): shared loop-partition wait, drop the dead --vm flag#919
VijitSingh97 merged 3 commits into
develop-v2from
chore/simplify-os-harness

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

Two confirmed findings from the simplification audit, applied:

  • The identical losetup-P partition-node wait was duplicated verbatim between mkimage.sh and verify-image.sh (and had already drifted in wording). Now one 8-line wait_loop_partitions in os/rauc/loop-wait.sh, sourced by both — the same sharing precedent populate-slot.sh set; callers keep their own error messages. Ponytail round two shrank the helper itself: both callers want exactly p1+p2 (ESP + slot A is the image's whole layout), so the variadic suffix loops went too.
  • tests/os/run.sh --vm was parsed but documented nowhere and called by nothing — deleted; the VM name stays the hardcoded default it always effectively was.

Behaviour preserved exactly; make lint green; verifier pass on the branch confirmed no observable difference (its one finding was an implementer test-claim overreach, corrected in this description: markdownlint noise it saw came from a stale base, and the current base lints clean).

🤖 Generated with Claude Code

VijitSingh97 and others added 3 commits August 13, 2026 08:04
tests/os/run.sh parsed --vm but nothing called it, and it was
incomplete anyway — DISK/SERIAL never keyed off it, so two runs with
different --vm values would still collide on the same scratch disk.

mkimage.sh and verify-image.sh each carried the same nine-line wait
for a loop device's partition nodes to appear after `losetup -P`,
worded identically down to the comment cross-referencing the other
copy. Pulled the polling loop into os/rauc/loop-wait.sh (sourced by
both), following the precedent populate-slot.sh already sets; each
caller keeps its own error message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cosmetic — the file is sourced either way. Keeps the two shared
os/rauc/*.sh helpers consistent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VijitSingh97
VijitSingh97 merged commit 5caa651 into develop-v2 Aug 13, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant