All of lore.kernel.org
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 1/1] test: fix some pylint problems in test_capsule_firmware_raw.py
Date: Mon, 9 May 2022 14:17:56 +0900	[thread overview]
Message-ID: <20220509051756.GB34398@laputa> (raw)
In-Reply-To: <20220430135541.60784-1-heinrich.schuchardt@canonical.com>

On Sat, Apr 30, 2022 at 03:55:41PM +0200, Heinrich Schuchardt wrote:
> * improve doc-string formatting
> * remove unused imports

Similar changes should be applied to test_capsule_firmware_fit.py
and test_capsule_firmware_signed.py as well.

-Takahiro Akashi

> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>  .../test_capsule_firmware_raw.py              | 42 +++++++++----------
>  1 file changed, 20 insertions(+), 22 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 ae99f080ff..c8c647d0b1 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
> @@ -1,17 +1,13 @@
>  # SPDX-License-Identifier:      GPL-2.0+
>  # Copyright (c) 2020, Linaro Limited
>  # Author: AKASHI Takahiro <takahiro.akashi@linaro.org>
> -#
> -# U-Boot UEFI: Firmware Update Test
>  
> -"""
> +""" U-Boot UEFI: Firmware Update Test
>  This test verifies capsule-on-disk firmware update for raw images
>  """
>  
> -from subprocess import check_call, check_output, CalledProcessError
>  import pytest
> -from capsule_defs import *
> -
> +from capsule_defs import CAPSULE_DATA_DIR, CAPSULE_INSTALL_DIR
>  
>  @pytest.mark.boardspec('sandbox')
>  @pytest.mark.buildconfigspec('efi_capsule_firmware_raw')
> @@ -24,15 +20,18 @@ from capsule_defs import *
>  @pytest.mark.buildconfigspec('cmd_nvedit_efi')
>  @pytest.mark.buildconfigspec('cmd_sf')
>  @pytest.mark.slow
> -class TestEfiCapsuleFirmwareRaw(object):
> +class TestEfiCapsuleFirmwareRaw:
> +    """ Tests verifying capsule-on-disk firmware update for raw images
> +    """
> +
>      def test_efi_capsule_fw1(
>              self, u_boot_config, u_boot_console, efi_capsule_data):
> -        """
> -        Test Case 1 - Update U-Boot and U-Boot environment on SPI Flash
> -                      but with an incorrect GUID value in the capsule
> -                      No update should happen
> -                      0x100000-0x150000: U-Boot binary (but dummy)
> -                      0x150000-0x200000: U-Boot environment (but dummy)
> +        """ Test Case 1
> +        Update U-Boot and U-Boot environment on SPI Flash
> +        but with an incorrect GUID value in the capsule
> +        No update should happen
> +        0x100000-0x150000: U-Boot binary (but dummy)
> +        0x150000-0x200000: U-Boot environment (but dummy)
>          """
>  
>          # other tests might have run and the
> @@ -106,12 +105,11 @@ class TestEfiCapsuleFirmwareRaw(object):
>  
>      def test_efi_capsule_fw2(
>              self, u_boot_config, u_boot_console, efi_capsule_data):
> -        """
> -        Test Case 2 - Update U-Boot and U-Boot environment on SPI Flash
> -                      but with OsIndications unset
> -                      No update should happen
> -                      0x100000-0x150000: U-Boot binary (but dummy)
> -                      0x150000-0x200000: U-Boot environment (but dummy)
> +        """ Test Case 2
> +        Update U-Boot and U-Boot environment on SPI Flash but with OsIndications unset
> +        No update should happen
> +        0x100000-0x150000: U-Boot binary (but dummy)
> +        0x150000-0x200000: U-Boot environment (but dummy)
>          """
>          disk_img = efi_capsule_data
>          with u_boot_console.log.section('Test Case 2-a, before reboot'):
> @@ -191,9 +189,9 @@ class TestEfiCapsuleFirmwareRaw(object):
>  
>      def test_efi_capsule_fw3(
>              self, u_boot_config, u_boot_console, efi_capsule_data):
> -        """
> -        Test Case 3 - Update U-Boot on SPI Flash, raw image format
> -                      0x100000-0x150000: U-Boot binary (but dummy)
> +        """ Test Case 3
> +        Update U-Boot on SPI Flash, raw image format
> +        0x100000-0x150000: U-Boot binary (but dummy)
>          """
>          disk_img = efi_capsule_data
>          with u_boot_console.log.section('Test Case 3-a, before reboot'):
> -- 
> 2.34.1
> 

      reply	other threads:[~2022-05-09  5:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30 13:55 [PATCH 1/1] test: fix some pylint problems in test_capsule_firmware_raw.py Heinrich Schuchardt
2022-05-09  5:17 ` AKASHI Takahiro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220509051756.GB34398@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.