Repository navigation
tests: Use lazy umount in tmt tests - #2616
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 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 -lfor 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
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

umount can fail with "target is busy" right after bootc install/bootupd
(see #2177). Use
umount -las suggested there. The unmount intest-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