Re: [edk2] [PATCH] uefi-sct/SctPkg:Enhance the SimpleNetwork Test

2018-10-16 Thread Supreeth Venkatesh




On 10/14/2018 03:06 AM, Eric Jin wrote:

Add the EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit in the Enable parameter
Add one checkpoint to MCastFilterCount is zero

Cc: Supreeth Venkatesh 
Cc: Jiaxin Wu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Jin 
---
  .../SimpleNetwork/BlackBoxTest/Guid.c |  4 +-
  .../SimpleNetwork/BlackBoxTest/Guid.h |  7 +-
  .../SimpleNetworkBBTestConformance.c  | 66 +--
  .../SimpleNetwork/BlackBoxTest/Guid.c |  4 +-
  .../SimpleNetwork/BlackBoxTest/Guid.h |  7 +-
  .../SimpleNetworkBBTestConformance.c  | 66 +--
  6 files changed, 110 insertions(+), 44 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
index 6ea6c4cb..72343236 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
@@ -1,7 +1,7 @@
  /** @file
  
Copyright 2006 - 2016 Unified EFI, Inc.

-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
  
This program and the accompanying materials

are licensed and made available under the terms and conditions of the BSD 
License
@@ -112,6 +112,8 @@ EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid041 = 
EFI_TEST_SIMPLENETWOR
  
  EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid042 = EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_042_GUID;
  
+EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid043 = EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_043_GUID;

+
  EFI_GUID gSimpleNetworkBBTestFunctionAssertionGuid001 = 
EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_001_GUID;
  
  EFI_GUID gSimpleNetworkBBTestFunctionAssertionGuid002 = EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_002_GUID;

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
index 281d893a..bf909d1c 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
@@ -1,7 +1,7 @@
  /** @file
  
Copyright 2006 - 2016 Unified EFI, Inc.

-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
  
This program and the accompanying materials

are licensed and made available under the terms and conditions of the BSD 
License
@@ -235,6 +235,11 @@ extern EFI_GUID 
gSimpleNetworkBBTestConformanceAssertionGuid041;
  
  extern EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid042;
  
+#define EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_043_GUID \

+{ 0x8cec0b86, 0x7773, 0x4d3c, {0x84, 0x13, 0x26, 0x37, 0xfb, 0xd0, 0x8e, 0x1b 
}}
+
+extern EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid043;
+
  #define EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_001_GUID \
  { 0xf58651fe, 0x0538, 0x4407, {0x88, 0xe0, 0x88, 0xb8, 0xda, 0x18, 0x38, 0x3a 
}}
  
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 ccbbad08..b65d7d3b 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
@@ -1,7 +1,7 @@
  /** @file
  
Copyright 2006 - 2016 Unified EFI, Inc.

-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
  
This program and the accompanying materials

are licensed and made available under the terms and conditions of the BSD 
License
@@ -581,11 +581,12 @@ BBTestReceiveFilterConformanceTest (
  {
EFI_STANDARD_TEST_LIBRARY_PROTOCOL*StandardLib;
EFI_STATUSStatus;
-  EFI_STATUSStatusBuf[5];
-  EFI_TEST_ASSERTIONAssertionType[5];
+  EFI_STATUSStatusBuf[6];

Magic Number 6.

+  EFI_TEST_ASSERTIONAssertionType[6];

Magic number 6.

EFI_SIMPLE_NETWORK_PROTOCOL   *SnpInterface;
EFI_SIMPLE_NETWORK_STATE  State1, State2;
-
+  EFI_MAC_ADDRESS   MAC;
+
//
// Get the Standard Library Interface
//
@@ -673,23 +674,37 @@ BBTestReceiveFilterConformanceTest (
//
//  Call ReceiveFilters with invalide MCastFilterCnt
//
-  StatusBuf[3] = SnpInterface->ReceiveFilters (SnpInterface, 0, 0, FALSE, 

Re: [edk2] [PATCH] uefi-sct/SctPkg:Enhance the SimpleNetwork Test

2018-10-15 Thread Supreeth Venkatesh
FYI

On 10/15/2018 03:30 AM, Supreeth Venkatesh wrote:


On 10/14/2018 03:06 AM, Eric Jin wrote:

Add the EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit in the Enable parameter
Add one checkpoint to MCastFilterCount is zero

Cc: Supreeth Venkatesh 

Cc: Jiaxin Wu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Jin 
---
  .../SimpleNetwork/BlackBoxTest/Guid.c |  4 +-
  .../SimpleNetwork/BlackBoxTest/Guid.h |  7 +-
  .../SimpleNetworkBBTestConformance.c  | 66 +--
  .../SimpleNetwork/BlackBoxTest/Guid.c |  4 +-
  .../SimpleNetwork/BlackBoxTest/Guid.h |  7 +-
  .../SimpleNetworkBBTestConformance.c  | 66 +--
  6 files changed, 110 insertions(+), 44 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
index 6ea6c4cb..72343236 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
@@ -1,7 +1,7 @@
  /** @file
  Copyright 2006 - 2016 Unified EFI, Inc.
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
  This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD 
License
@@ -112,6 +112,8 @@ EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid041 = 
EFI_TEST_SIMPLENETWOR
EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid042 = 
EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_042_GUID;
  +EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid043 = 
EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_043_GUID;
+
  EFI_GUID gSimpleNetworkBBTestFunctionAssertionGuid001 = 
EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_001_GUID;
EFI_GUID gSimpleNetworkBBTestFunctionAssertionGuid002 = 
EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_002_GUID;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
index 281d893a..bf909d1c 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
@@ -1,7 +1,7 @@
  /** @file
  Copyright 2006 - 2016 Unified EFI, Inc.
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
  This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD 
License
@@ -235,6 +235,11 @@ extern EFI_GUID 
gSimpleNetworkBBTestConformanceAssertionGuid041;
extern EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid042;
  +#define EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_043_GUID \
+{ 0x8cec0b86, 0x7773, 0x4d3c, {0x84, 0x13, 0x26, 0x37, 0xfb, 0xd0, 0x8e, 0x1b 
}}
+
+extern EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid043;
+
  #define EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_001_GUID \
  { 0xf58651fe, 0x0538, 0x4407, {0x88, 0xe0, 0x88, 0xb8, 0xda, 0x18, 0x38, 0x3a 
}}
  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 ccbbad08..b65d7d3b 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
@@ -1,7 +1,7 @@
  /** @file
  Copyright 2006 - 2016 Unified EFI, Inc.
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
  This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD 
License
@@ -581,11 +581,12 @@ BBTestReceiveFilterConformanceTest (
  {
EFI_STANDARD_TEST_LIBRARY_PROTOCOL*StandardLib;
EFI_STATUSStatus;
-  EFI_STATUSStatusBuf[5];
-  EFI_TEST_ASSERTIONAssertionType[5];
+  EFI_STATUSStatusBuf[6];
Magic Number 6.

+  EFI_TEST_ASSERTIONAssertionType[6];
Magic number 6.

EFI_SIMPLE_NETWORK_PROTOCOL   *SnpInterface;
EFI_SIMPLE_NETWORK_STATE  State1, State2;
-
+  EFI_MAC_ADDRESS   MAC;
+
//
// Get the Standard Library Interface
//
@@ -673,23 +674,37 @@ BBTestReceiveFilterConformanceTest (
//
//  Call ReceiveFilters 

[edk2] [PATCH] uefi-sct/SctPkg:Enhance the SimpleNetwork Test

2018-10-13 Thread Eric Jin
Add the EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit in the Enable parameter
Add one checkpoint to MCastFilterCount is zero

Cc: Supreeth Venkatesh 
Cc: Jiaxin Wu 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Jin 
---
 .../SimpleNetwork/BlackBoxTest/Guid.c |  4 +-
 .../SimpleNetwork/BlackBoxTest/Guid.h |  7 +-
 .../SimpleNetworkBBTestConformance.c  | 66 +--
 .../SimpleNetwork/BlackBoxTest/Guid.c |  4 +-
 .../SimpleNetwork/BlackBoxTest/Guid.h |  7 +-
 .../SimpleNetworkBBTestConformance.c  | 66 +--
 6 files changed, 110 insertions(+), 44 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
index 6ea6c4cb..72343236 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.c
@@ -1,7 +1,7 @@
 /** @file
 
   Copyright 2006 - 2016 Unified EFI, Inc.
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -112,6 +112,8 @@ EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid041 = 
EFI_TEST_SIMPLENETWOR
 
 EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid042 = 
EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_042_GUID;
 
+EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid043 = 
EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_043_GUID;
+
 EFI_GUID gSimpleNetworkBBTestFunctionAssertionGuid001 = 
EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_001_GUID;
 
 EFI_GUID gSimpleNetworkBBTestFunctionAssertionGuid002 = 
EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_002_GUID;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
index 281d893a..bf909d1c 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/Guid.h
@@ -1,7 +1,7 @@
 /** @file
 
   Copyright 2006 - 2016 Unified EFI, Inc.
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -235,6 +235,11 @@ extern EFI_GUID 
gSimpleNetworkBBTestConformanceAssertionGuid041;
 
 extern EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid042;
 
+#define EFI_TEST_SIMPLENETWORKBBTESTCONFORMANCE_ASSERTION_043_GUID \
+{ 0x8cec0b86, 0x7773, 0x4d3c, {0x84, 0x13, 0x26, 0x37, 0xfb, 0xd0, 0x8e, 0x1b 
}}
+
+extern EFI_GUID gSimpleNetworkBBTestConformanceAssertionGuid043;
+
 #define EFI_TEST_SIMPLENETWORKBBTESTFUNCTION_ASSERTION_001_GUID \
 { 0xf58651fe, 0x0538, 0x4407, {0x88, 0xe0, 0x88, 0xb8, 0xda, 0x18, 0x38, 0x3a 
}}
 
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 ccbbad08..b65d7d3b 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestConformance.c
@@ -1,7 +1,7 @@
 /** @file
 
   Copyright 2006 - 2016 Unified EFI, Inc.
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -581,11 +581,12 @@ BBTestReceiveFilterConformanceTest (
 {
   EFI_STANDARD_TEST_LIBRARY_PROTOCOL*StandardLib;
   EFI_STATUSStatus;
-  EFI_STATUSStatusBuf[5];
-  EFI_TEST_ASSERTIONAssertionType[5];
+  EFI_STATUSStatusBuf[6];
+  EFI_TEST_ASSERTIONAssertionType[6];
   EFI_SIMPLE_NETWORK_PROTOCOL   *SnpInterface;
   EFI_SIMPLE_NETWORK_STATE  State1, State2;
-
+  EFI_MAC_ADDRESS   MAC;
+  
   //
   // Get the Standard Library Interface
   //
@@ -673,23 +674,37 @@ BBTestReceiveFilterConformanceTest (
   //
   //  Call ReceiveFilters with invalide MCastFilterCnt
   //
-  StatusBuf[3] = SnpInterface->ReceiveFilters (SnpInterface, 0, 0, FALSE, 
SnpInterface->Mode->MaxMCastFilterCount + 1, NULL);
-  if (StatusBuf[3] == EFI_INVALID_PARAMETER) {
-AssertionType[3] =