From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=supreeth.venkatesh@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id 8218821B02822 for ; Fri, 12 Oct 2018 01:35:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2BEEDF; Fri, 12 Oct 2018 01:35:27 -0700 (PDT) Received: from [10.6.43.238] (bc-c3-3-14.eu.iaas.arm.com [10.6.43.238]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 495953F5D3; Fri, 12 Oct 2018 01:35:26 -0700 (PDT) To: Eric Jin Cc: Jiaxin Wu , edk2-devel@lists.01.org References: <20181012015256.232-1-eric.jin@intel.com> From: Supreeth Venkatesh Message-ID: <52fa2ae2-1774-9f6c-05ac-8bae9e253f68@arm.com> Date: Fri, 12 Oct 2018 09:35:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181012015256.232-1-eric.jin@intel.com> Subject: Re: [edk2-test][Patch] uefi-sct\SctPkg: Add checkpoint of LocateProtocol() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2018 08:35:27 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Since just migrating over from https://github.com/UEFI/UEFI-SCT/commit/f692ed9f6f88e2a03494454f86906e33f543e2d4 Reviewed-by: Supreeth Venkatesh Don't forget to use forward slashes in commit message, while committing. On 10/12/2018 02:52 AM, Eric Jin wrote: > Clarify return value for NULL pointer in LocateProtocol() API > When input parameter Protocol is NULL, EFI_INVALID_PARAMETER > should be returned. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Jin > Cc: Supreeth Venkatesh > Cc: Jiaxin Wu > --- > .../ProtocolHandlerServices/BlackBoxTest/Guid.c | 8 +++---- > .../ProtocolHandlerServices/BlackBoxTest/Guid.h | 12 ++++------ > .../ProtocolHandlerBBTestConformance.c | 27 +++++++++++++++++++++- > 3 files changed, 35 insertions(+), 12 deletions(-) > > diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.c > index 4069d2f..40927f7 100644 > --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.c > +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.c > @@ -1,7 +1,7 @@ > /** @file > > Copyright 2006 - 2016 Unified EFI, Inc.
> - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -44,7 +44,7 @@ EFI_GUID gConsistencyTestAssertionGuid007 = EFI_TEST_CONSISTENCYTEST_ASSERTION_0 > > EFI_GUID gConsistencyTestAssertionGuid008 = EFI_TEST_CONSISTENCYTEST_ASSERTION_008_GUID; > > -//EFI_GUID gConsistencyTestAssertionGuid009 = EFI_TEST_CONSISTENCYTEST_ASSERTION_009_GUID; > +EFI_GUID gConsistencyTestAssertionGuid009 = EFI_TEST_CONSISTENCYTEST_ASSERTION_009_GUID; > > EFI_GUID gConsistencyTestAssertionGuid010 = EFI_TEST_CONSISTENCYTEST_ASSERTION_010_GUID; > > @@ -70,7 +70,7 @@ EFI_GUID gConsistencyTestAssertionGuid020 = EFI_TEST_CONSISTENCYTEST_ASSERTION_0 > > EFI_GUID gConsistencyTestAssertionGuid021 = EFI_TEST_CONSISTENCYTEST_ASSERTION_021_GUID; > > -EFI_GUID gConsistencyTestAssertionGuid022 = EFI_TEST_CONSISTENCYTEST_ASSERTION_022_GUID; > +//EFI_GUID gConsistencyTestAssertionGuid022 = EFI_TEST_CONSISTENCYTEST_ASSERTION_022_GUID; > > EFI_GUID gConsistencyTestAssertionGuid023 = EFI_TEST_CONSISTENCYTEST_ASSERTION_023_GUID; > > @@ -140,7 +140,7 @@ EFI_GUID gConsistencyTestAssertionGuid055 = EFI_TEST_CONSISTENCYTEST_ASSERTION_0 > > EFI_GUID gConsistencyTestAssertionGuid056 = EFI_TEST_CONSISTENCYTEST_ASSERTION_056_GUID; > > -EFI_GUID gConsistencyTestAssertionGuid057 = EFI_TEST_CONSISTENCYTEST_ASSERTION_057_GUID; > +//EFI_GUID gConsistencyTestAssertionGuid057 = EFI_TEST_CONSISTENCYTEST_ASSERTION_057_GUID; > > EFI_GUID gConsistencyTestAssertionGuid058 = EFI_TEST_CONSISTENCYTEST_ASSERTION_058_GUID; > > diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.h b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.h > index 06fbc80..d42d968 100644 > --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.h > +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/Guid.h > @@ -1,7 +1,7 @@ > /** @file > > Copyright 2006 - 2016 Unified EFI, Inc.
> - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -65,12 +65,10 @@ extern EFI_GUID gConsistencyTestAssertionGuid007; > > extern EFI_GUID gConsistencyTestAssertionGuid008; > > -/* > #define EFI_TEST_CONSISTENCYTEST_ASSERTION_009_GUID \ > { 0xe9712c64, 0x302e, 0x4984, {0x9e, 0xc2, 0xb9, 0x91, 0xd3, 0x5e, 0x2e, 0x11 }} > > extern EFI_GUID gConsistencyTestAssertionGuid009; > -*/ > > #define EFI_TEST_CONSISTENCYTEST_ASSERTION_010_GUID \ > { 0xf7c8a812, 0x97c8, 0x4283, {0xa7, 0x79, 0x9c, 0x3a, 0x0d, 0xf9, 0x9b, 0x44 }} > @@ -131,12 +129,12 @@ extern EFI_GUID gConsistencyTestAssertionGuid020; > { 0x0df6b782, 0xbb9c, 0x40e1, {0x99, 0x31, 0xfa, 0x07, 0xce, 0x4e, 0xf3, 0x2d }} > > extern EFI_GUID gConsistencyTestAssertionGuid021; > - > +/* > #define EFI_TEST_CONSISTENCYTEST_ASSERTION_022_GUID \ > { 0x8508de3d, 0x795d, 0x4833, {0x8c, 0xe2, 0x3c, 0xf9, 0x60, 0x05, 0x50, 0x5b }} > > extern EFI_GUID gConsistencyTestAssertionGuid022; > - > +*/ > #define EFI_TEST_CONSISTENCYTEST_ASSERTION_023_GUID \ > { 0x6cad11b3, 0x9ea5, 0x4d60, {0xb0, 0x6c, 0xaf, 0xf3, 0xfd, 0xef, 0x90, 0x8d }} > > @@ -306,12 +304,12 @@ extern EFI_GUID gConsistencyTestAssertionGuid055; > { 0x357d40b9, 0xa9b0, 0x4462, {0xa4, 0xc7, 0x40, 0xca, 0x18, 0xcb, 0x17, 0x34 }} > > extern EFI_GUID gConsistencyTestAssertionGuid056; > - > +/* > #define EFI_TEST_CONSISTENCYTEST_ASSERTION_057_GUID \ > { 0xf4f96d88, 0x1924, 0x4d35, {0x94, 0xc9, 0x7f, 0x7b, 0x6e, 0x42, 0xc2, 0xd4 }} > > extern EFI_GUID gConsistencyTestAssertionGuid057; > - > +*/ > #define EFI_TEST_CONSISTENCYTEST_ASSERTION_058_GUID \ > { 0x4f733e46, 0xdacb, 0x4f6f, {0x80, 0x2b, 0x05, 0x45, 0x00, 0x3a, 0x6a, 0x64 }} > > diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTestConformance.c > index 98ce893..ec3637d 100644 > --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTestConformance.c > +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/ProtocolHandlerServices/BlackBoxTest/ProtocolHandlerBBTestConformance.c > @@ -1,7 +1,7 @@ > /** @file > > Copyright 2006 - 2016 Unified EFI, Inc.
> - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -2487,6 +2487,31 @@ BBTestLocateProtocolConsistencyTest ( > ); > > // > + // Add a checkpoint from the 1559 > + // If Protocol is NULL, then EFI_INVALID_PARAMETER is returned > + // > + Status = gtBS->LocateProtocol ( > + NULL, > + NULL, > + (VOID **) &TestProtocol2 > + ); > + if (Status == EFI_INVALID_PARAMETER) { > + AssertionType = EFI_TEST_ASSERTION_PASSED; > + } else { > + AssertionType = EFI_TEST_ASSERTION_FAILED; > + } > + StandardLib->RecordAssertion ( > + StandardLib, > + AssertionType, > + gConsistencyTestAssertionGuid009, > + L"BS.LocateProtocol - ConsistencyTestCheckpoint4", > + L"%a:%d:Status - %r", > + __FILE__, > + (UINTN)__LINE__, > + Status > + ); > + > + // > // Checkpoint 2: > // 3.10.2.2 LocateProtocol should not succeed > // with a protocol GUID that was never installed