[gnome-software/mwleeds/42.1: 1/2] fwupd: Fix self test in case BitLocker is not present
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/mwleeds/42.1: 1/2] fwupd: Fix self test in case BitLocker is not present
- Date: Tue, 26 Apr 2022 20:51:57 +0000 (UTC)
commit 933f4f9ff9f152aa7344f742244a9fb951f8a037
Author: Phaedrus Leeds <mwleeds protonmail com>
Date: Tue Apr 26 13:48:47 2022 -0700
fwupd: Fix self test in case BitLocker is not present
Commit 692cdfcb90 added this g_assert_cmpstr() conditional on fwupd
1.7.1 being present, but actually it's dependent on that and on
BitLocker being in use on the machine. Since the latter is hard to
check for, just allow either message. This fixes gs-self-test-fwupd in
my Fedora 36 VM.
plugins/fwupd/gs-self-test.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/plugins/fwupd/gs-self-test.c b/plugins/fwupd/gs-self-test.c
index 34e6ecbcf..ae5d3ab43 100644
--- a/plugins/fwupd/gs-self-test.c
+++ b/plugins/fwupd/gs-self-test.c
@@ -52,17 +52,18 @@ gs_plugins_fwupd_func (GsPluginLoader *plugin_loader)
g_assert_cmpstr (gs_app_get_description (app), ==,
"This is the first paragraph in the example "
"cab file.\n\nThis is the second paragraph.");
-#if FWUPD_CHECK_VERSION(1, 7, 1)
- /* Changes introduced in fwupd commit d3706e0e0b0fc210796da839b84ac391f7a251f8 */
- g_assert_cmpstr (gs_app_get_update_details_markup (app), ==,
- "Some of the platform secrets may be invalidated when "
- "updating this firmware. Please ensure you have the "
- "volume recovery key before continuing.\n\nLatest "
- "firmware release.");
-#else
- g_assert_cmpstr (gs_app_get_update_details_markup (app), ==,
- "Latest firmware release.");
-#endif
+
+ /* The message is different if BitLocker Full Disk Encryption is
+ * detected. See
+ * https://github.com/fwupd/fwupd/wiki/Full-Disk-Encryption-Detected */
+ if (g_strcmp0 (gs_app_get_update_details_markup (app),
+ "Some of the platform secrets may be invalidated when "
+ "updating this firmware. Please ensure you have the "
+ "volume recovery key before continuing.\n\nLatest "
+ "firmware release.") != 0) {
+ g_assert_cmpstr (gs_app_get_update_details_markup (app), ==,
+ "Latest firmware release.");
+ }
/* seems wrong, but this is only set if the update is available */
g_assert_cmpint (gs_app_get_state (app), ==, GS_APP_STATE_UNKNOWN);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]