Picking old SCT patches that were missed Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@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....@intel.com>; Supreeth Venkatesh > <supreeth.venkat...@arm.com>; Heinrich Schuchardt > <xypron.g...@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.g...@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+ow...@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [samer.el-haj- > mahm...@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. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#63696): https://edk2.groups.io/g/devel/message/63696 Mute This Topic: https://groups.io/mt/69304206/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-