From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: eric.jin@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Thu, 19 Sep 2019 18:16:32 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2019 18:16:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,526,1559545200"; d="scan'208";a="178231392" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga007.jf.intel.com with ESMTP; 19 Sep 2019 18:16:32 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Sep 2019 18:16:31 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.140]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.32]) with mapi id 14.03.0439.000; Fri, 20 Sep 2019 09:16:30 +0800 From: "Eric Jin" To: "devel@edk2.groups.io" , Tom Zhao CC: Supreeth Venkatesh , "Liu, XianhuiX" Subject: Re: [edk2-devel][edk2-test][PATCH v2 1/1] uefi-sct/SctPkg AdapterInfo SetInformation may return unsupported Thread-Topic: [edk2-devel][edk2-test][PATCH v2 1/1] uefi-sct/SctPkg AdapterInfo SetInformation may return unsupported Thread-Index: AdVvULQMRk/EHQo5RkiYMG/wMzST2A== Date: Fri, 20 Sep 2019 01:16:29 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: eric.jin@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Add [edk2-test] in subject Hi Tom, Revisit the test, it gets the InformationType from GetSupportedTypes(), th= en call SetInformation() with the supported InformationType. In this scenar= io, 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 bet= ter 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 On Behalf Of Eric Jin Sent: Thursday, September 19, 2019 2:17 PM To: Tom Zhao ; devel@edk2.groups.io Cc: Supreeth Venkatesh ; Liu, XianhuiX Subject: Re: [edk2-devel] [PATCH v2 1/1] uefi-sct/SctPkg AdapterInfo SetIn= formation 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.=20 And the test could add EFI_DEVICE_ERROR into acceptable return code. -----Original Message----- From: Tom Zhao =20 Sent: Wednesday, September 18, 2019 4:48 PM To: devel@edk2.groups.io Cc: Jin, Eric ; Supreeth Venkatesh Subject: [PATCH v2 1/1] uefi-sct/SctPkg AdapterInfo SetInformation may ret= urn unsupported If AdapterInfo.SetInformation() is unsupported, it will return EFI_UNSUPPO= RTED. Do not fail the test in this case. Cc: Supreeth Venkatesh Cc: Eric Jin Signed-off-by: Tom Zhao --- Notes: v2: - Change commit message to be closer to similar issues. uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adapt= erInfoBBTestConformance.c | 4 ++-- uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adapt= erInfoBBTestFunction.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adap= terInfoBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adap= terInfoBBTestConformance.c index fb42398e4a97..3dc048db5333 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adap= terInfoBBTestConformance.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adap= terInfoBBTestConformance.c @@ -556,8 +556,8 @@ BBTestSetInformationConformanceTestCheckpoint2 ( NULL, InformationBlockSize ); - - if ( Status !=3D EFI_INVALID_PARAMETER && Status !=3D EFI_WRITE_PROTECTED) { + + if ( Status !=3D EFI_INVALID_PARAMETER && Status !=3D EFI_WRITE_PROTECTED && Status !=3D EFI_UNSUPPORTED) { AssertionType =3D EFI_TEST_ASSERTION_FAILED; } else { AssertionType =3D EFI_TEST_ASSERTION_PASSED; diff --git a/uefi-sc= t/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/AdapterInfoBBT= estFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adap= terInfoBBTestFunction.c index 334bb9edc493..4b054b0ef7d8 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adap= terInfoBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/AdapterInfo/BlackBoxTest/Adap= terInfoBBTestFunction.c @@ -372,11 +372,11 @@ BBTestSetInformationFunctionTestCheckpoint1 ( InformationBlockSize1 ); - if (Status =3D=3D EFI_SUCCESS || Status =3D=3D EFI_WRITE_PROTECTED) - AssertionType =3D EFI_TEST_ASSERTION_PASSED; + if (Status =3D= =3D EFI_SUCCESS || Status =3D=3D EFI_WRITE_PROTECTED || Status =3D=3D EFI_UNS= UPPORTED) + AssertionType =3D EFI_TEST_ASSERTION_PASSED; else - AssertionType =3D EFI_TEST_ASSERTION_FAILED; - + AssertionType =3D EFI_TEST_ASSERTION_FAILED; + StandardLib->RecordAssertion ( StandardLib, AssertionType, -- 2.21.0