python-dbusmock icon indicating copy to clipboard operation
python-dbusmock copied to clipboard

Udisks2 template

Open superm1 opened this issue 1 year ago • 1 comments

We recently added some infrastructure into fwupd to be able to build on top of dbusmock. Ideally I'd like to build a bunch of tests specifically around the UEFI capsule plugin as it's one of the most widely used plugins but one of the things lacking is the ability to emulate udisks2. We require udisks2 to in order to find and validate the block device is the right type and ESP and such. There are all sorts of configurations that exist with a variety of ESPs, disks, partition types and I would love if we could build tests for them.

Any chance you can introduce a server template for udisks2 for us to be able to use?

superm1 avatar Feb 28 '24 04:02 superm1

Note that such a template would be rather shallow. It's normally a lot easier to simulate disks at the kernel level with scsi_debug, or loop/mdadm devices or so.

Realistically, I don't have time to work on a full-fledged udisks template any time soon. This is probably a case of "keep a minimal mock in your tests", at least initially. For that you probably only need a few properties.

martinpitt avatar Mar 25 '24 05:03 martinpitt