public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0
@ 2019-12-28 15:37 Heinrich Schuchardt
  2020-07-30  5:28 ` Heinrich Schuchardt
  2020-08-04 11:08 ` [edk2-devel] " Samer El-Haj-Mahmoud
  0 siblings, 2 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2019-12-28 15:37 UTC (permalink / raw)
  To: EDK II Development; +Cc: Eric Jin, Supreeth Venkatesh, Heinrich Schuchardt

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2438

The EFI_RNG_PROTOCOL conformance test checks that the size returned by
GetInfo() is a multiple of 16. This would be fulfilled by size == 0.

The UEFI specification requires that at least one algorithm is implemented.
So we should check that size is non-zero too.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 .../RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
index f0a7c030..cd419d68 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
@@ -169,7 +169,8 @@ BBTestGetInfoConformanceTestCheckpoint1 (
     return Status;
   }
 
-  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize % sizeof(EFI_RNG_ALGORITHM) == 0) {
+  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize &&
+      RNGAlgorithmListSize % sizeof(EFI_RNG_ALGORITHM) == 0) {
     AssertionType = EFI_TEST_ASSERTION_PASSED;
   } else {
     AssertionType = EFI_TEST_ASSERTION_FAILED;
-- 
2.24.1


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

* Re: [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0
  2019-12-28 15:37 [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0 Heinrich Schuchardt
@ 2020-07-30  5:28 ` Heinrich Schuchardt
  2020-08-04 11:08 ` [edk2-devel] " Samer El-Haj-Mahmoud
  1 sibling, 0 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2020-07-30  5:28 UTC (permalink / raw)
  To: Eric Jin, G Edhaya Chandran; +Cc: EDK II Development

Hello Eric, hello Edhaya,

probably due to a maintainer change the patch below was missed out.

Could you, please, review and merge it.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2438

Best regards

Heinrich

On 12/28/19 4:37 PM, Heinrich Schuchardt wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2438
>
> The EFI_RNG_PROTOCOL conformance test checks that the size returned by
> GetInfo() is a multiple of 16. This would be fulfilled by size == 0.
>
> The UEFI specification requires that at least one algorithm is implemented.
> So we should check that size is non-zero too.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  .../RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c  | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
> index f0a7c030..cd419d68 100644
> --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c
> @@ -169,7 +169,8 @@ BBTestGetInfoConformanceTestCheckpoint1 (
>      return Status;
>    }
>
> -  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize % sizeof(EFI_RNG_ALGORITHM) == 0) {
> +  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize &&
> +      RNGAlgorithmListSize % sizeof(EFI_RNG_ALGORITHM) == 0) {
>      AssertionType = EFI_TEST_ASSERTION_PASSED;
>    } else {
>      AssertionType = EFI_TEST_ASSERTION_FAILED;
>


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

* Re: [edk2-devel] [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0
  2019-12-28 15:37 [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0 Heinrich Schuchardt
  2020-07-30  5:28 ` Heinrich Schuchardt
@ 2020-08-04 11:08 ` Samer El-Haj-Mahmoud
  2020-08-16 21:40   ` G Edhaya Chandran
  1 sibling, 1 reply; 4+ messages in thread
From: Samer El-Haj-Mahmoud @ 2020-08-04 11:08 UTC (permalink / raw)
  To: devel@edk2.groups.io, xypron.glpk@gmx.de
  Cc: Eric Jin, Supreeth Venkatesh, Samer El-Haj-Mahmoud,
	G Edhaya Chandran

Picking old SCT patches that were missed

Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Heinrich
> Schuchardt via Groups.Io
> Sent: Saturday, December 28, 2019 10:37 AM
> To: EDK II Development <devel@edk2.groups.io>
> Cc: Eric Jin <eric.jin@intel.com>; Supreeth Venkatesh
> <Supreeth.Venkatesh@arm.com>; Heinrich Schuchardt
> <xypron.glpk@gmx.de>
> Subject: [edk2-devel] [edk2-test] [PATCH 1/1] uefi-sct/SctPkg:
> EFI_RNG_PROTOCOL.GetInfo check size != 0
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2438
>
> The EFI_RNG_PROTOCOL conformance test checks that the size returned by
> GetInfo() is a multiple of 16. This would be fulfilled by size == 0.
>
> The UEFI specification requires that at least one algorithm is implemented.
> So we should check that size is non-zero too.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  .../RandomNumber/BlackBoxTest/RandomNumberBBTestConformance.c  |
> 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/Rand
> omNumberBBTestConformance.c b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/Rand
> omNumberBBTestConformance.c
> index f0a7c030..cd419d68 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/Rand
> omNumberBBTestConformance.c
> +++ b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/RandomNumber/BlackBoxTest/Rand
> omNumberBBTestConformance.c
> @@ -169,7 +169,8 @@ BBTestGetInfoConformanceTestCheckpoint1 (
>      return Status;
>
>    }
>
>
>
> -  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize %
> sizeof(EFI_RNG_ALGORITHM) == 0) {
>
> +  if (EFI_BUFFER_TOO_SMALL == Status && RNGAlgorithmListSize &&
>
> +      RNGAlgorithmListSize % sizeof(EFI_RNG_ALGORITHM) == 0) {
>
>      AssertionType = EFI_TEST_ASSERTION_PASSED;
>
>    } else {
>
>      AssertionType = EFI_TEST_ASSERTION_FAILED;
>
> --
> 2.24.1
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#52599): https://edk2.groups.io/g/devel/message/52599
> Mute This Topic: https://groups.io/mt/69304206/1945644
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [samer.el-haj-
> mahmoud@arm.com]
> -=-=-=-=-=-=

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

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

* Re: [edk2-devel] [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0
  2020-08-04 11:08 ` [edk2-devel] " Samer El-Haj-Mahmoud
@ 2020-08-16 21:40   ` G Edhaya Chandran
  0 siblings, 0 replies; 4+ messages in thread
From: G Edhaya Chandran @ 2020-08-16 21:40 UTC (permalink / raw)
  To: Samer El-Haj-Mahmoud, devel

[-- Attachment #1: Type: text/plain, Size: 127 bytes --]

Reviewed-by: G Edhaya Chandran <edhaya.chandran@arm.com>

Upstreamed by Commit-id: fbff897cbb92a2b41579e549d0e5b7794c48cb7a

[-- Attachment #2: Type: text/html, Size: 1073 bytes --]

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

end of thread, other threads:[~2020-08-16 21:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-28 15:37 [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: EFI_RNG_PROTOCOL.GetInfo check size != 0 Heinrich Schuchardt
2020-07-30  5:28 ` Heinrich Schuchardt
2020-08-04 11:08 ` [edk2-devel] " Samer El-Haj-Mahmoud
2020-08-16 21:40   ` G Edhaya Chandran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox