public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Stuart Yoder" <stuart.yoder@arm.com>
To: devel@edk2.groups.io, Abhi.Singh@arm.com
Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>,
	Barton Gao <gaojie@byosoft.com.cn>,
	Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>
Subject: Re: [edk2-devel] [PATCH v2 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test
Date: Thu, 21 Sep 2023 14:03:14 -0500	[thread overview]
Message-ID: <a1b0321b-f919-03ed-63bd-e7338db05f11@arm.com> (raw)
In-Reply-To: <20230921163748.275971-3-Abhi.Singh@arm.com>

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=4374
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419
> 
> -Implement MemoryOverwriteRequestControlSetVariable test cases
>   -Add Assertions 5, 6, 7, and 8 from SCT spec
>   -Add Test Case to MemoryOverwriteRequestFunctionTest
> 
> Cc: G Edhaya Chandran <Edhaya.Chandran@arm.com>
> Cc: Barton Gao <gaojie@byosoft.com.cn>
> Cc: Carolyn Gjertsen <Carolyn.Gjertsen@amd.com>
> Signed-off-by: Abhi Singh <Abhi.Singh@arm.com>
> Change-Id: I21ed8d6613c7b9d20560b8fa4a45632008d756f9
> ---

[cut]

> +/**
> + *  MemoryOverwriteRequestControl EFI variable SetVariable() requests with a single invalid parameter
> + *  @param StandardLib    A pointer to EFI_STANDARD_TEST_LIBRARY_PROTOCOL
> + *                        instance.
> + *  @param RecoveryLib    A pointer to EFI_TEST_RECOVERY_LIBRARY_PROTOCOL
> + *                        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                                MemoryOverwriteRequestControlDataCached;
> +  UINT32                               Attributes;
> +
> +  //
> +  // Write reset record to initiate checkpoint LOCK_SET_VARIABLE_TEST after these assertions are complete
> +  //
> +  ResetData->Step = 0;
> +  ResetData->CheckpointStep = LOCK_SET_VARIABLE_TEST;
> +
> +  Status = 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 == 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


-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-09-21 19:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-21 16:37 [edk2-devel] [PATCH v2 0/6] RESEND: TCG MemoryOverwriteRequest Tests Abhimanyu Singh
2023-09-21 16:37 ` [edk2-devel] [PATCH v2 1/6] uefi-sct/SctPkg: TCG Platform Reset Check Test Abhimanyu Singh
2023-09-21 16:37 ` [edk2-devel] [PATCH v2 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test Abhimanyu Singh
2023-09-21 19:03   ` Stuart Yoder [this message]
2023-09-21 16:37 ` [edk2-devel] [PATCH v2 3/6] uefi-sct/SctPkg: TCG MORLOCK " Abhimanyu Singh
2023-09-21 19:03   ` Stuart Yoder
2023-09-21 16:37 ` [edk2-devel] [PATCH v2 4/6] uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test Abhimanyu Singh
2023-09-21 19:03   ` Stuart Yoder
2023-09-21 16:37 ` [edk2-devel] [PATCH v2 5/6] uefi-sct/SctPkg: TCG MORLOCK Locked No Key " Abhimanyu Singh
2023-09-21 19:03   ` Stuart Yoder
2023-09-21 16:37 ` [edk2-devel] [PATCH v2 6/6] uefi-sct/SctPkg: TCG MORLOCK Locked with " Abhimanyu Singh
2023-09-21 19:03   ` Stuart Yoder
2023-09-21 19:03 ` [edk2-devel] [PATCH v2 0/6] RESEND: TCG MemoryOverwriteRequest Tests Stuart Yoder
  -- strict thread matches above, loose matches on Subject: below --
2023-08-23  2:09 [edk2-devel] [PATCH v2 0/6] " Abhimanyu Singh
2023-08-23  2:09 ` [edk2-devel] [PATCH v2 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test Abhimanyu Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1b0321b-f919-03ed-63bd-e7338db05f11@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox