From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7F1F47803CC for ; Thu, 21 Sep 2023 19:03:17 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=H6whOFZ2XAr4L1BqzmhC0c6toScUvL9P1UjqFWU1B/c=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:References:From:Cc:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1695322996; v=1; b=rLnpT8dQTAeA2VRsJ4T1yKdSYZ4GqnkuEKAvZ5aQl/eGLm8zYsC/MauqJs3u3NDqJa3ZMsmp jPY+9GGVQuE8fyS20Sv0BQvliQ4t7kIicYD6/5RkiWp2O/I/D1e0j9dXEjY5TBeCW7JW8zNb70N w7Qk5YMi181gdPo3OcWb/C5A= X-Received: by 127.0.0.2 with SMTP id HGPtYY7687511x8dgDzDHN3d; Thu, 21 Sep 2023 12:03:16 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4416.1695322995510987072 for ; Thu, 21 Sep 2023 12:03:15 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 43CC51007; Thu, 21 Sep 2023 12:03:52 -0700 (PDT) X-Received: from [10.118.106.172] (C02F85CGML7H.austin.arm.com [10.118.106.172]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 08B543F67D; Thu, 21 Sep 2023 12:03:15 -0700 (PDT) Message-ID: Date: Thu, 21 Sep 2023 14:03:14 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [edk2-devel] [PATCH v2 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test To: devel@edk2.groups.io, Abhi.Singh@arm.com References: <20230921163748.275971-1-Abhi.Singh@arm.com> <20230921163748.275971-3-Abhi.Singh@arm.com> From: "Stuart Yoder" Cc: G Edhaya Chandran , Barton Gao , Carolyn Gjertsen In-Reply-To: <20230921163748.275971-3-Abhi.Singh@arm.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,stuart.yoder@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: KtYMzek2oNMgD1nYNkOTk6QAx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=rLnpT8dQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io See inline comments... On 9/21/23 11:37 AM, Abhimanyu Singh via groups.io wrote: > SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4374 >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4419 >=20 > -Implement MemoryOverwriteRequestControlSetVariable test cases > -Add Assertions 5, 6, 7, and 8 from SCT spec > -Add Test Case to MemoryOverwriteRequestFunctionTest >=20 > Cc: G Edhaya Chandran > Cc: Barton Gao > Cc: Carolyn Gjertsen > Signed-off-by: Abhi Singh > Change-Id: I21ed8d6613c7b9d20560b8fa4a45632008d756f9 > --- [cut] > +/** > + * MemoryOverwriteRequestControl EFI variable SetVariable() requests wi= th a single invalid parameter > + * @param StandardLib A pointer to EFI_STANDARD_TEST_LIBRARY_PROTOCO= L > + * instance. > + * @param RecoveryLib A pointer to EFI_TEST_RECOVERY_LIBRARY_PROTOCO= L > + * instance. > + * @return EFI_SUCCESS Successfully. > + * @return Other value Something failed. > + */ > +EFI_STATUS > +TCGMemoryOverwriteRequestControlSetVariable ( > + IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib, > + IN EFI_TEST_RECOVERY_LIBRARY_PROTOCOL *RecoveryLib, > + IN RESET_DATA *ResetData > + ) > +{ > + EFI_STATUS Status; > + EFI_TEST_ASSERTION Result; > + UINTN DataSize; > + UINT8 MemoryOverwriteRequestControlData= ; > + UINT8 MemoryOverwriteRequestControlData= Cached; > + UINT32 Attributes; > + > + // > + // Write reset record to initiate checkpoint LOCK_SET_VARIABLE_TEST af= ter these assertions are complete > + // > + ResetData->Step =3D 0; > + ResetData->CheckpointStep =3D LOCK_SET_VARIABLE_TEST; > + > + Status =3D RecoveryLib->WriteResetRecord ( > + RecoveryLib, > + sizeof (RESET_DATA), > + (UINT8*)ResetData > + ); > + if (EFI_ERROR(Status)) { > + StandardLib->RecordAssertion ( > + StandardLib, > + EFI_TEST_ASSERTION_FAILED, > + gTestGenericFailureGuid, > + L"TestRecoveryLib - WriteResetRecord", > + L"%a:%d:Status - %r", > + __FILE__, > + (UINTN)__LINE__, > + Status > + ); > + return Status; > + } > + > + // > + //MOR SetVariable() with invalid DataSize =3D=3D 0 returns EFI_INVALID= _PARAMETER and value is unchanged > + //using GetVariable() before and after SetVariable() to compare values= of the data > + // Nit- space after comment char. Thanks, Stuart -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108963): https://edk2.groups.io/g/devel/message/108963 Mute This Topic: https://groups.io/mt/101504338/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-