All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] test/py: efi_capsule: aligned with efidebug syntax changes
@ 2021-05-10  8:21 AKASHI Takahiro
  2021-05-20  3:14 ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: AKASHI Takahiro @ 2021-05-10  8:21 UTC (permalink / raw)
  To: u-boot

After the commit c70f44817d46 ("efi_loader: simplify 'printenv -e'"),
"-all" option is no longer necessary.
Just remove them in the test script.

Fixes: c70f44817d46 ("efi_loader: simplify 'printenv -e'")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 test/py/tests/test_efi_capsule/test_capsule_firmware.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware.py b/test/py/tests/test_efi_capsule/test_capsule_firmware.py
index 4697ca6f1c5c..9eeaae27d626 100644
--- a/test/py/tests/test_efi_capsule/test_capsule_firmware.py
+++ b/test/py/tests/test_efi_capsule/test_capsule_firmware.py
@@ -85,7 +85,7 @@ class TestEfiCapsuleFirmwareFit(object):
 
                 # need to run uefi command to initiate capsule handling
                 output = u_boot_console.run_command(
-                    'env print -e -all Capsule0000')
+                    'env print -e Capsule0000')
 
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
@@ -160,7 +160,7 @@ class TestEfiCapsuleFirmwareFit(object):
 
                 # need to run uefi command to initiate capsule handling
                 output = u_boot_console.run_command(
-                    'env print -e -all Capsule0000')
+                    'env print -e Capsule0000')
 
             output = u_boot_console.run_command_list([
                 'host bind 0 %s' % disk_img,
@@ -227,7 +227,7 @@ class TestEfiCapsuleFirmwareFit(object):
 
                 # need to run uefi command to initiate capsule handling
                 output = u_boot_console.run_command(
-                    'env print -e -all Capsule0000')
+                    'env print -e Capsule0000')
 
             output = u_boot_console.run_command_list(['efidebug capsule esrt'])
 
-- 
2.31.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] test/py: efi_capsule: aligned with efidebug syntax changes
  2021-05-10  8:21 [PATCH] test/py: efi_capsule: aligned with efidebug syntax changes AKASHI Takahiro
@ 2021-05-20  3:14 ` Heinrich Schuchardt
  2021-07-20  2:42   ` AKASHI Takahiro
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2021-05-20  3:14 UTC (permalink / raw)
  To: u-boot

On 5/10/21 10:21 AM, AKASHI Takahiro wrote:

In the subject: %s/aligned/align/

> After the commit c70f44817d46 ("efi_loader: simplify 'printenv -e'"),
> "-all" option is no longer necessary.
> Just remove them in the test script.

'env print -e -all Capsule0000' leads to an error CMD_RET_USAGE.

Capsule0000 does not necessarily exist. Shouldn't we print CapsuleLast
and CapsuleMax and check their value instead?

Shouldn't we restrict the output to EFI_CAPSULE_REPORT_GUID to be sure
that the GUID of these variables is correct?

Best regards

Heinrich

>
> Fixes: c70f44817d46 ("efi_loader: simplify 'printenv -e'")
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
>   test/py/tests/test_efi_capsule/test_capsule_firmware.py | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware.py b/test/py/tests/test_efi_capsule/test_capsule_firmware.py
> index 4697ca6f1c5c..9eeaae27d626 100644
> --- a/test/py/tests/test_efi_capsule/test_capsule_firmware.py
> +++ b/test/py/tests/test_efi_capsule/test_capsule_firmware.py
> @@ -85,7 +85,7 @@ class TestEfiCapsuleFirmwareFit(object):
>
>                   # need to run uefi command to initiate capsule handling
>                   output = u_boot_console.run_command(
> -                    'env print -e -all Capsule0000')
> +                    'env print -e Capsule0000')
>
>               output = u_boot_console.run_command_list([
>                   'host bind 0 %s' % disk_img,
> @@ -160,7 +160,7 @@ class TestEfiCapsuleFirmwareFit(object):
>
>                   # need to run uefi command to initiate capsule handling
>                   output = u_boot_console.run_command(
> -                    'env print -e -all Capsule0000')
> +                    'env print -e Capsule0000')
>
>               output = u_boot_console.run_command_list([
>                   'host bind 0 %s' % disk_img,
> @@ -227,7 +227,7 @@ class TestEfiCapsuleFirmwareFit(object):
>
>                   # need to run uefi command to initiate capsule handling
>                   output = u_boot_console.run_command(
> -                    'env print -e -all Capsule0000')
> +                    'env print -e Capsule0000')
>
>               output = u_boot_console.run_command_list(['efidebug capsule esrt'])
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] test/py: efi_capsule: aligned with efidebug syntax changes
  2021-05-20  3:14 ` Heinrich Schuchardt
@ 2021-07-20  2:42   ` AKASHI Takahiro
  0 siblings, 0 replies; 3+ messages in thread
From: AKASHI Takahiro @ 2021-07-20  2:42 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: u-boot, Alexander Graf, Sughosh Ganu

On Thu, May 20, 2021 at 05:14:36AM +0200, Heinrich Schuchardt wrote:
> On 5/10/21 10:21 AM, AKASHI Takahiro wrote:
> 
> In the subject: %s/aligned/align/

I think that the passive usage is grammatically correct here,
but I can fix it if you like.

> > After the commit c70f44817d46 ("efi_loader: simplify 'printenv -e'"),
> > "-all" option is no longer necessary.
> > Just remove them in the test script.
> 
> 'env print -e -all Capsule0000' leads to an error CMD_RET_USAGE.
> 
> Capsule0000 does not necessarily exist. Shouldn't we print CapsuleLast
> and CapsuleMax and check their value instead?
> 
> Shouldn't we restrict the output to EFI_CAPSULE_REPORT_GUID to be sure
> that the GUID of these variables is correct?

No. The whole aim of executing "env print -e" (or whatever else command)
was to invoke efi_init_obj_list(), hence efi_launch_capsules().
We don't have to care whether it fails or not.

In fact, this test case still works correctly even with "--all".
So this patch is just a cleanup. I will repost it.

-Takahiro Akashi

> Best regards
> 
> Heinrich
> 
> > 
> > Fixes: c70f44817d46 ("efi_loader: simplify 'printenv -e'")
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> >   test/py/tests/test_efi_capsule/test_capsule_firmware.py | 6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware.py b/test/py/tests/test_efi_capsule/test_capsule_firmware.py
> > index 4697ca6f1c5c..9eeaae27d626 100644
> > --- a/test/py/tests/test_efi_capsule/test_capsule_firmware.py
> > +++ b/test/py/tests/test_efi_capsule/test_capsule_firmware.py
> > @@ -85,7 +85,7 @@ class TestEfiCapsuleFirmwareFit(object):
> > 
> >                   # need to run uefi command to initiate capsule handling
> >                   output = u_boot_console.run_command(
> > -                    'env print -e -all Capsule0000')
> > +                    'env print -e Capsule0000')
> > 
> >               output = u_boot_console.run_command_list([
> >                   'host bind 0 %s' % disk_img,
> > @@ -160,7 +160,7 @@ class TestEfiCapsuleFirmwareFit(object):
> > 
> >                   # need to run uefi command to initiate capsule handling
> >                   output = u_boot_console.run_command(
> > -                    'env print -e -all Capsule0000')
> > +                    'env print -e Capsule0000')
> > 
> >               output = u_boot_console.run_command_list([
> >                   'host bind 0 %s' % disk_img,
> > @@ -227,7 +227,7 @@ class TestEfiCapsuleFirmwareFit(object):
> > 
> >                   # need to run uefi command to initiate capsule handling
> >                   output = u_boot_console.run_command(
> > -                    'env print -e -all Capsule0000')
> > +                    'env print -e Capsule0000')
> > 
> >               output = u_boot_console.run_command_list(['efidebug capsule esrt'])
> > 
> > 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-20  2:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10  8:21 [PATCH] test/py: efi_capsule: aligned with efidebug syntax changes AKASHI Takahiro
2021-05-20  3:14 ` Heinrich Schuchardt
2021-07-20  2:42   ` AKASHI Takahiro

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.