tree: b468e9b5c6e36d0010dbb14c3dfc7c34cf8bf84d [path history] [tgz]
  1. build-certs.py
  2. fakedevice123.bin
  3. fakedevice123.jcat
  4. fakedevice123.metainfo.xml
  5. fakedevice124.bin
  6. fakedevice124.jcat
  7. fakedevice124.metainfo.xml
  8. fwupd-tests.xml
  9. fwupd.sh
  10. fwupd.test.in
  11. fwupd_ioc.py
  12. fwupd_test.py
  13. fwupdmgr-online.sh
  14. fwupdmgr-online.test.in
  15. fwupdmgr-p2p.sh
  16. fwupdmgr-p2p.test.in
  17. fwupdmgr.sh
  18. fwupdmgr.test.in
  19. fwupdtool-efiboot.sh
  20. fwupdtool-efiboot.test.in
  21. fwupdtool.sh
  22. fwupdtool.test.in
  23. lsan-suppressions.txt
  24. meson.build
  25. README.md
  26. remote.conf.in
data/tests/README.md

Installed tests

A test suite that can be used to interact with a fake device is installed when configured with -Dbuild=all and -Dtests=true.

The test files have been signed by the production LVFS instance, and are available here:

By default this test suite is disabled.

Enabling

To enable the test suite:

fwupdtool enable-test-devices

Using test suite

When the daemon is started with the test suite enabled a fake webcam device will be created with a pending update.

Integrated Webcam
  DeviceId:             08d460be0f1f9f128413f816022a6439e0078018
  Guid:                 b585990a-003e-5270-89d5-3705a17f9a43
  Summary:              A fake webcam
  Plugin:               test
  Flags:                updatable|supported|registered
  Vendor:               ACME Corp.
  VendorId:             USB:0x046D
  Version:              1.2.2
  VersionLowest:        1.2.0
  VersionBootloader:    0.1.2
  Icon:                 preferences-desktop-keyboard
  Created:              2018-11-29

Upgrading

This can be upgraded to a firmware version 1.2.4 by using fwupdmgr update or any fwupd frontend.

$ fwupdmgr get-updates
Integrated Webcam has firmware updates:
GUID:                    b585990a-003e-5270-89d5-3705a17f9a43
ID:                      fakedevice.firmware
Update Version:          1.2.4
Update Name:             FakeDevice Firmware
Update Summary:          Firmware for the ACME Corp Integrated Webcam
Update Remote ID:        fwupd-tests
Update Checksum:         SHA1(fc0aabcf98bf3546c91270f2941f0acd0395dd79)
Update Location:         ./fakedevice124.cab
Update Description:      Fixes another bug with the flux capacitor to prevent time going backwards.

$ fwupdmgr update
Decompressing         [***************************************]
Authenticating        [***************************************]
Updating Integrated Webcam™…                                   ]
Verifying             [***************************************] Less than one minute remaining

Downgrading

It can also be downgraded to firmware version 1.2.3.

$ fwupdmgr downgrade
Choose a device:
0. Cancel
1. 08d460be0f1f9f128413f816022a6439e0078018 (Integrated Webcam™)
2. 8a21cacfb0a8d2b30c5ee9290eb71db021619f8b (XPS 13 9370 System Firmware)
3. d10c5f0ed12c6dc773f596b8ac51f8ace4355380 (XPS 13 9370 Thunderbolt Controller)
1
Decompressing         [***************************************]
Authenticating        [***************************************]
Downgrading Integrated Webcam™…               \                ]
Verifying             [***************************************] Less than one minute remaining