Skip to content

tests: Use lazy umount in tmt tests - #2616

Merged
Johan-Liebert1 merged 1 commit into
bootc-dev:mainfrom
jeckersb:lazy-umount
Nov 2, 2026
Merged

Johan-Liebert1 merged 1 commit into
bootc-dev:mainfrom
jeckersb:lazy-umount

Conversation

@jeckersb

@jeckersb jeckersb commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

umount can fail with "target is busy" right after bootc install/bootupd
(see #2177). Use umount -l as suggested there. The unmount in
test-composefs-separate-boot.nu stays strict because the ESP is
repartitioned and reformatted right after it.

Assisted-by: AI
Signed-off-by: John Eckersberg dev@eckersberg.com

Copilot AI balanced review requested due to automatic review settings November 1, 2026 21:32
@bootc-bot
bootc-bot Bot requested a review from henrywang November 1, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The lazy unmount can leave the old filesystem active while the same disk image is repartitioned, allowing delayed writes to corrupt the newly installed image.

1 open issue
What changed in this PR

This PR updates bootc’s TMT integration tests to use lazy unmounts, aiming to reduce transient “target is busy” failures after installation and bootloader operations.

Changes:

  • Uses umount -l for cleanup and ESP remount operations.
  • Adds lazy unmounting to recursive installation-mount cleanup.
  • Leaves the separate-boot test’s strict unmount unchanged before repartitioning and reformatting.
File Description
tmt/​tests/​booted/​test-multi-device-esp.nu Uses lazy unmounts in cleanup and ESP helpers.
tmt/​tests/​booted/​test-install-to-filesystem-var-mount.sh Makes recursive target cleanup lazy.
tmt/​tests/​booted/​test-install-shared-propagation.nu Lazily unmounts the installation target.
tmt/​tests/​booted/​test-install-outside-container.nu Updates target, inspection, and deployment unmounts.
tmt/​tests/​booted/​test-install-no-boot-dir.nu Uses lazy unmounting before image cleanup.
tmt/​tests/​booted/​test-install-karg-delete.nu Uses lazy unmounting after boot-argument checks.
tmt/​tests/​booted/​test-install-composefs-native.nu Lazily unmounts each installation before cleanup.
tmt/​tests/​booted/​test-composefs-uki-addons.nu Uses lazy unmounts when refreshing the ESP view.

Review effort: Balanced

umount can fail with "target is busy" right after bootc install/bootupd
(see bootc-dev#2177). Use `umount -l` as suggested there. The unmounts in
test-composefs-separate-boot.nu and the first one in
test-install-outside-container.nu stay strict because the underlying
device/image is repartitioned and reformatted right after.

Assisted-by: AI
Signed-off-by: John Eckersberg <dev@eckersberg.com>
@Johan-Liebert1
Johan-Liebert1 merged commit 9037c26 into bootc-dev:main Nov 2, 2026
54 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.

3 participants