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>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
	Stephano Cetola <stephano.cetola@linux.intel.com>
Subject: Re: [edk2-devel][edk2-test][PATCH 1/1] uefi-sct/SctPkg: SNP ReceiveFilters may be unsupported
Date: Tue, 8 Oct 2019 08:38:58 +0000	[thread overview]
Message-ID: <DA72DC7456565B47808A57108259571F63827EC5@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <15C924F1209A99C8.24572@groups.io>

Push at 3d98de052fcd47f187190802e6201ac6aaabfda7

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Eric Jin
Sent: Monday, September 30, 2019 2:56 PM
To: Heinrich Schuchardt <xypron.glpk@gmx.de>; EDK II Development <devel@edk2.groups.io>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>; Stephano Cetola <stephano.cetola@linux.intel.com>
Subject: Re: [edk2-devel][edk2-test][PATCH 1/1] uefi-sct/SctPkg: SNP ReceiveFilters may be unsupported

Add [edk2-test] in subject
Reviewed-by: Eric Jin <eric.jin@intel.com>

-----Original Message-----
From: Heinrich Schuchardt <xypron.glpk@gmx.de> 
Sent: Tuesday, September 17, 2019 1:10 PM
To: EDK II Development <devel@edk2.groups.io>
Cc: Jin, Eric <eric.jin@intel.com>; Supreeth Venkatesh <supreeth.venkatesh@arm.com>; Stephano Cetola <stephano.cetola@linux.intel.com>; Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: [edk2-devel] [PATCH 1/1] uefi-sct/SctPkg: SNP ReceiveFilters may be unsupported

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2197

If EFI_SIMPLE_NETWORK.ReceiveFilters() is not supported, it will return EFI_UNSUPPORTED. In this case do not expect input parameters to be checked for conformance.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 .../SimpleNetworkBBTestConformance.c          | 223 +++++++++++-------
 1 file changed, 138 insertions(+), 85 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
index 9bd21a76..09b47ee6 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/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 = SnpInterface->ReceiveFilters (SnpInterface, 0, 0, FALSE, 0, NULL);-  if ((Status == EFI_NOT_STARTED) && (SnpInterface->Mode->State == EfiSimpleNetworkStopped)) {-    AssertionType = EFI_TEST_ASSERTION_PASSED;+  if (Status == EFI_UNSUPPORTED) {+    StandardLib->RecordMessage(+                   StandardLib,+                   EFI_VERBOSE_LEVEL_QUIET,+                   L"ReceiveFilters isn't supported, Status - %r\n",+                   Status+                   );   } else {-    AssertionType = EFI_TEST_ASSERTION_FAILED;-  }+    if ((Status == EFI_NOT_STARTED) && (SnpInterface->Mode->State == EfiSimpleNetworkStopped)) {+      AssertionType = EFI_TEST_ASSERTION_PASSED;+    } else {+      AssertionType = EFI_TEST_ASSERTION_FAILED;+    } -  StandardLib->RecordAssertion (-                 StandardLib,-                 AssertionType,-                 gSimpleNetworkBBTestConformanceAssertionGuid006,-                 L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() when network interface not start.",-                 L"%a:%d:Status - %r",-                 __FILE__,-                 (UINTN)__LINE__,-                 Status-                 );+    StandardLib->RecordAssertion (+                   StandardLib,+                   AssertionType,+                   gSimpleNetworkBBTestConformanceAssertionGuid006,+                   L"EFI_SIMPLE_NETWORK_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 = SnpInterface->ReceiveFilters (SnpInterface, 0, 0, FALSE, 0, NULL);-  if (Status == EFI_DEVICE_ERROR) {-    AssertionType = EFI_TEST_ASSERTION_PASSED;+  if (Status == EFI_UNSUPPORTED) {+    StandardLib->RecordMessage(+                   StandardLib,+                   EFI_VERBOSE_LEVEL_QUIET,+                   L"ReceiveFilters isn't supported, Status - %r\n",+                   Status+                   );   } else {-    AssertionType = EFI_TEST_ASSERTION_FAILED;-  }+    if (Status == EFI_DEVICE_ERROR) {+      AssertionType = EFI_TEST_ASSERTION_PASSED;+    } else {+      AssertionType = EFI_TEST_ASSERTION_FAILED;+    } -  StandardLib->RecordAssertion (-                 StandardLib,-                 AssertionType,-                 gSimpleNetworkBBTestConformanceAssertionGuid007,-                 L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() when network interface not initialized.",-                 L"%a:%d:Status - %r",-                 __FILE__,-                 (UINTN)__LINE__,-                 Status-                 );+    StandardLib->RecordAssertion (+                   StandardLib,+                   AssertionType,+                   gSimpleNetworkBBTestConformanceAssertionGuid007,+                   L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() when network interface not initialized.",+                   L"%a:%d:Status - %r",+                   __FILE__,+                   (UINTN)__LINE__,+                   Status+                   );+  }    //   // Assertion Point 5.6.2.3@@ -683,22 +701,31 @@ BBTestReceiveFilterConformanceTest (
   //  Call ReceiveFilters with invalide Enable   //   Status = SnpInterface->ReceiveFilters (SnpInterface, ~(SnpInterface->Mode->ReceiveFilterMask), 0, FALSE, 0, NULL);-  if (Status == EFI_INVALID_PARAMETER) {-    AssertionType = EFI_TEST_ASSERTION_PASSED;+  if (Status == EFI_UNSUPPORTED) {+    StandardLib->RecordMessage(+                   StandardLib,+                   EFI_VERBOSE_LEVEL_QUIET,+                   L"ReceiveFilters isn't supported, Status - %r\n",+                   Status+                   );   } else {-    AssertionType = EFI_TEST_ASSERTION_FAILED;-  }+    if (Status == EFI_INVALID_PARAMETER) {+      AssertionType = EFI_TEST_ASSERTION_PASSED;+    } else {+      AssertionType = EFI_TEST_ASSERTION_FAILED;+    } -  StandardLib->RecordAssertion (-                 StandardLib,-                 AssertionType,-                 gSimpleNetworkBBTestConformanceAssertionGuid008,-                 L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with invalid Enable.",-                 L"%a:%d:Status - %r",-                 __FILE__,-                 (UINTN)__LINE__,-                 Status-                 );  +    StandardLib->RecordAssertion (+                   StandardLib,+                   AssertionType,+                   gSimpleNetworkBBTestConformanceAssertionGuid008,+                   L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with invalid Enable.",+                   L"%a:%d:Status - %r",+                   __FILE__,+                   (UINTN)__LINE__,+                   Status+                   );+  }    //   //  Call ReceiveFilters with invalide MCastFilterCnt@@ -713,59 +740,85 @@ BBTestReceiveFilterConformanceTest (
     MAC.Addr[5] = 0x02;      Status = SnpInterface->ReceiveFilters (SnpInterface, EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST, 0, FALSE, SnpInterface->Mode->MaxMCastFilterCount + 1, &MAC);-    if (Status == EFI_INVALID_PARAMETER) {-      AssertionType = EFI_TEST_ASSERTION_PASSED;+    if (Status == EFI_UNSUPPORTED) {+      StandardLib->RecordMessage(+                     StandardLib,+                     EFI_VERBOSE_LEVEL_QUIET,+                     L"ReceiveFilters isn't supported, Status - %r\n",+                     Status+                     );     } else {-      AssertionType = EFI_TEST_ASSERTION_FAILED;+      if (Status == EFI_INVALID_PARAMETER) {+        AssertionType = EFI_TEST_ASSERTION_PASSED;+      } else {+        AssertionType = EFI_TEST_ASSERTION_FAILED;+      }++      StandardLib->RecordAssertion (+                     StandardLib,+                     AssertionType,+                     gSimpleNetworkBBTestConformanceAssertionGuid009,+                     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->RecordAssertion (-                   StandardLib,-                   AssertionType,-                   gSimpleNetworkBBTestConformanceAssertionGuid009,-                   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-                   );-     Status = SnpInterface->ReceiveFilters (SnpInterface, EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST, 0, FALSE, 0, &MAC);-    if (Status == EFI_INVALID_PARAMETER) {-      AssertionType = EFI_TEST_ASSERTION_PASSED;+    if (Status == EFI_UNSUPPORTED) {+      StandardLib->RecordMessage(+                     StandardLib,+                     EFI_VERBOSE_LEVEL_QUIET,+                     L"ReceiveFilters isn't supported, Status - %r\n",+                     Status+                     );     } else {-      AssertionType = EFI_TEST_ASSERTION_FAILED;+      if (Status == EFI_INVALID_PARAMETER) {+        AssertionType = EFI_TEST_ASSERTION_PASSED;+      } else {+        AssertionType = EFI_TEST_ASSERTION_FAILED;+      }++      StandardLib->RecordAssertion (+                     StandardLib,+                     AssertionType,+                     gSimpleNetworkBBTestConformanceAssertionGuid043,+                     L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with invalid MCastFilterCnt 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 invalid MCastFilterCnt is 0.",-                   L"%a:%d:Status - %r",-                   __FILE__,-                   (UINTN)__LINE__,-                   Status-                   );-     Status = SnpInterface->ReceiveFilters (SnpInterface, EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST, 0, FALSE, 1, NULL);-    if (Status == EFI_INVALID_PARAMETER) {-      AssertionType = EFI_TEST_ASSERTION_PASSED;+    if (Status == EFI_UNSUPPORTED) {+      StandardLib->RecordMessage(+                     StandardLib,+                     EFI_VERBOSE_LEVEL_QUIET,+                     L"ReceiveFilters isn't supported, Status - %r\n",+                     Status+                     );     } else {-      AssertionType = EFI_TEST_ASSERTION_FAILED;+      if (Status == EFI_INVALID_PARAMETER) {+        AssertionType = EFI_TEST_ASSERTION_PASSED;+      } else {+        AssertionType = EFI_TEST_ASSERTION_FAILED;+      }++      StandardLib->RecordAssertion (+                       StandardLib,+                       AssertionType,+                       gSimpleNetworkBBTestConformanceAssertionGuid010,+                       L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with MCastFilterCnt not match MCastFilter.",+                       L"%a:%d:Status - %r",+                       __FILE__,+                       (UINTN)__LINE__,+                       Status+                       );     }--    StandardLib->RecordAssertion (-                   StandardLib,-                   AssertionType,-                   gSimpleNetworkBBTestConformanceAssertionGuid010,-                   L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke ReceiveFilters() with MCastFilterCnt not match MCastFilter.",-                   L"%a:%d:Status - %r",-                   __FILE__,-                   (UINTN)__LINE__,-                   Status-                   );-   }    //-- 
2.23.0





       reply	other threads:[~2019-10-08  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <15C924F1209A99C8.24572@groups.io>
2019-10-08  8:38 ` Eric Jin [this message]
2019-09-30  6:55 [edk2-devel][edk2-test][PATCH 1/1] uefi-sct/SctPkg: SNP ReceiveFilters may be unsupported Eric Jin

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=DA72DC7456565B47808A57108259571F63827EC5@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