Skip to content

feat: Add QEMU disk image parameter - #139

Open
lurtz wants to merge 3 commits into
mainfrom
add-disk-parameter-to-qemu-plugin
Open

feat: Add QEMU disk image parameter#139
lurtz wants to merge 3 commits into
mainfrom
add-disk-parameter-to-qemu-plugin

Conversation

@lurtz

@lurtz lurtz commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

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

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.
Comment thread score/itf/plugins/qemu/qemu.py Outdated
Comment thread MODULE.bazel
module_name = "score_rules_imagefs",
commit = "b1278766c01d9f4102c24e87b0ce9d035eaed832",
remote = "https://github.com/eclipse-score/rules_imagefs.git",
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

remove

@lurtz
lurtz marked this pull request as ready for review August 25, 2026 08:52
@lurtz
lurtz deployed to workflow-approval August 25, 2026 09:06 — with GitHub Actions Active
@lurtz
lurtz requested a lite review from Copilot August 25, 2026 09:12

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.

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-disk through 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_args directly 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/vdb mapping 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 matching target_compatible_with here, 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.

Comment thread score/itf/plugins/qemu/__init__.py Outdated
Comment thread test/integration/BUILD
Comment thread test/unit/test_qemu.py Outdated
@lurtz
lurtz deployed to workflow-approval August 25, 2026 09:53 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants