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.120, mailfrom: eric.jin@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Tue, 08 Oct 2019 01:39:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2019 01:39:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,270,1566889200"; d="scan'208";a="192521146" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga008.fm.intel.com with ESMTP; 08 Oct 2019 01:39:01 -0700 Received: from fmsmsx162.amr.corp.intel.com (10.18.125.71) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 8 Oct 2019 01:39:01 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx162.amr.corp.intel.com (10.18.125.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 8 Oct 2019 01:39:00 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.165]) by SHSMSX153.ccr.corp.intel.com ([10.239.6.53]) with mapi id 14.03.0439.000; Tue, 8 Oct 2019 16:38:59 +0800 From: "Eric Jin" To: "devel@edk2.groups.io" , Heinrich Schuchardt CC: Supreeth Venkatesh , Stephano Cetola Subject: Re: [edk2-devel][edk2-test][PATCH 1/1] uefi-sct/SctPkg: SNP ReceiveFilters may be unsupported Thread-Topic: [edk2-devel][edk2-test][PATCH 1/1] uefi-sct/SctPkg: SNP ReceiveFilters may be unsupported Thread-Index: AdV3W+vPNziA54ZtS2q/BVX/sbzeTQGV9jlg Date: Tue, 8 Oct 2019 08:38:58 +0000 Message-ID: References: <15C924F1209A99C8.24572@groups.io> In-Reply-To: <15C924F1209A99C8.24572@groups.io> 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 Push at 3d98de052fcd47f187190802e6201ac6aaabfda7 -----Original Message----- From: devel@edk2.groups.io On Behalf Of Eric Jin Sent: Monday, September 30, 2019 2:56 PM To: Heinrich Schuchardt ; EDK II Development Cc: Supreeth Venkatesh ; Stephano Cetola Subject: Re: [edk2-devel][edk2-test][PATCH 1/1] uefi-sct/SctPkg: SNP Recei= veFilters may be unsupported Add [edk2-test] in subject Reviewed-by: Eric Jin -----Original Message----- From: Heinrich Schuchardt =20 Sent: Tuesday, September 17, 2019 1:10 PM To: EDK II Development Cc: Jin, Eric ; Supreeth Venkatesh ; Stephano Cetola ; Heinrich Schu= chardt Subject: [edk2-devel] [PATCH 1/1] uefi-sct/SctPkg: SNP ReceiveFilters may = be unsupported REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2197 If EFI_SIMPLE_NETWORK.ReceiveFilters() is not supported, it will return EF= I_UNSUPPORTED. In this case do not expect input parameters to be checked fo= r conformance. Signed-off-by: Heinrich Schuchardt --- .../SimpleNetworkBBTestConformance.c | 223 +++++++++++------- 1 file changed, 138 insertions(+), 85 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/Blac= kBoxTest/SimpleNetworkBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/E= FI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c index 9bd21a76..09b47ee6 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTes= t/SimpleNetworkBBTestConformance.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxT +++ est/SimpleNetworkBBTestConformance.c @@ -626,22 +626,31 @@ BBTestReceiveFilterConformanceTest ( // Call ReceiveFilters() function if network interface not start. // = Status =3D SnpInterface->ReceiveFilters (SnpInterface, 0, 0, FALSE, 0, NU= LL);- if ((Status =3D=3D EFI_NOT_STARTED) && (SnpInterface->Mode->State = =3D=3D EfiSimpleNetworkStopped)) {- AssertionType =3D EFI_TEST_ASSERTIO= N_PASSED;+ if (Status =3D=3D EFI_UNSUPPORTED) {+ StandardLib->RecordMes= sage(+ StandardLib,+ EFI_VERBOSE_LEVEL_= QUIET,+ L"ReceiveFilters isn't supported, Status - %r\n",= + Status+ ); } else {- AssertionTy= pe =3D EFI_TEST_ASSERTION_FAILED;- }+ if ((Status =3D=3D EFI_NOT_STARTE= D) && (SnpInterface->Mode->State =3D=3D EfiSimpleNetworkStopped)) {+ A= ssertionType =3D EFI_TEST_ASSERTION_PASSED;+ } else {+ AssertionTyp= e =3D EFI_TEST_ASSERTION_FAILED;+ } - StandardLib->RecordAssertion (- = StandardLib,- AssertionType,- = gSimpleNetworkBBTestConformanceAssertionGuid006,- L"EFI_S= IMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() when networ= k interface not start.",- L"%a:%d:Status - %r",- = __FILE__,- (UINTN)__LINE__,- Status- = );+ StandardLib->RecordAssertion (+ St= andardLib,+ AssertionType,+ gSimpleNetw= orkBBTestConformanceAssertionGuid006,+ L"EFI_SIMPLE_NETWO= RK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() when network interface= not start.",+ L"%a:%d:Status - %r",+ _= _FILE__,+ (UINTN)__LINE__,+ Status+ = );+ } // // Assertion Point 5.6.2.2@@ -653,22 +662,31 = @@ BBTestReceiveFilterConformanceTest ( } Status =3D SnpInterface->ReceiveFilters (SnpInterface, 0, 0, FALSE= , 0, NULL);- if (Status =3D=3D EFI_DEVICE_ERROR) {- AssertionType =3D E= FI_TEST_ASSERTION_PASSED;+ if (Status =3D=3D EFI_UNSUPPORTED) {+ Standa= rdLib->RecordMessage(+ StandardLib,+ EF= I_VERBOSE_LEVEL_QUIET,+ L"ReceiveFilters isn't supported,= Status - %r\n",+ Status+ ); } else {= - AssertionType =3D EFI_TEST_ASSERTION_FAILED;- }+ if (Status =3D=3D= EFI_DEVICE_ERROR) {+ AssertionType =3D EFI_TEST_ASSERTION_PASSED;+ = } else {+ AssertionType =3D EFI_TEST_ASSERTION_FAILED;+ } - Stand= ardLib->RecordAssertion (- StandardLib,- As= sertionType,- gSimpleNetworkBBTestConformanceAssertionGuid0= 07,- L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke = ReceiveFilters() when network interface not initialized.",- = L"%a:%d:Status - %r",- __FILE__,- (UINTN)_= _LINE__,- Status- );+ StandardLib->Recor= dAssertion (+ StandardLib,+ AssertionTy= pe,+ gSimpleNetworkBBTestConformanceAssertionGuid007,+ = L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke Recei= veFilters() when network interface not initialized.",+ L"= %a:%d:Status - %r",+ __FILE__,+ (UINTN)= __LINE__,+ Status+ );+ } // // As= sertion Point 5.6.2.3@@ -683,22 +701,31 @@ BBTestReceiveFilterConformanceTe= st ( // Call ReceiveFilters with invalide Enable // Status =3D SnpInter= face->ReceiveFilters (SnpInterface, ~(SnpInterface->Mode->ReceiveFilterMask= ), 0, FALSE, 0, NULL);- if (Status =3D=3D EFI_INVALID_PARAMETER) {- Ass= ertionType =3D EFI_TEST_ASSERTION_PASSED;+ if (Status =3D=3D EFI_UNSUPPORT= ED) {+ StandardLib->RecordMessage(+ StandardLib,+ = EFI_VERBOSE_LEVEL_QUIET,+ L"ReceiveFilters = isn't supported, Status - %r\n",+ Status+ = ); } else {- AssertionType =3D EFI_TEST_ASSERTION_FAILED;- }+ i= f (Status =3D=3D EFI_INVALID_PARAMETER) {+ AssertionType =3D EFI_TEST_= ASSERTION_PASSED;+ } else {+ AssertionType =3D EFI_TEST_ASSERTION_F= AILED;+ } - StandardLib->RecordAssertion (- StandardLib= ,- AssertionType,- gSimpleNetworkBBTestConf= ormanceAssertionGuid008,- L"EFI_SIMPLE_NETWORK_PROTOCOL.Rec= eiveFilters - Invoke ReceiveFilters() with invalid Enable.",- = L"%a:%d:Status - %r",- __FILE__,- (UINTN= )__LINE__,- Status- ); + StandardLib->R= ecordAssertion (+ StandardLib,+ Asserti= onType,+ gSimpleNetworkBBTestConformanceAssertionGuid008,= + L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke R= eceiveFilters() with invalid Enable.",+ L"%a:%d:Status - = %r",+ __FILE__,+ (UINTN)__LINE__,+ = Status+ );+ } // // Call ReceiveFilt= ers with invalide MCastFilterCnt@@ -713,59 +740,85 @@ BBTestReceiveFilterCo= nformanceTest ( MAC.Addr[5] =3D 0x02; Status =3D SnpInterface->ReceiveFilters (S= npInterface, EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST, 0, FALSE, SnpInterface->= Mode->MaxMCastFilterCount + 1, &MAC);- if (Status =3D=3D EFI_INVALID_PAR= AMETER) {- AssertionType =3D EFI_TEST_ASSERTION_PASSED;+ if (Status= =3D=3D EFI_UNSUPPORTED) {+ StandardLib->RecordMessage(+ = StandardLib,+ EFI_VERBOSE_LEVEL_QUIET,+ = L"ReceiveFilters isn't supported, Status - %r\n",+ = Status+ ); } else {- AssertionType =3D= EFI_TEST_ASSERTION_FAILED;+ if (Status =3D=3D EFI_INVALID_PARAMETER) = {+ AssertionType =3D EFI_TEST_ASSERTION_PASSED;+ } else {+ = AssertionType =3D EFI_TEST_ASSERTION_FAILED;+ }++ StandardLib-= >RecordAssertion (+ StandardLib,+ A= ssertionType,+ gSimpleNetworkBBTestConformanceAssertion= Guid009,+ L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters = - Invoke ReceiveFilters() with invalid MCastFilterCnt is greater than Snp->= Mode->MaxMCastFilterCount.",+ L"%a:%d:Status - %r",+ = __FILE__,+ (UINTN)__LINE__,+ = Status+ ); } - StandardLib->RecordAs= sertion (- StandardLib,- AssertionType,= - gSimpleNetworkBBTestConformanceAssertionGuid009,- = L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveF= ilters() with invalid MCastFilterCnt is greater than Snp->Mode->MaxMCastFil= terCount.",- L"%a:%d:Status - %r",- __F= ILE__,- (UINTN)__LINE__,- Status- = );- Status =3D SnpInterface->ReceiveFilters (SnpInterface,= EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST, 0, FALSE, 0, &MAC);- if (Status = =3D=3D EFI_INVALID_PARAMETER) {- AssertionType =3D EFI_TEST_ASSERTION= _PASSED;+ if (Status =3D=3D EFI_UNSUPPORTED) {+ StandardLib->Record= Message(+ StandardLib,+ EFI_VERBOSE= _LEVEL_QUIET,+ L"ReceiveFilters isn't supported, Status= - %r\n",+ Status+ ); } else {-= AssertionType =3D EFI_TEST_ASSERTION_FAILED;+ if (Status =3D=3D = EFI_INVALID_PARAMETER) {+ AssertionType =3D EFI_TEST_ASSERTION_PASSE= D;+ } else {+ AssertionType =3D EFI_TEST_ASSERTION_FAILED;+ = }++ StandardLib->RecordAssertion (+ StandardLib,= + AssertionType,+ gSimpleNetworkBBT= estConformanceAssertionGuid043,+ L"EFI_SIMPLE_NETWORK_P= ROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with invalid MCastFilterCn= t is 0.",+ L"%a:%d:Status - %r",+ _= _FILE__,+ (UINTN)__LINE__,+ Status+= ); } - StandardLib->RecordAssertion (- = StandardLib,- AssertionType,- = gSimpleNetworkBBTestConformanceAssertionGuid043,- L"EFI_= SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with inval= id MCastFilterCnt is 0.",- L"%a:%d:Status - %r",- = __FILE__,- (UINTN)__LINE__,- = Status- );- Status =3D SnpInterface->ReceiveFilters = (SnpInterface, EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST, 0, FALSE, 1, NULL);- = if (Status =3D=3D EFI_INVALID_PARAMETER) {- AssertionType =3D EFI_TE= ST_ASSERTION_PASSED;+ if (Status =3D=3D EFI_UNSUPPORTED) {+ Standar= dLib->RecordMessage(+ StandardLib,+ = EFI_VERBOSE_LEVEL_QUIET,+ L"ReceiveFilters isn't suppo= rted, Status - %r\n",+ Status+ ); = } else {- AssertionType =3D EFI_TEST_ASSERTION_FAILED;+ if (St= atus =3D=3D EFI_INVALID_PARAMETER) {+ AssertionType =3D EFI_TEST_ASS= ERTION_PASSED;+ } else {+ AssertionType =3D EFI_TEST_ASSERTION_= FAILED;+ }++ StandardLib->RecordAssertion (+ = StandardLib,+ AssertionType,+ = gSimpleNetworkBBTestConformanceAssertionGuid010,+ L"= EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with M= CastFilterCnt not match MCastFilter.",+ L"%a:%d:Statu= s - %r",+ __FILE__,+ (UINTN)__L= INE__,+ Status+ ); }-- S= tandardLib->RecordAssertion (- StandardLib,- = AssertionType,- gSimpleNetworkBBTestConformanceAsse= rtionGuid010,- L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilte= rs - Invoke ReceiveFilters() with MCastFilterCnt not match MCastFilter.",- = L"%a:%d:Status - %r",- __FILE__,- = (UINTN)__LINE__,- Status- = );- } //--=20 2.23.0