This is regenerated on every device hotplug event, and although infrequent
there is no point doing all that CPU-heavy requirement checking for no reason.
This allows us to only shut down the P2P daemon in the installed tests.
The easy fix would have been to use something like:
gdbus call --address unix:path=/run/fwupd.sock --object-path / --method org.freedesktop.fwupd.Quit'
...but the daemon does not implement an ObjectManager, which gdbus requires.
This worked correctly for so long because the p2p tests were being run after
the bus tests, so shutting down the system daemon had no effect.
Fedora 37 seems to have flipped the order for some reason -- and now it
*sometimes* matters that we were doing the worng thing...
The SMBIOS specification says:
Maximum size of SMBIOS Structure Table, pointed to by the
Structure Table Address, in bytes. The actual size is guaranteed
to be less or equal to the maximum size.
So, the firmware is actually allowed to return a DMI blob smaller than the
specified size.
Fixes https://github.com/fwupd/fwupd/issues/5486
This allows us to ignore all the delays when the device is emulated, with the
idea being to do dozens of device emulations in the CI tests.
Also, do not call fu_progress_sleep() when the device is emulated.
If the device does not replug, and we change the GUsbDevice because the phase
changed we don't want reprobe the hardware.
If we reprobe then the emulated device will request extra data compared to the
real device, which will cause emulation to fail.
This can save 250us on each query (of which we do a *lot*), and reduces the
number of queries by about half if the user is using a libxmlb version that can
convert from `_BOUND_TEXT` to `_BOUND_INDEX_TEXT`.
The more devices detected, the bigger the difference, and without this patch
fixing libxmlb would break fwupd as we'e been searching with an index, but not
actually providing one.
This is moderately expensive to call as it processes each requirement on each
release on each device, so the last thing we want to do is call it *twice*.
It turns out we do not want to know the current phase of the device, and we can
achieve the same thing tagging the GUsbDevice manually and clearing the events
at exactly the correct time.
fwupd-efi 1.4 enforces that NX bit is set by default.
This won't affect most users, it should only affect those that compile
by hand and don't have fwupd-efi installed already.