From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.5030.1570758776030821756 for ; Thu, 10 Oct 2019 18:52:56 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: eric.jin@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2019 18:52:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,282,1566889200"; d="scan'208";a="200646855" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 10 Oct 2019 18:52:55 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 10 Oct 2019 18:52:54 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 10 Oct 2019 18:52:54 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.165]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.225]) with mapi id 14.03.0439.000; Fri, 11 Oct 2019 09:52:52 +0800 From: "Eric Jin" To: "devel@edk2.groups.io" , "Jin, Eric" , "Liu, XianhuiX" CC: Heinrich Schuchardt , Supreeth Venkatesh Subject: Re: [edk2-devel] [edk2-test][Patch v2] uefi-sct/SctPkg: Sync SNP Statistics change to IHV Thread-Topic: [edk2-devel] [edk2-test][Patch v2] uefi-sct/SctPkg: Sync SNP Statistics change to IHV Thread-Index: AQHVfxHT4lj/yfUWK0WBRs2TODFgsadTJ6DQgAGHUfA= Date: Fri, 11 Oct 2019 01:52:51 +0000 Message-ID: References: <20191010022409.6540-1-xianhuix.liu@intel.com> <15CC285E18CC0426.26504@groups.io> In-Reply-To: <15CC285E18CC0426.26504@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 4a3165b8afa563eca1fc0ca93c1a849207a38c8b -----Original Message----- From: devel@edk2.groups.io On Behalf Of Eric Jin Sent: Thursday, October 10, 2019 10:33 AM To: Liu, XianhuiX ; devel@edk2.groups.io Cc: Heinrich Schuchardt ; Supreeth Venkatesh Subject: Re: [edk2-devel] [edk2-test][Patch v2] uefi-sct/SctPkg: Sync SNP = Statistics change to IHV Reviewed-by: Eric Jin > -----Original Message----- > From: Liu, XianhuiX > Sent: Thursday, October 10, 2019 10:24 AM > To: devel@edk2.groups.io > Cc: Heinrich Schuchardt ; Supreeth Venkatesh=20 > ; Jin, Eric ; Liu,=20 > XianhuiX > Subject: [edk2-test][Patch v2] uefi-sct/SctPkg: Sync SNP Statistics=20 > change to IHV >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2160 > sync commit 269f8a35e44f2093625b3671f372f68e2983c49d > on file EFI/Protocol/SimpleNetwork/BlackBoxTest > /SimpleNetworkBBTestConformance.c to IHV >=20 > Cc: Heinrich Schuchardt > Cc: Supreeth Venkatesh > Cc: Eric Jin >=20 > Signed-off-by: xianhui liu > --- > .../BlackBoxTest/SimpleNetworkBBTestConformance.c | 125 > ++++++++++++--------- > 1 file changed, 73 insertions(+), 52 deletions(-) >=20 > diff --git a/uefi- > sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxTest/Simpl > eNetworkBBTestConformance.c b/uefi- > sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxTest/Simpl > eNetworkBBTestConformance.c > index 9d5bec18..c758f560 100644 > --- a/uefi- > sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxTest/Simpl > eNetworkBBTestConformance.c > +++ b/uefi- > sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxT > +++ est/SimpleNetworkBBTestConformance.c > @@ -1,7 +1,7 @@ > /** @file >=20 > Copyright 2006 - 2016 Unified EFI, Inc.
> - Copyright (c) 2010 - 2018, Intel Corporation. All rights=20 > reserved.
> + Copyright (c) 2010 - 2019, Intel Corporation. All rights=20 > + reserved.
>=20 > This program and the accompanying materials > are licensed and made available under the terms and conditions of=20 > the BSD License @@ -964,8 +964,7 @@ BBTestStatisticsConformanceTest ( { > EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib; > EFI_STATUS Status; > - EFI_STATUS StatusBuf[3]; > - EFI_TEST_ASSERTION AssertionType[3]; > + EFI_TEST_ASSERTION AssertionType; > EFI_SIMPLE_NETWORK_PROTOCOL *SnpInterface; > EFI_SIMPLE_NETWORK_STATE State1, State2; > EFI_NETWORK_STATISTICS StatisticsTable; > @@ -1012,31 +1011,68 @@ BBTestStatisticsConformanceTest ( > StatisticsSize =3D sizeof (EFI_NETWORK_STATISTICS); > // > // Assertion Point 5.8.2.1 > - // Call Statistics() function if network interface not start. > + // Call Statistics() function while network interface is not started. > // > - StatusBuf[0] =3D SnpInterface->Statistics (SnpInterface, FALSE,=20 > &StatisticsSize, &StatisticsTable); > - if ((StatusBuf[0] =3D=3D EFI_NOT_STARTED) && (SnpInterface->Mode->Sta= te=20 > =3D=3D EfiSimpleNetworkStopped)) { > - AssertionType[0] =3D EFI_TEST_ASSERTION_PASSED; > + Status =3D SnpInterface->Statistics (SnpInterface, FALSE,=20 > + &StatisticsSize, &StatisticsTable); if (Status =3D=3D EFI_UNSUPPORTED= ) { > + StandardLib->RecordMessage( > + StandardLib, > + EFI_VERBOSE_LEVEL_QUIET, > + L"Statistics isn't supported, Status - %r\n", > + Status > + ); > } else { > - AssertionType[0] =3D EFI_TEST_ASSERTION_FAILED; > + if ((Status =3D=3D EFI_NOT_STARTED) && (SnpInterface->Mode->State = =3D=3D > EfiSimpleNetworkStopped)) { > + AssertionType =3D EFI_TEST_ASSERTION_PASSED; > + } else { > + AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + } > + StandardLib->RecordAssertion ( > + StandardLib, > + AssertionType, > + gSimpleNetworkBBTestConformanceAssertionGuid014, > + L"EFI_SIMPLE_NETWORK_PROTOCOL.Statistics - Invoke=20 > + Statistics() > while network interface not started.", > + L"%a:%d:Status - %r", > + __FILE__, > + (UINTN)__LINE__, > + Status > + ); > } >=20 > // > // Assertion Point 5.8.2.2 > - // Call Statistics() function if network interface not initialized. > + // Call Statistics() function while network interface is not initiali= zed. > // > Status =3D SnpInterface->Start (SnpInterface); > if (EFI_ERROR(Status)) { > return Status; > } >=20 > - StatusBuf[1] =3D SnpInterface->Statistics (SnpInterface, FALSE,=20 > &StatisticsSize, &StatisticsTable); > - if (StatusBuf[1] =3D=3D EFI_DEVICE_ERROR) { > - AssertionType[1] =3D EFI_TEST_ASSERTION_PASSED; > + Status =3D SnpInterface->Statistics (SnpInterface, FALSE,=20 > + &StatisticsSize, &StatisticsTable); if (Status =3D=3D EFI_UNSUPPORTED= ) { > + StandardLib->RecordMessage( > + StandardLib, > + EFI_VERBOSE_LEVEL_QUIET, > + L"Statistics isn't supported, Status - %r\n", > + Status > + ); > } else { > - AssertionType[1] =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; > + } > + StandardLib->RecordAssertion ( > + StandardLib, > + AssertionType, > + gSimpleNetworkBBTestConformanceAssertionGuid015, > + L"EFI_SIMPLE_NETWORK_PROTOCOL.Statistics - Invoke=20 > + Statistics() > while network interface is not initialized.", > + L"%a:%d:Status - %r", > + __FILE__, > + (UINTN)__LINE__, > + Status > + ); > } > - >=20 > // > // Assertion Point 5.8.2.3 > @@ -1053,47 +1089,32 @@ BBTestStatisticsConformanceTest ( > // > StatisticsSize =3D 0; >=20 > - StatusBuf[2] =3D SnpInterface->Statistics (SnpInterface, FALSE,=20 > &StatisticsSize, &StatisticsTable); > - if (StatusBuf[2] =3D=3D EFI_BUFFER_TOO_SMALL || Status =3D=3D > EFI_UNSUPPORTED) { > - AssertionType[2] =3D EFI_TEST_ASSERTION_PASSED; > + Status =3D SnpInterface->Statistics (SnpInterface, FALSE,=20 > + &StatisticsSize, &StatisticsTable); if (Status =3D=3D EFI_UNSUPPORTED= ) { > + StandardLib->RecordMessage( > + StandardLib, > + EFI_VERBOSE_LEVEL_QUIET, > + L"Statistics isn't supported, Status - %r\n", > + Status > + ); > } else { > - AssertionType[2] =3D EFI_TEST_ASSERTION_FAILED; > + if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { > + AssertionType =3D EFI_TEST_ASSERTION_PASSED; > + } else { > + AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + } > + StandardLib->RecordAssertion ( > + StandardLib, > + AssertionType, > + gSimpleNetworkBBTestConformanceAssertionGuid017, > + L"EFI_SIMPLE_NETWORK_PROTOCOL.Statistics - Invoke=20 > + Statistics() > with small buffer.", > + L"%a:%d:Status - %r", > + __FILE__, > + (UINTN)__LINE__, > + Status > + ); > } >=20 > - > - StandardLib->RecordAssertion ( > - StandardLib, > - AssertionType[0], > - gSimpleNetworkBBTestConformanceAssertionGuid014, > - L"EFI_SIMPLE_NETWORK_PROTOCOL.Statistics - Invoke Stat= istics() > when network interface not start.", > - L"%a:%d:Status - %r", > - __FILE__, > - (UINTN)__LINE__, > - StatusBuf[0] > - ); > - > - StandardLib->RecordAssertion ( > - StandardLib, > - AssertionType[1], > - gSimpleNetworkBBTestConformanceAssertionGuid015, > - L"EFI_SIMPLE_NETWORK_PROTOCOL.Statistics - Invoke Stat= istics() > when network interface not initialized.", > - L"%a:%d:Status - %r", > - __FILE__, > - (UINTN)__LINE__, > - StatusBuf[1] > - ); > - > - StandardLib->RecordAssertion ( > - StandardLib, > - AssertionType[2], > - gSimpleNetworkBBTestConformanceAssertionGuid017, > - L"EFI_SIMPLE_NETWORK_PROTOCOL.Statistics - Invoke Stat= istics() > with small buffer.", > - L"%a:%d:Status - %r", > - __FILE__, > - (UINTN)__LINE__, > - StatusBuf[2] > - ); > - > // > // Restore SNP State > // > -- > 2.14.1.windows.1