Page MenuHomeFreeBSD

tests/ci: fix QEMU blockdev declaration for all platforms
ClosedPublic

Authored by guest-svmhdvn on Jul 23 2025, 5:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 16, 1:37 AM
Unknown Object (File)
Wed, Oct 15, 2:36 AM
Unknown Object (File)
Sun, Oct 12, 12:07 AM
Unknown Object (File)
Sat, Oct 11, 7:06 AM
Unknown Object (File)
Sat, Oct 11, 7:06 AM
Unknown Object (File)
Sat, Oct 11, 7:06 AM
Unknown Object (File)
Sat, Oct 11, 7:06 AM
Unknown Object (File)
Fri, Oct 10, 11:48 PM
Subscribers

Details

Summary

This patch uses the QEMU manpage-recommended '-blockdev' option instead of
'-drive' to declare block devices. This also makes the mandatory '-device'
declarations constant across all platforms, which fixes the missing QEMU_DEVICES tarfs device declarations on all Makefile.<arch> files.

Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

guest-svmhdvn retitled this revision from [PATCH] tests/ci: fix QEMU blockdev declaration to tests/ci: fix QEMU blockdev declaration.

Even so, this change is still useful to stay up to date with upstream QEMU recommendations. From the manpage[0]:

The most explicit way to describe disks is to use a combination of -device to specify the hardware device and -blockdev to describe the backend. The device defines what the guest sees and the backend describes how QEMU handles the data. It is the only guaranteed stable interface for describing block devices and as such is recommended for management tools and scripting.

And this as well:

The -drive option combines the device and backend into a single command line option which is a more human friendly. There is however no interface stability guarantee although some older board models still need updating to work with the modern blockdev forms.

[0] https://manpages.debian.org/testing/qemu-system-arm/qemu-system-aarch64.1.en.html#Block_device_options

guest-svmhdvn retitled this revision from tests/ci: fix QEMU blockdev declaration to tests/ci: fix QEMU blockdev declaration for all platforms.
guest-svmhdvn edited the summary of this revision. (Show Details)

fixed missing hd1 declaration across all platforms in this revision

I'd also like to see, in the future of course, some way to test on SATA, SCSI, UFS, MMC, NVME, virtio-blk and p9fs.... but that's different than the simple smoke tests that this is doing...

This revision is now accepted and ready to land.Jul 23 2025, 8:03 PM

I think this is a good move, just the commit message needs some adjustment after 9f3e4b28f9dec27b73eeebd161d119d1e9864081