Skip to content

to-disk: Fix cross-device link errors with AlmaLinux and similar images#131

Merged
cgwalters merged 2 commits into
bootc-dev:mainfrom
cgwalters:exchange-tmp
Nov 7, 2025
Merged

to-disk: Fix cross-device link errors with AlmaLinux and similar images#131
cgwalters merged 2 commits into
bootc-dev:mainfrom
cgwalters:exchange-tmp

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

Closes: #125

Switch to bind-mounting /var/tmp from the outer VM into the inner podman container. I think we fixed this in newer bootc, but this ensures compatibility with older versions.

Also add AlmaLinux to the test matrix and creates a parameterized integration test that validates to-disk works across all supported bootc images. Deduplicates disk validation logic into a shared helper function.

Assisted-by: Claude Code (Sonnet 4.5)

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses the cross-device link error by bind-mounting /var/tmp. The introduction of a parameterized integration test for multiple bootc images, including AlmaLinux, is a great addition to improve test coverage and prevent regressions. The refactoring of disk validation logic into the validate_disk_image helper function significantly improves code clarity and maintainability in the integration tests. I have a couple of minor suggestions to improve error handling in the new helper function, but overall this is a solid contribution.

Comment thread crates/integration-tests/src/tests/to_disk.rs
@cgwalters
Copy link
Copy Markdown
Collaborator Author

OK the problem here is yet again adding a new test started overloading the single runner. I did #133 so we can scale up our testing.

@cgwalters cgwalters force-pushed the exchange-tmp branch 3 times, most recently from 24b147d to 733c621 Compare November 7, 2025 18:12
The integration tests were creating separate disk images for tests
that could share the same VM, causing unnecessary duplication of
expensive `to-disk` operations.

Changes:
- Merged `test_base_disks_list_shows_timestamp` into
  `test_base_disk_creation_and_reuse` - the timestamp test no longer
  needs its own VM, it can verify the list output after the reuse test
  creates VMs
- Created `test_libvirt_comprehensive_workflow` that consolidates
  multiple separate tests (`test_libvirt_run_list_json_ssh_metadata`,
  `test_libvirt_run_with_instancetype`, and
  `test_libvirt_run_label_functionality`) into a single test that
  creates one VM and verifies:
  - Instance type configuration
  - Label metadata and filtering
  - JSON output with SSH metadata
  - VM lifecycle

This reduces the number of expensive disk image creations in CI,
improving test performance while maintaining the same test coverage.

Assisted-by: Claude Code (Sonnet 4.5)
Signed-off-by: Colin Walters <walters@verbum.org>
Since having many to_disk run on the dinky default GHA runners
can overwhelm them.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters enabled auto-merge (rebase) November 7, 2025 21:49
@cgwalters cgwalters merged commit fe01aa0 into bootc-dev:main Nov 7, 2025
19 of 25 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.

"Invalid cross-device link" when creating libvirt base disk

2 participants