feat: Add QEMU disk image parameter - #139
Open
lurtz wants to merge 3 commits into
Open
Conversation
For running integration tests the binaries and their data have to be made available in the image. Mounting the data via an extra image is the easiest and fastest way. It has lesser system requirements compared to e.g. mounting and modifying a QCOW2 image.
lurtz
commented
Aug 24, 2026
| module_name = "score_rules_imagefs", | ||
| commit = "b1278766c01d9f4102c24e87b0ce9d035eaed832", | ||
| remote = "https://github.com/eclipse-score/rules_imagefs.git", | ||
| ) |
lurtz
marked this pull request as ready for review
August 25, 2026 08:52
There was a problem hiding this comment.
Pull request overview
Adds optional QEMU disk-image support for integration tests, including architecture-aware attachment, overlay handling, and ext4 test fixtures.
Changes:
- Propagates
--qemu-diskthrough the QEMU plugin and process. - Adds disk-image generation and integration coverage.
- Pins the required imagefs dependency.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Summary | Review notes |
|---|---|---|
test/unit/test_qemu.py |
Tests disk argument generation. | Rename the read-only test or add a real read-only assertion. |
test/resources/qemu_disk_content.txt |
Provides disk fixture content. | — |
test/resources/BUILD |
Builds the ext4 disk image. | — |
test/integration/test_qemu_disk.py |
Tests disk visibility, mounting, and writing. | — |
test/integration/BUILD |
Registers disk integration tests. | Add the Linux compatibility constraint, including at line 280. |
score/itf/plugins/qemu/qemu.py |
Builds architecture-aware disk arguments. | — |
score/itf/plugins/qemu/qemu_target.py |
Forwards disk configuration. | — |
score/itf/plugins/qemu/qemu_process.py |
Passes and logs the disk image. | — |
score/itf/plugins/qemu/__init__.py |
Adds CLI handling and overlay lifecycle. | Ensure both overlay creations are covered by cleanup handling. |
MODULE.bazel |
Pins the required imagefs revision. | — |
Suppressed comments (2)
score/itf/plugins/qemu/qemu.py:175
- The new architecture-dependent ordering is not covered by the unit tests: the combined test calls
__disk_argsdirectly and never exercises__disks_args, including the aarch64 reversal. Add unit assertions through__disks_args()for both machines so a regression in the/dev/vda//dev/vdbmapping is caught without relying only on the manual integration tests.
if self.__arch_config["block_device_order"] == "descending":
disks = list(reversed(disks))
test/integration/BUILD:280
- This test depends on
//test/resources:qemu_disk_image, which is explicitly Linux-only (test/resources/BUILD:115). Without a matchingtarget_compatible_withhere, analyzing or building this integration target on a non-Linux platform fails on the incompatible data dependency instead of skipping it; add the Linux constraint used by the other host-dependent tests.
py_itf_test(
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
For running integration tests the binaries and their data have to be made available in the image.
Mounting the data via an extra image is the easiest and fastest way. It has lesser system requirements compared to e.g. mounting and modifying a QCOW2 image.
Depends on eclipse-score/rules_imagefs#16