diff mbox series

test: test for ignore OsIndications

Message ID 20240704143752.250847-1-ilias.apalodimas@linaro.org
State New
Headers show
Series test: test for ignore OsIndications | expand

Commit Message

Ilias Apalodimas July 4, 2024, 2:37 p.m. UTC
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@linaro.org>
---
 .../py/tests/test_efi_capsule/test_capsule_firmware_raw.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Ilias Apalodimas July 4, 2024, 2:41 p.m. UTC | #1
Hi Heinrich

Please ignore this patch I messed up my rebasing.

I'll send the proper one shortly

On Thu, 4 Jul 2024 at 17:37, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> 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@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
>
diff mbox series

Patch

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(