Commit Graph

17 Commits

Author SHA1 Message Date
Richard Hughes
2d00cda464 Remove PLUGINBUILDDIR and use G_TEST_SRCDIR and G_TEST_BUILDDIR instead
This allows us to override the location we load data files from, which
allows us to do more kinds of installed tests in the future.

Also, move the global data/tests content into the place that it is used
as it was getting impossible to manage.
2021-10-21 18:36:22 +01:00
Richard Hughes
852a6dbdc2 redfish: Handle EPERM when testing devices with a IPMI device
Fixes https://github.com/fwupd/fwupd/issues/3849
2021-10-12 19:12:57 -05:00
Richard Hughes
478e44bc19 trivial: Do not use g_assert() in self test code
Note that g_assert() should not be used in unit tests, since it is a
no-op when compiling with G_DISABLE_ASSERT. Use g_assert() in production
code, and g_assert_true() in unit tests.

See https://github.com/fwupd/fwupd/issues/3790
2021-09-24 22:20:21 +01:00
Richard Hughes
40cd18fa97 Allow using a per-device global percentage completion
It's actually quite hard to build a front-end for fwupd at the moment
as you're never sure when the progress bar is going to zip back to 0%
and start all over again. Some plugins go 0..100% for write, others
go 0..100% for erase, then again for write, then *again* for verify.

By creating a helper object we can easily split up the progress of the
specific task, e.g. write_firmware().

We can encode at the plugin level "the erase takes 50% of the time, the
write takes 40% and the read takes 10%". This means we can have a
progressbar which goes up just once at a consistent speed.
2021-09-13 14:28:15 +01:00
Richard Hughes
1210aa4ae7 redfish: Create user accounts automatically using IPMI
This allows the Redfish plugin to "just work" when there is no username
or password in the SMBIOS data. Using KCS we can create an admin account
from the host OS and then automatically enumerate devices.
2021-09-07 17:25:37 +01:00
Mario Limonciello
55de39c077 trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
Richard Hughes
a5a978b3f6 Rename some confusing API
More than one person has asked about 'why call fu_plugin_update() for a
reinstall or downgrade' and I didn't have a very good answer.

The plugin API is not officially stable, and we should fix things to be
less confusing. Use the same verbs as the FuDevice vfuncs instead.
2021-08-06 19:49:53 +01:00
Richard Hughes
6b238b2daa redfish: Automatically connect the BMC network interface at startup
Some distributions like RHEL change the default to not autoconnect
ethernet devices. This breaks connecting to the SMBIOS-defined BMC
adapter which means all the reads fail after a 60s timemout.

Autoconnect the internal USB ethernet adapter so we can use Redfish
without user action.
2021-07-22 12:48:22 +01:00
Richard Hughes
5343a4a083 Export the build timestamp from plugins 2021-07-08 16:31:07 +01:00
Richard Hughes
a923ae2804 redfish: Refactor plugin and add some unit tests 2021-07-08 15:35:02 +01:00
Richard Hughes
ad825eac24 redfish: Allow discovery of Redfish BMCs specified by VID-PID or MAC
Also, allow overriding the data using the config file.
2021-07-06 17:13:16 +01:00
Richard Hughes
6ff0ae2bc4 redfish: Split out the SMBIOS table parsing
This makes it more robust against corrupted data, and also adds support
for fuzzing.
2021-06-25 19:55:19 +01:00
Mario Limonciello
73cdf067ed trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
Richard Hughes
5c9b1fcc81 Only include the start year in the copyright header
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00
Richard Hughes
3ed2ac8315 trivial: Unexport fu_test_get_filename()
We don't actually need either of the things it provides (looking up in source
and built, and converting to an absolute path) so just replace it with
g_build_filename() instead.

This also has the advantage that it does the right thing on Windows.
2019-11-27 12:45:35 +00:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Richard Hughes
ba103483fa redfish: Add a plugin that uses the Redfish API
Redfish is an open industry standard specification and schema that helps enable
simple and secure management of modern scalable platform hardware.

This has only ever been tested using an emulator and not on real hardware.
2018-06-29 20:17:45 +01:00