[PATCH] test: test for ignore OsIndications

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Jul 4 16:37:52 CEST 2024


The tests we currently have expect the firmware update to fail
when OsIndications is not set properly. However, we have a Kconfig flag
that explicitly ignores that variable and trigers the capsule update
regardless. Adjust the tests accordingly

Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
---
 .../py/tests/test_efi_capsule/test_capsule_firmware_raw.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py b/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
index 05853578c293..f3a2dff5c2c8 100644
--- a/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
+++ b/test/py/tests/test_efi_capsule/test_capsule_firmware_raw.py
@@ -95,6 +95,9 @@ class TestEfiCapsuleFirmwareRaw:
             'config_efi_ignore_osindications')
         need_reboot = True if ignore_os_indications else False
 
+        capsule_auth = u_boot_config.buildconfig.get(
+            'config_efi_capsule_authenticate')
+
         capsule_early = u_boot_config.buildconfig.get(
             'config_efi_capsule_on_disk_early')
         with u_boot_console.log.section('Test Case 2-b, after reboot'):
@@ -104,10 +107,10 @@ class TestEfiCapsuleFirmwareRaw:
             if not ignore_os_indications:
                 check_file_exist(u_boot_console, disk_img, capsule_files)
 
-            expected = 'u-boot:New' if ignore_os_indications else 'u-boot:Old'
+            expected = 'u-boot:New' if (ignore_os_indications and not capsule_auth) else 'u-boot:Old'
             verify_content(u_boot_console, '100000', expected)
 
-            expected = 'u-boot-env:New' if ignore_os_indications else 'u-boot-env:Old'
+            expected = 'u-boot-env:New' if (ignore_os_indications and not capsule_auth) else 'u-boot-env:Old'
             verify_content(u_boot_console, '150000', expected)
 
     def test_efi_capsule_fw3(
-- 
2.43.0



More information about the U-Boot mailing list