public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Eric Jin" <eric.jin@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	Tom Zhao <tzhao@solarflare.com>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
	"Liu, XianhuiX" <xianhuix.liu@intel.com>
Subject: Re: [edk2-devel][edk2-test][PATCH v2 1/1] uefi-sct/SctPkg AdapterInfo SetInformation may return unsupported
Date: Fri, 20 Sep 2019 01:16:29 +0000	[thread overview]
Message-ID: <DA72DC7456565B47808A57108259571F63817944@SHSMSX103.ccr.corp.intel.com> (raw)

Add [edk2-test] in subject

Hi Tom,

Revisit the test, it gets the InformationType from GetSupportedTypes(), then call SetInformation() with the supported InformationType. In this scenario,  the EFI_UNSUPPORTED doesn't make sense. If the adapter doesn't want to support the function SetInformation at all, EFI_WRITE_PROTECTED may be better choice.

Copy the spec description as below.
EFI_WRITE_PROTECTED The InformationType cannot be modified using
EFI_ADAPTER_INFO_SET_INFO()
EFI_UNSUPPORTED The InformationType is not known.

Best Regards
Eric
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Eric Jin
Sent: Thursday, September 19, 2019 2:17 PM
To: Tom Zhao <tzhao@solarflare.com>; devel@edk2.groups.io
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>; Liu, XianhuiX <xianhuix.liu@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 1/1] uefi-sct/SctPkg AdapterInfo SetInformation may return unsupported

EFI_UNSUPPORTED The InformationType is not known.
The description is described as above in UEFI Spec.

In this case, the test gets the InformationType from EFI_ADAPTER_GET_INFO(), so the SetInformationfunction return EFI_UNSUPPORTED doesn't make sense. The reason is not covered by spec at least.

How about to do some basic check in device or return EFI_DEVICE_ERROR. 
And the test could add EFI_DEVICE_ERROR into acceptable return code.

-----Original Message-----
From: Tom Zhao <tzhao@solarflare.com> 
Sent: Wednesday, September 18, 2019 4:48 PM
To: devel@edk2.groups.io
Cc: Jin, Eric <eric.jin@intel.com>; Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Subject: [PATCH v2 1/1] uefi-sct/SctPkg AdapterInfo SetInformation may return unsupported

If AdapterInfo.SetInformation() is unsupported, it will return EFI_UNSUPPORTED. Do not fail the test in this case.

Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Cc: Eric Jin <eric.jin@intel.com>
Signed-off-by: Tom Zhao <tzhao@solarflare.com>
---

Notes:
    v2:
    - Change commit message to be closer to similar issues.

 uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestConformance.c | 4 ++--
 uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestFunction.c    | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git
a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestConformance.c
b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestConformance.c
index fb42398e4a97..3dc048db5333 100644
---
a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestConformance.c
+++
b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestConformance.c
@@ -556,8 +556,8 @@ BBTestSetInformationConformanceTestCheckpoint2 (
                            NULL,
                            InformationBlockSize
                            );
-      -    if ( Status != EFI_INVALID_PARAMETER && Status !=
EFI_WRITE_PROTECTED) {
+
+    if ( Status != EFI_INVALID_PARAMETER && Status !=
EFI_WRITE_PROTECTED && Status != EFI_UNSUPPORTED) {
         AssertionType = EFI_TEST_ASSERTION_FAILED;
     } else {
         AssertionType = EFI_TEST_ASSERTION_PASSED; diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestFunction.c
b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestFunction.c
index 334bb9edc493..4b054b0ef7d8 100644
---
a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestFunction.c
+++
b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBTestFunction.c
@@ -372,11 +372,11 @@ BBTestSetInformationFunctionTestCheckpoint1 (
                              InformationBlockSize1
                              );
 -    if (Status == EFI_SUCCESS || Status ==  EFI_WRITE_PROTECTED)
-      AssertionType = EFI_TEST_ASSERTION_PASSED;  +    if (Status ==
EFI_SUCCESS || Status ==  EFI_WRITE_PROTECTED || Status == EFI_UNSUPPORTED)
+      AssertionType = EFI_TEST_ASSERTION_PASSED;
     else
-      AssertionType = EFI_TEST_ASSERTION_FAILED; -    +
AssertionType = EFI_TEST_ASSERTION_FAILED;
+
     StandardLib->RecordAssertion (
                      StandardLib,
                      AssertionType,
--
2.21.0





                 reply	other threads:[~2019-09-20  1:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=DA72DC7456565B47808A57108259571F63817944@SHSMSX103.ccr.corp.intel.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