public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters change to IHV
@ 2019-10-11  2:37 xianhui liu
  2019-10-11 14:45 ` Eric Jin
       [not found] ` <15CC9EF63907401C.5802@groups.io>
  0 siblings, 2 replies; 3+ messages in thread
From: xianhui liu @ 2019-10-11  2:37 UTC (permalink / raw)
  To: devel; +Cc: Heinrich Schuchardt, Supreeth Venkatesh, Eric Jin, xianhui liu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2197
sync commit 3d98de052fcd47f187190802e6201ac6aaabfda7
on file EFI/Protocol/SimpleNetwork/BlackBoxTest
/SimpleNetworkBBTestConformance.c to IHV

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Cc: Eric Jin <eric.jin@intel.com>

Signed-off-by: xianhui liu <xianhuix.liu@intel.com>
---
 .../BlackBoxTest/SimpleNetworkBBTestConformance.c  | 223 +++++++++++++--------
 1 file changed, 138 insertions(+), 85 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
index c758f560..682076ea 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/SimpleNetwork/BlackBoxTest/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.14.1.windows.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters change to IHV
  2019-10-11  2:37 [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters change to IHV xianhui liu
@ 2019-10-11 14:45 ` Eric Jin
       [not found] ` <15CC9EF63907401C.5802@groups.io>
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Jin @ 2019-10-11 14:45 UTC (permalink / raw)
  To: Liu, XianhuiX, devel@edk2.groups.io
  Cc: Heinrich Schuchardt, Supreeth Venkatesh

Reviewed-by: Eric Jin <eric.jin@intel.com>

> -----Original Message-----
> From: Liu, XianhuiX <xianhuix.liu@intel.com>
> Sent: Friday, October 11, 2019 10:38 AM
> To: devel@edk2.groups.io
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>; Supreeth Venkatesh
> <supreeth.venkatesh@arm.com>; Jin, Eric <eric.jin@intel.com>; Liu,
> XianhuiX <xianhuix.liu@intel.com>
> Subject: [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters change
> to IHV
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2197
> sync commit 3d98de052fcd47f187190802e6201ac6aaabfda7
> on file EFI/Protocol/SimpleNetwork/BlackBoxTest
> /SimpleNetworkBBTestConformance.c to IHV
> 
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
> Cc: Eric Jin <eric.jin@intel.com>
> 
> Signed-off-by: xianhui liu <xianhuix.liu@intel.com>
> ---
>  .../BlackBoxTest/SimpleNetworkBBTestConformance.c  | 223
> +++++++++++++--------
>  1 file changed, 138 insertions(+), 85 deletions(-)
> 
> 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 c758f560..682076ea 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
> @@ -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.14.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters change to IHV
       [not found] ` <15CC9EF63907401C.5802@groups.io>
@ 2019-10-12  8:19   ` Eric Jin
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Jin @ 2019-10-12  8:19 UTC (permalink / raw)
  To: devel@edk2.groups.io, Liu, XianhuiX
  Cc: Heinrich Schuchardt, Supreeth Venkatesh

Push at 214d73061b9f82468db619784cfe0fd5ff5f808e

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Eric Jin
Sent: Friday, October 11, 2019 10:46 PM
To: Liu, XianhuiX <xianhuix.liu@intel.com>; devel@edk2.groups.io
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>; Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Subject: Re: [edk2-devel] [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters change to IHV

Reviewed-by: Eric Jin <eric.jin@intel.com>

> -----Original Message-----
> From: Liu, XianhuiX <xianhuix.liu@intel.com>
> Sent: Friday, October 11, 2019 10:38 AM
> To: devel@edk2.groups.io
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>; Supreeth Venkatesh 
> <supreeth.venkatesh@arm.com>; Jin, Eric <eric.jin@intel.com>; Liu, 
> XianhuiX <xianhuix.liu@intel.com>
> Subject: [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters 
> change to IHV
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2197
> sync commit 3d98de052fcd47f187190802e6201ac6aaabfda7
> on file EFI/Protocol/SimpleNetwork/BlackBoxTest
> /SimpleNetworkBBTestConformance.c to IHV
> 
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
> Cc: Eric Jin <eric.jin@intel.com>
> 
> Signed-off-by: xianhui liu <xianhuix.liu@intel.com>
> ---
>  .../BlackBoxTest/SimpleNetworkBBTestConformance.c  | 223
> +++++++++++++--------
>  1 file changed, 138 insertions(+), 85 deletions(-)
> 
> 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 c758f560..682076ea 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
> @@ -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.14.1.windows.1





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-12  8:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-11  2:37 [edk2-test][Patch] uefi-sct/SctPkg: Sync SNP ReceiveFilters change to IHV xianhui liu
2019-10-11 14:45 ` Eric Jin
     [not found] ` <15CC9EF63907401C.5802@groups.io>
2019-10-12  8:19   ` [edk2-devel] " Eric Jin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox