fake-device-wrapper should bind-mount efivars

Bug #1906320 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
New
Undecided
Unassigned

Bug Description

/usr/share/ubuntu-drivers-common/fake-devices-wrapper should bindmount efivars under testbed.get_root_dir().

Ie. such that /sys/firmware/efi/efivars is correctly available under the umockdev test-bed.

That way when testing subiquity, it should correctly observe if it was booted under secureboot, or not.

Or maybe we can create a few options to fake-devices-wrapper whether or not to present Secureboot.

Revision history for this message
Martin Pitt (pitti) wrote :

FTR, I would strongly advise against that, see https://github.com/martinpitt/umockdev/issues/110#issuecomment-736224503 . You want the tests to work independently on the hardware it's running on, so that you can run it on e.g. standard autopkgtest infra.

You could create /sys/firmware/efi/efivars/ tarballs of a bunch of real systems with the properties that you want, keep them in the tests, and unpack these in your test cases. You most probably just need a few of them, so you can strip them down or possibly create them individually as files, but a full tarball might be the quickest start.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

pitti fake-devices-wrapper is not used for testing, usually.

We also use it to run Ubiquity installer and make it pretend that it needs nvidia dkms modules; and we want to complete the VM install in the UEFI mode. Hence we want the wrapper think that UEFI and Secureboot is on; when doing those.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.