* [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest".
@ 2019-09-09 6:24 ArvinX Chen
0 siblings, 0 replies; 7+ messages in thread
From: ArvinX Chen @ 2019-09-09 6:24 UTC (permalink / raw)
To: devel; +Cc: Eric Jin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2155
Now the test item "EFICompliantTest" will be gen in the XXX.csv.
However, I find most of the SCT user will not know what platform
config they test is, so I think we can independently generate a
file of the "EFICompliantTest" tests, then the SCT tester can send
this file to the platform owner and let them directly handle the
compliant issue.
This patch will auto gen a file in path SCT\Report\PlatformConfigXXX.ini
each time tester execute this test will creat a new one until 255.
Cc: Eric Jin <eric.jin@intel.com>
Signed-off-by: ArvinX Chen <arvinx.chen@intel.com>
---
.../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 438 +++++++++++++++++++++
1 file changed, 438 insertions(+)
diff --git a/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c b/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index 221366b..7bbec70 100644
--- a/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
@@ -118,6 +118,8 @@ extern EFI_GUID gGlobalVariableGuid;
//
#define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific"
+#define GEN_CONFIG_INI_FILE_ON TRUE
+#define MAX_SIZE 0xFF
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 }}
@@ -201,6 +203,12 @@ EFI_GUID gEfiBlueToothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x
EFI_GUID gEfiBlueToothLEConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }};
+typedef struct CONFIG_ERROR_DATA {
+ UINT8 ErrorCount;
+ CHAR16 *TitleString;
+ EFI_INI_FILE_HANDLE ConfigINI;
+} CONFIG_ERROR_DATA;
+
//
// Internal functions declarations
//
@@ -405,6 +413,23 @@ CheckIPSecProtocols (
IN EFI_INI_FILE_HANDLE IniFile
);
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ IN CHAR16 *TitleString,
+ IN EFI_INI_FILE_HANDLE ConfigINI
+);
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN CHAR16 *TestItemString
+ );
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+);
+
//
// External functions implementation
//
@@ -429,6 +454,11 @@ Routine Description:
EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
EFI_TEST_PROFILE_LIBRARY_PROTOCOL *ProfileLib;
EFI_INI_FILE_HANDLE IniFile;
+ EFI_INI_FILE_HANDLE ConfigINI;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ CONFIG_ERROR_DATA *ErrorData;
+ CHAR16 *FilePath;
+ UINT8 Index;
//
// Locate the standard test library protocol
@@ -477,6 +507,85 @@ Routine Description:
return Status;
}
+ //
+ // Creat PlatformConfig.ini file.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+ for (Index=0; Index<MAX_SIZE; Index++) {
+ Status = OpenIniFile (
+ ProfileLib,
+ L"Report",
+ SctPoolPrint (L"PlatformConfig%03d.ini", Index),
+ &ConfigINI
+ );
+ if (ConfigINI != NULL) {
+ //
+ // If file exise, Creat a new one.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ continue;
+ }
+ break;
+ }
+ Status = ProfileLib->EfiIniCreate (
+ ProfileLib,
+ DevicePath,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig%03d.ini",FilePath, Index),
+ &ConfigINI
+ );
+ if (EFI_ERROR (Status)) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_WARNING,
+ gTestGenericFailureGuid,
+ L"UEFI Compliant - Cannot create INI file",
+ L"%a:%d",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+
+ return Status;
+ }
+ //
+ // Gen PlatformConfig.ini title and description.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", 0x00)
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|If fail item is not 0, it mean platform config have error ___",
+ L"|>"
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|occur or EfiCompliant.ini setting have wrong. ________________",
+ L"|>"
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|Please sent this file and EfiCompliant.ini to platform owner .",
+ L"|>"
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|==============================================================",
+ L"|>"
+ );
+
+ ConstructionAndAcquisition (NULL, ConfigINI);
//
// Check the console protocols
//
@@ -618,6 +727,26 @@ Routine Description:
//
CloseIniFile (ProfileLib, IniFile);
+ ErrorData = ConstructionAndAcquisition (L"END", ConfigINI);
+ //
+ // Update fail count.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", ErrorData->ErrorCount)
+ );
+ //
+ // Save data
+ //
+ if (GEN_CONFIG_INI_FILE_ON == TRUE) {
+ //
+ // If have error occor and GenTestINI flag is on, gen the report file.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ }
return EFI_SUCCESS;
}
@@ -835,6 +964,12 @@ CheckConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ConsoleDevices")) {
+ GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -914,6 +1049,13 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HiiConfigSupport")) {
+ GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value[2]);
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value[3]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -956,6 +1098,10 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HiiFontSupport")) {
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1056,6 +1202,12 @@ CheckGraphicalConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"GraphicalConsoleDevices")) {
+ GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1127,6 +1279,10 @@ CheckPointerProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"PointerDevices")) {
+ GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1241,6 +1397,13 @@ CheckBootFromDiskProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromDiskDevices")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", ValueC);
+ GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", ValueD);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1384,6 +1547,13 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromNetworkDevices")) {
+ GenTestConfigContent (L"gEfiPxeBaseCodeProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleNetworkProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiNetworkInterfaceIdentifierProtocolGuid", Value[2]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1423,6 +1593,10 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ValidateBootImageThruNet")) {
+ GenTestConfigContent (L"Variable \"SetupMode\"", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1514,6 +1688,16 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1616,6 +1800,22 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiArpProtocolGuid ", Value[8]);
+ GenTestConfigContent (L"gEfiIp4ProtocolGuid ", Value[9]);
+ GenTestConfigContent (L"gEfiDhcp4ProtocolGuid ", Value[10]);
+ GenTestConfigContent (L"gEfiTcp4ProtocolGuid ", Value[11]);
+ GenTestConfigContent (L"gEfiUdp4ProtocolGuid ", Value[12]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1714,6 +1914,14 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1810,6 +2018,18 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiDhcp6ProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiTcp6ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiIp6ProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiUdp6ProtocolGuid ", Value[8]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1867,6 +2087,10 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"VlanSupport")) {
+ GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1940,6 +2164,10 @@ CheckUartProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UartDevices")) {
+ GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2025,6 +2253,11 @@ CheckPciProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"PciBusSupport")) {
+ GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2110,6 +2343,11 @@ CheckUsbProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UsbBusSupport")) {
+ GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2180,6 +2418,10 @@ CheckNVMeProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2264,6 +2506,10 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromNVMe")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2301,6 +2547,10 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2374,6 +2624,10 @@ CheckScsiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ExtScsiPassThru")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2473,6 +2727,11 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromScsi")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2511,6 +2770,10 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ExtScsiPassThruSupport")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2597,6 +2860,11 @@ CheckBootFromIScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromIscsi")) {
+ GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2685,6 +2953,11 @@ CheckDebugProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DebugSupport")) {
+ GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2755,6 +3028,10 @@ CheckDriverOverrideProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"PlatformDriverOverride")) {
+ GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2824,6 +3101,10 @@ CheckATAProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"AtaPassThru")) {
+ GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2896,6 +3177,13 @@ CheckEbcProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"EBCSupport")) {
+ GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk != NULL);
+ GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage != NULL);
+ GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterICacheFlush != NULL);
+ GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion != NULL);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2993,6 +3281,10 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3051,6 +3343,11 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns4ProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3121,6 +3418,10 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3179,6 +3480,11 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns6ProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3261,6 +3567,11 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3320,6 +3631,12 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiTlsProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3404,6 +3721,11 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3463,6 +3785,12 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiHttpProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3553,6 +3881,12 @@ CheckEAPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"EAPSupport")) {
+ GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3649,6 +3983,12 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
//
@@ -3714,6 +4054,13 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid ", ValueD);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3807,6 +4154,12 @@ CheckBlueToothLEProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BlueToothLESupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3897,6 +4250,11 @@ CheckIPSecProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"IPSecSupport")) {
+ GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3915,5 +4273,85 @@ CheckIPSecProtocols (
ValueB ? L"Yes" : L"No"
);
+ return EFI_SUCCESS;
+}
+
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ CHAR16 *TitleString,
+ EFI_INI_FILE_HANDLE ConfigINI
+){
+ UINTN Index;
+ static CONFIG_ERROR_DATA Data;
+
+ if (TitleString == NULL && ConfigINI != NULL) {
+ //
+ // If only gave ConfigINI, init struct.
+ //
+ gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, (VOID**)&(Data.TitleString));
+ Data.ConfigINI = ConfigINI;
+ Data.ErrorCount = 0;
+
+ return NULL;
+ } else if (TitleString != NULL && ConfigINI == NULL) {
+ //
+ // If Only gave TitleString, update the title and error count +1.
+ //
+ for (Index=0; Data.TitleString[Index]=TitleString[Index], TitleString[Index]!=0; Index++);
+ Data.ErrorCount++;
+
+ return &Data;
+ } else if (TitleString != NULL && ConfigINI != NULL) {
+ //
+ // If Both not NULL, end of the function, free the buffer.
+ //
+ gtBS->FreePool (Data.TitleString);
+ return &Data;
+ }
+ //
+ // If both NULL, just return struct data.
+ //
+ return &Data;
+}
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN CHAR16 *TestItemString
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (TestItemString, NULL);
+ //
+ // Set title
+ //
+ ErrorData->ConfigINI->SetStringByOrder (
+ ErrorData->ConfigINI,
+ ErrorData->ErrorCount,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItemString),
+ L"Device Status :",
+ L": Unavailable"
+ );
+
+ return (GEN_CONFIG_INI_FILE_ON) ? EFI_SUCCESS : EFI_UNSUPPORTED;
+}
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (NULL, NULL);
+ //
+ // Gen content
+ //
+ ErrorData->ConfigINI->SetString (
+ ErrorData->ConfigINI,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorData->TitleString),
+ SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString),
+ Value ? L": In use !": L": Not available !"
+ );
+
return EFI_SUCCESS;
}
\ No newline at end of file
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest".
@ 2019-09-09 6:28 ArvinX Chen
0 siblings, 0 replies; 7+ messages in thread
From: ArvinX Chen @ 2019-09-09 6:28 UTC (permalink / raw)
To: devel; +Cc: Eric Jin, ArvinX Chen
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2155
Now the test item "EFICompliantTest" will be gen in the XXX.csv.
However, I find most of the SCT user will not know what platform
config they test is, so I think we can independently generate a
file of the "EFICompliantTest" tests, then the SCT tester can send
this file to the platform owner and let them directly handle the
compliant issue.
This patch will auto gen a file in path SCT\Report\PlatformConfigXXX.ini
each time tester execute this test will creat a new one until 255.
Cc: Eric Jin <eric.jin@intel.com>
Cc: ArvinX Chen <arvinX.chen@intel.com>
Signed-off-by: ArvinX Chen <arvinx.chen@intel.com>
---
.../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 438 +++++++++++++++++++++
1 file changed, 438 insertions(+)
diff --git a/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c b/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index 221366b..7bbec70 100644
--- a/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/Edk2/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
@@ -118,6 +118,8 @@ extern EFI_GUID gGlobalVariableGuid;
//
#define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific"
+#define GEN_CONFIG_INI_FILE_ON TRUE
+#define MAX_SIZE 0xFF
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 }}
@@ -201,6 +203,12 @@ EFI_GUID gEfiBlueToothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x
EFI_GUID gEfiBlueToothLEConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }};
+typedef struct CONFIG_ERROR_DATA {
+ UINT8 ErrorCount;
+ CHAR16 *TitleString;
+ EFI_INI_FILE_HANDLE ConfigINI;
+} CONFIG_ERROR_DATA;
+
//
// Internal functions declarations
//
@@ -405,6 +413,23 @@ CheckIPSecProtocols (
IN EFI_INI_FILE_HANDLE IniFile
);
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ IN CHAR16 *TitleString,
+ IN EFI_INI_FILE_HANDLE ConfigINI
+);
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN CHAR16 *TestItemString
+ );
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+);
+
//
// External functions implementation
//
@@ -429,6 +454,11 @@ Routine Description:
EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
EFI_TEST_PROFILE_LIBRARY_PROTOCOL *ProfileLib;
EFI_INI_FILE_HANDLE IniFile;
+ EFI_INI_FILE_HANDLE ConfigINI;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ CONFIG_ERROR_DATA *ErrorData;
+ CHAR16 *FilePath;
+ UINT8 Index;
//
// Locate the standard test library protocol
@@ -477,6 +507,85 @@ Routine Description:
return Status;
}
+ //
+ // Creat PlatformConfig.ini file.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+ for (Index=0; Index<MAX_SIZE; Index++) {
+ Status = OpenIniFile (
+ ProfileLib,
+ L"Report",
+ SctPoolPrint (L"PlatformConfig%03d.ini", Index),
+ &ConfigINI
+ );
+ if (ConfigINI != NULL) {
+ //
+ // If file exise, Creat a new one.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ continue;
+ }
+ break;
+ }
+ Status = ProfileLib->EfiIniCreate (
+ ProfileLib,
+ DevicePath,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig%03d.ini",FilePath, Index),
+ &ConfigINI
+ );
+ if (EFI_ERROR (Status)) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_WARNING,
+ gTestGenericFailureGuid,
+ L"UEFI Compliant - Cannot create INI file",
+ L"%a:%d",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+
+ return Status;
+ }
+ //
+ // Gen PlatformConfig.ini title and description.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", 0x00)
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|If fail item is not 0, it mean platform config have error ___",
+ L"|>"
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|occur or EfiCompliant.ini setting have wrong. ________________",
+ L"|>"
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|Please sent this file and EfiCompliant.ini to platform owner .",
+ L"|>"
+ );
+ ConfigINI->SetString (
+ ConfigINI,
+ L"|================= Configuration Environment =================|",
+ L"<|==============================================================",
+ L"|>"
+ );
+
+ ConstructionAndAcquisition (NULL, ConfigINI);
//
// Check the console protocols
//
@@ -618,6 +727,26 @@ Routine Description:
//
CloseIniFile (ProfileLib, IniFile);
+ ErrorData = ConstructionAndAcquisition (L"END", ConfigINI);
+ //
+ // Update fail count.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", ErrorData->ErrorCount)
+ );
+ //
+ // Save data
+ //
+ if (GEN_CONFIG_INI_FILE_ON == TRUE) {
+ //
+ // If have error occor and GenTestINI flag is on, gen the report file.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ }
return EFI_SUCCESS;
}
@@ -835,6 +964,12 @@ CheckConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ConsoleDevices")) {
+ GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -914,6 +1049,13 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HiiConfigSupport")) {
+ GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value[2]);
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value[3]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -956,6 +1098,10 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HiiFontSupport")) {
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1056,6 +1202,12 @@ CheckGraphicalConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"GraphicalConsoleDevices")) {
+ GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1127,6 +1279,10 @@ CheckPointerProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"PointerDevices")) {
+ GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1241,6 +1397,13 @@ CheckBootFromDiskProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromDiskDevices")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", ValueC);
+ GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", ValueD);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1384,6 +1547,13 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromNetworkDevices")) {
+ GenTestConfigContent (L"gEfiPxeBaseCodeProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleNetworkProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiNetworkInterfaceIdentifierProtocolGuid", Value[2]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1423,6 +1593,10 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ValidateBootImageThruNet")) {
+ GenTestConfigContent (L"Variable \"SetupMode\"", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1514,6 +1688,16 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1616,6 +1800,22 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiArpProtocolGuid ", Value[8]);
+ GenTestConfigContent (L"gEfiIp4ProtocolGuid ", Value[9]);
+ GenTestConfigContent (L"gEfiDhcp4ProtocolGuid ", Value[10]);
+ GenTestConfigContent (L"gEfiTcp4ProtocolGuid ", Value[11]);
+ GenTestConfigContent (L"gEfiUdp4ProtocolGuid ", Value[12]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1714,6 +1914,14 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1810,6 +2018,18 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiDhcp6ProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiTcp6ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiIp6ProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiUdp6ProtocolGuid ", Value[8]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1867,6 +2087,10 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"VlanSupport")) {
+ GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9]);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -1940,6 +2164,10 @@ CheckUartProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UartDevices")) {
+ GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2025,6 +2253,11 @@ CheckPciProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"PciBusSupport")) {
+ GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2110,6 +2343,11 @@ CheckUsbProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"UsbBusSupport")) {
+ GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2180,6 +2418,10 @@ CheckNVMeProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2264,6 +2506,10 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromNVMe")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2301,6 +2547,10 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2374,6 +2624,10 @@ CheckScsiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ExtScsiPassThru")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2473,6 +2727,11 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromScsi")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2511,6 +2770,10 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"ExtScsiPassThruSupport")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2597,6 +2860,11 @@ CheckBootFromIScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BootFromIscsi")) {
+ GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2685,6 +2953,11 @@ CheckDebugProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DebugSupport")) {
+ GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2755,6 +3028,10 @@ CheckDriverOverrideProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"PlatformDriverOverride")) {
+ GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2824,6 +3101,10 @@ CheckATAProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"AtaPassThru")) {
+ GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2896,6 +3177,13 @@ CheckEbcProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"EBCSupport")) {
+ GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk != NULL);
+ GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage != NULL);
+ GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterICacheFlush != NULL);
+ GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion != NULL);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -2993,6 +3281,10 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3051,6 +3343,11 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns4ProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3121,6 +3418,10 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3179,6 +3480,11 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns6ProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3261,6 +3567,11 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3320,6 +3631,12 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiTlsProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3404,6 +3721,11 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3463,6 +3785,12 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiHttpProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3553,6 +3881,12 @@ CheckEAPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"EAPSupport")) {
+ GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3649,6 +3983,12 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
//
@@ -3714,6 +4054,13 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid ", ValueD);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3807,6 +4154,12 @@ CheckBlueToothLEProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"BlueToothLESupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", ValueC);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3897,6 +4250,11 @@ CheckIPSecProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (L"IPSecSupport")) {
+ GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB);
+ AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
}
}
@@ -3915,5 +4273,85 @@ CheckIPSecProtocols (
ValueB ? L"Yes" : L"No"
);
+ return EFI_SUCCESS;
+}
+
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ CHAR16 *TitleString,
+ EFI_INI_FILE_HANDLE ConfigINI
+){
+ UINTN Index;
+ static CONFIG_ERROR_DATA Data;
+
+ if (TitleString == NULL && ConfigINI != NULL) {
+ //
+ // If only gave ConfigINI, init struct.
+ //
+ gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, (VOID**)&(Data.TitleString));
+ Data.ConfigINI = ConfigINI;
+ Data.ErrorCount = 0;
+
+ return NULL;
+ } else if (TitleString != NULL && ConfigINI == NULL) {
+ //
+ // If Only gave TitleString, update the title and error count +1.
+ //
+ for (Index=0; Data.TitleString[Index]=TitleString[Index], TitleString[Index]!=0; Index++);
+ Data.ErrorCount++;
+
+ return &Data;
+ } else if (TitleString != NULL && ConfigINI != NULL) {
+ //
+ // If Both not NULL, end of the function, free the buffer.
+ //
+ gtBS->FreePool (Data.TitleString);
+ return &Data;
+ }
+ //
+ // If both NULL, just return struct data.
+ //
+ return &Data;
+}
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN CHAR16 *TestItemString
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (TestItemString, NULL);
+ //
+ // Set title
+ //
+ ErrorData->ConfigINI->SetStringByOrder (
+ ErrorData->ConfigINI,
+ ErrorData->ErrorCount,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItemString),
+ L"Device Status :",
+ L": Unavailable"
+ );
+
+ return (GEN_CONFIG_INI_FILE_ON) ? EFI_SUCCESS : EFI_UNSUPPORTED;
+}
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (NULL, NULL);
+ //
+ // Gen content
+ //
+ ErrorData->ConfigINI->SetString (
+ ErrorData->ConfigINI,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorData->TitleString),
+ SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString),
+ Value ? L": In use !": L": Not available !"
+ );
+
return EFI_SUCCESS;
}
\ No newline at end of file
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest".
@ 2019-10-14 7:20 ArvinX Chen
0 siblings, 0 replies; 7+ messages in thread
From: ArvinX Chen @ 2019-10-14 7:20 UTC (permalink / raw)
To: devel; +Cc: Eric Jin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2155
Now the test item "EFICompliantTest" will be gen in the XXX.csv.
However, I find most of the SCT user will not know what platform
config they test is, so I think we can independently generate a
file of the "EFICompliantTest" tests, then the SCT tester can send
this file to the platform owner and let them directly handle the
compliant issue.
This patch will auto gen a file in path SCT\Report\PlatformConfig.ini
once tester retest again, system will delete the current PlatformConfig.ini
and create a new one. If tester want to ignore test results in *.csv,
tester can modify EfiCompliant.ini to control it.
Cc: Eric Jin <eric.jin@intel.com>
Signed-off-by: ArvinX Chen <arvinx.chen@intel.com>
---
.../Dependency/Config/EfiCompliant.ini | 13 +-
.../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 492 ++++++++++++++++++++-
2 files changed, 503 insertions(+), 2 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
index d234d87a..4deaae3b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
@@ -1,6 +1,6 @@
## @file
#
-# Copyright 2006 - 2016 Unified EFI, Inc.<BR>
+# Copyright 2006 - 2019 Unified EFI, Inc.<BR>
# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -24,6 +24,14 @@
#
# Notes:
#
+### [Test Configuration Specific]
+#
+# GEN_CONFIG_INI_FILE_ON = <yes: Generate PlatformConfig.ini under the report folder>
+#
+# IGNORE_COMPLIANT_TEST_CSV = <yes: EFI compliant testing fail will not be generated in the report/*.csv file, but if GEN_CONFIG_INI_FILE_ON is "no", this item will aways be no.>
+#
+### [Platform Specific]
+#
# ConsoleDevices = <yes: if this platform includes console devices>
#
# HiiConfigSupport = <yes: if this platform includes Hii Config Support>
@@ -91,6 +99,9 @@
# IPSecSupport = <yes: if this platform supports IPSec network>
#
#--*/
+[Test Configuration Specific]
+GEN_CONFIG_INI_FILE_ON = yes
+IGNORE_COMPLIANT_TEST_CSV = no
[Platform Specific]
ConsoleDevices = yes
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index ae76c909..7a2c2232 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
@@ -28,7 +28,7 @@ Abstract:
// Includes
//
-#include "SctLib.h"
+#include "SctLib.h"
#include "EfiCompliantBbTestMain_uefi.h"
#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
#include EFI_PROTOCOL_DEFINITION (SimpleTextInEx)
@@ -87,6 +87,9 @@ extern EFI_GUID gGlobalVariableGuid;
//
#define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific"
+#define SECTION_NAME_CONFIGURATION_SPECIFIC L"Test Configuration Specific"
+#define CONFIN_TITLE_STRING L"|================= Configuration Environment =================|"
+#define MAX_SIZE 0xFF
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 }}
@@ -170,6 +173,12 @@ EFI_GUID gEfiBlueToothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x
EFI_GUID gEfiBlueToothLEConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }};
+typedef struct CONFIG_ERROR_DATA {
+ UINT8 ErrorCount;
+ CHAR16 *TitleString;
+ EFI_INI_FILE_HANDLE ConfigINI;
+} CONFIG_ERROR_DATA;
+
//
// The Max length of pre-defined string value(yes or no)
// in the EfiCompliant.ini
@@ -381,6 +390,25 @@ CheckIPSecProtocols (
IN EFI_INI_FILE_HANDLE IniFile
);
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ IN CHAR16 *TitleString,
+ IN EFI_INI_FILE_HANDLE ConfigINI
+);
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+);
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+);
+
//
// External functions implementation
//
@@ -405,6 +433,25 @@ Routine Description:
EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
EFI_TEST_PROFILE_LIBRARY_PROTOCOL *ProfileLib;
EFI_INI_FILE_HANDLE IniFile;
+ EFI_INI_FILE_HANDLE ConfigINI;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume;
+ EFI_HANDLE DeviceHandle;
+ EFI_FILE *Root;
+ EFI_FILE *OldFile;
+ CONFIG_ERROR_DATA *ErrorData;
+ UINT8 Index;
+ BOOLEAN GenConfigINI;
+ CHAR16 String[MAX_LENGTH];
+ CHAR16 *FilePath;
+ CHAR16 *TitleString[] = {
+ L"<|If fail item is not 0, it mean platform config have error ___",
+ L"<|occur or EfiCompliant.ini setting have wrong. ________________",
+ L"<|Please sent this file and EfiCompliant.ini to platform owner .",
+ L"<|EfiCompliant.ini is in the : SCT\\Dependency\\EfiCompliantBBTest",
+ L"<|==============================================================",
+ NULL
+ };
//
// Locate the standard test library protocol
@@ -430,6 +477,62 @@ Routine Description:
return Status;
}
+ //
+ // Check PlatformConfig.ini file is exise or not.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+ Status = OpenIniFile (
+ ProfileLib,
+ L"Report",
+ L"PlatformConfig.ini",
+ &ConfigINI
+ );
+ if (ConfigINI != NULL) {
+ //
+ // If file exise, delete it.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+
+ Status = gtBS->LocateDevicePath (
+ &gEfiSimpleFileSystemProtocolGuid,
+ &DevicePath,
+ &DeviceHandle
+ );
+ if (EFI_ERROR (Status)) return Status;
+
+ Status = gtBS->HandleProtocol (
+ DeviceHandle,
+ &gEfiSimpleFileSystemProtocolGuid,
+ (VOID*)&Volume
+ );
+ if (EFI_ERROR (Status)) return Status;
+
+ Status = Volume->OpenVolume(Volume, &Root);
+ if (EFI_ERROR (Status)) return Status;
+
+ Status = Root->Open (
+ Root,
+ &OldFile,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE,
+ 0
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = OldFile->Delete (OldFile);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Root->Close (Root);
+ }
+
//
// Open the INI file
//
@@ -453,6 +556,68 @@ Routine Description:
return Status;
}
+ GenConfigINI = TRUE;
+ Index = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &Index
+ );
+ if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") == 0)) {
+ GenConfigINI = FALSE;
+ }
+
+ if (GenConfigINI == TRUE) {
+ //
+ // Create the config.ini file.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+
+ Status = ProfileLib->EfiIniCreate (
+ ProfileLib,
+ DevicePath,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ &ConfigINI
+ );
+ if (EFI_ERROR (Status)) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gTestGenericFailureGuid,
+ L"UEFI Compliant - Cannot create or open INI file",
+ L"%a:%d:",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ return Status;
+ }
+ //
+ // Gen PlatformConfig.ini title and description.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ CONFIN_TITLE_STRING,
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", 0x00)
+ );
+ for (Index=0; TitleString[Index] != NULL ;Index++) {
+ ConfigINI->SetString (
+ ConfigINI,
+ CONFIN_TITLE_STRING,
+ TitleString[Index],
+ L"|>"
+ );
+ }
+ ConstructionAndAcquisition (NULL, ConfigINI);
+ }
+
//
// Check the console protocols
//
@@ -594,6 +759,26 @@ Routine Description:
//
CloseIniFile (ProfileLib, IniFile);
+ //
+ // Save data to platform.ini
+ //
+ if (GenConfigINI == TRUE) {
+ ErrorData = ConstructionAndAcquisition (L"END", ConfigINI);
+ //
+ // Update fail count.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", ErrorData->ErrorCount)
+ );
+ //
+ // If have error occor and GenTestINI flag is on, gen the report file.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ }
return EFI_SUCCESS;
}
@@ -810,6 +995,11 @@ CheckConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ConsoleDevices")) {
+ GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", ValueC);
+ }
}
}
@@ -888,6 +1078,12 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiConfigSupport")) {
+ GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value[2]);
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value[3]);
+ }
}
}
@@ -929,6 +1125,9 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiFontSupport")) {
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]);
+ }
}
}
@@ -1028,6 +1227,11 @@ CheckGraphicalConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"GraphicalConsoleDevices")) {
+ GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC);
+ }
}
}
@@ -1098,6 +1302,9 @@ CheckPointerProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PointerDevices")) {
+ GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA);
+ }
}
}
@@ -1211,6 +1418,12 @@ CheckBootFromDiskProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromDiskDevices")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", ValueC);
+ GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", ValueD);
+ }
}
}
@@ -1353,6 +1566,12 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNetworkDevices")) {
+ GenTestConfigContent (L"gEfiPxeBaseCodeProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleNetworkProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiNetworkInterfaceIdentifierProtocolGuid", Value[2]);
+ }
}
}
@@ -1391,6 +1610,9 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ValidateBootImageThruNet")) {
+ GenTestConfigContent (L"Variable \"SetupMode\"", ValueC);
+ }
}
}
@@ -1481,6 +1703,15 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1582,6 +1813,21 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiArpProtocolGuid ", Value[8]);
+ GenTestConfigContent (L"gEfiIp4ProtocolGuid ", Value[9]);
+ GenTestConfigContent (L"gEfiDhcp4ProtocolGuid ", Value[10]);
+ GenTestConfigContent (L"gEfiTcp4ProtocolGuid ", Value[11]);
+ GenTestConfigContent (L"gEfiUdp4ProtocolGuid ", Value[12]);
+ }
}
}
@@ -1679,6 +1925,13 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1774,6 +2027,17 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiDhcp6ProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiTcp6ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiIp6ProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiUdp6ProtocolGuid ", Value[8]);
+ }
}
}
@@ -1830,6 +2094,9 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"VlanSupport")) {
+ GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9]);
+ }
}
}
@@ -1902,6 +2169,9 @@ CheckUartProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UartDevices")) {
+ GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA);
+ }
}
}
@@ -1986,6 +2256,10 @@ CheckPciProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PciBusSupport")) {
+ GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2070,6 +2344,10 @@ CheckUsbProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UsbBusSupport")) {
+ GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2139,6 +2417,9 @@ CheckNVMeProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2222,6 +2503,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNVMe")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ }
}
}
@@ -2258,6 +2542,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2330,6 +2617,9 @@ CheckScsiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThru")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2428,6 +2718,10 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromScsi")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC);
+ }
}
}
@@ -2465,6 +2759,9 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThruSupport")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2550,6 +2847,10 @@ CheckBootFromIScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromIscsi")) {
+ GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", ValueB);
+ }
}
}
@@ -2637,6 +2938,10 @@ CheckDebugProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DebugSupport")) {
+ GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB);
+ }
}
}
@@ -2706,6 +3011,9 @@ CheckDriverOverrideProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PlatformDriverOverride")) {
+ GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", ValueA);
+ }
}
}
@@ -2774,6 +3082,9 @@ CheckATAProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"AtaPassThru")) {
+ GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2845,6 +3156,12 @@ CheckEbcProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) {
+ GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk != NULL);
+ GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage != NULL);
+ GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterICacheFlush != NULL);
+ GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion != NULL);
+ }
}
}
@@ -2941,6 +3258,9 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -2998,6 +3318,10 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns4ProtocolGuid ", ValueB);
+ }
}
}
@@ -3067,6 +3391,9 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3124,6 +3451,10 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns6ProtocolGuid ", ValueB);
+ }
}
}
@@ -3205,6 +3536,10 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3263,6 +3598,11 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiTlsProtocolGuid ", ValueC);
+ }
}
}
@@ -3346,6 +3686,10 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3404,6 +3748,11 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiHttpProtocolGuid ", ValueC);
+ }
}
}
@@ -3493,6 +3842,11 @@ CheckEAPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EAPSupport")) {
+ GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC);
+ }
}
}
@@ -3588,6 +3942,11 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ }
}
//
@@ -3652,6 +4011,12 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid ", ValueD);
+ }
}
}
@@ -3743,6 +4108,11 @@ CheckBlueToothLEProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothLESupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", ValueC);
+ }
}
}
@@ -3832,6 +4202,10 @@ CheckIPSecProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"IPSecSupport")) {
+ GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB);
+ }
}
}
@@ -3852,3 +4226,119 @@ CheckIPSecProtocols (
return EFI_SUCCESS;
}
+
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ CHAR16 *TitleString,
+ EFI_INI_FILE_HANDLE ConfigINI
+){
+ UINTN Index;
+ static CONFIG_ERROR_DATA Data;
+
+ if (TitleString == NULL && ConfigINI != NULL) {
+ //
+ // If only gave ConfigINI, init struct.
+ //
+ gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, (VOID**)&(Data.TitleString));
+ Data.ConfigINI = ConfigINI;
+ Data.ErrorCount = 0;
+
+ return NULL;
+ } else if (TitleString != NULL && ConfigINI == NULL) {
+ //
+ // If Only gave TitleString, update the title and error count +1.
+ //
+ for (Index=0; Data.TitleString[Index]=TitleString[Index], TitleString[Index]!=0; Index++);
+ Data.ErrorCount++;
+
+ return &Data;
+ } else if (TitleString != NULL && ConfigINI != NULL) {
+ //
+ // If Both not NULL, end of the function, free the buffer.
+ //
+ gtBS->FreePool (Data.TitleString);
+ return &Data;
+ }
+ //
+ // If both NULL, just return struct data.
+ //
+ return &Data;
+}
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+){
+ CONFIG_ERROR_DATA *ErrorData;
+ EFI_STATUS Status;
+ CHAR16 String[MAX_LENGTH];
+ UINT32 MaxLength;
+
+ //
+ // Check need to gen config.ini or not.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_PLATFORM_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") == 0)) {
+ return EFI_UNSUPPORTED;
+ }
+
+ //
+ // If platform owner is not sure platform config yet, this item can skip this test.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"IGNORE_COMPLIANT_TEST_CSV",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
+ *AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
+
+ ErrorData = ConstructionAndAcquisition (TestItemString, NULL);
+ //
+ // Set title
+ //
+ ErrorData->ConfigINI->SetStringByOrder (
+ ErrorData->ConfigINI,
+ ErrorData->ErrorCount,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItemString),
+ L"Device Status :",
+ L": Unavailable"
+ );
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (NULL, NULL);
+ //
+ // Gen content
+ //
+ ErrorData->ConfigINI->SetString (
+ ErrorData->ConfigINI,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorData->TitleString),
+ SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString),
+ Value ? L": Exist in system !": L": Not exist in system !"
+ );
+
+ return EFI_SUCCESS;
+}
+
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest".
@ 2019-10-14 8:47 ArvinX Chen
0 siblings, 0 replies; 7+ messages in thread
From: ArvinX Chen @ 2019-10-14 8:47 UTC (permalink / raw)
To: devel; +Cc: Eric Jin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2155
Now the test item "EFICompliantTest" will be gen in the XXX.csv.
However, I find most of the SCT user will not know what platform
config they test is, so I think we can independently generate a
file of the "EFICompliantTest" tests, then the SCT tester can send
this file to the platform owner and let them directly handle the
compliant issue.
This patch will auto gen a file in path SCT\Report\PlatformConfig.ini
once tester retest again, system will delete the current PlatformConfig.ini
and create a new one. If tester want to ignore test results in *.csv,
tester can modify EfiCompliant.ini to control it.
Cc: Eric Jin <eric.jin@intel.com>
Signed-off-by: ArvinX Chen <arvinx.chen@intel.com>
---
.../Dependency/Config/EfiCompliant.ini | 13 +-
.../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 492 ++++++++++++++++++++-
2 files changed, 503 insertions(+), 2 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
index d234d87a..4deaae3b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
@@ -1,6 +1,6 @@
## @file
#
-# Copyright 2006 - 2016 Unified EFI, Inc.<BR>
+# Copyright 2006 - 2019 Unified EFI, Inc.<BR>
# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -24,6 +24,14 @@
#
# Notes:
#
+### [Test Configuration Specific]
+#
+# GEN_CONFIG_INI_FILE_ON = <yes: Generate PlatformConfig.ini under the report folder>
+#
+# IGNORE_COMPLIANT_TEST_CSV = <yes: EFI compliant testing fail will not be generated in the report/*.csv file, but if GEN_CONFIG_INI_FILE_ON is "no", this item will aways be no.>
+#
+### [Platform Specific]
+#
# ConsoleDevices = <yes: if this platform includes console devices>
#
# HiiConfigSupport = <yes: if this platform includes Hii Config Support>
@@ -91,6 +99,9 @@
# IPSecSupport = <yes: if this platform supports IPSec network>
#
#--*/
+[Test Configuration Specific]
+GEN_CONFIG_INI_FILE_ON = yes
+IGNORE_COMPLIANT_TEST_CSV = no
[Platform Specific]
ConsoleDevices = yes
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index ae76c909..7a2c2232 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
@@ -28,7 +28,7 @@ Abstract:
// Includes
//
-#include "SctLib.h"
+#include "SctLib.h"
#include "EfiCompliantBbTestMain_uefi.h"
#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
#include EFI_PROTOCOL_DEFINITION (SimpleTextInEx)
@@ -87,6 +87,9 @@ extern EFI_GUID gGlobalVariableGuid;
//
#define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific"
+#define SECTION_NAME_CONFIGURATION_SPECIFIC L"Test Configuration Specific"
+#define CONFIN_TITLE_STRING L"|================= Configuration Environment =================|"
+#define MAX_SIZE 0xFF
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 }}
@@ -170,6 +173,12 @@ EFI_GUID gEfiBlueToothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x
EFI_GUID gEfiBlueToothLEConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }};
+typedef struct CONFIG_ERROR_DATA {
+ UINT8 ErrorCount;
+ CHAR16 *TitleString;
+ EFI_INI_FILE_HANDLE ConfigINI;
+} CONFIG_ERROR_DATA;
+
//
// The Max length of pre-defined string value(yes or no)
// in the EfiCompliant.ini
@@ -381,6 +390,25 @@ CheckIPSecProtocols (
IN EFI_INI_FILE_HANDLE IniFile
);
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ IN CHAR16 *TitleString,
+ IN EFI_INI_FILE_HANDLE ConfigINI
+);
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+);
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+);
+
//
// External functions implementation
//
@@ -405,6 +433,25 @@ Routine Description:
EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
EFI_TEST_PROFILE_LIBRARY_PROTOCOL *ProfileLib;
EFI_INI_FILE_HANDLE IniFile;
+ EFI_INI_FILE_HANDLE ConfigINI;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume;
+ EFI_HANDLE DeviceHandle;
+ EFI_FILE *Root;
+ EFI_FILE *OldFile;
+ CONFIG_ERROR_DATA *ErrorData;
+ UINT8 Index;
+ BOOLEAN GenConfigINI;
+ CHAR16 String[MAX_LENGTH];
+ CHAR16 *FilePath;
+ CHAR16 *TitleString[] = {
+ L"<|If fail item is not 0, it mean platform config have error ___",
+ L"<|occur or EfiCompliant.ini setting have wrong. ________________",
+ L"<|Please sent this file and EfiCompliant.ini to platform owner .",
+ L"<|EfiCompliant.ini is in the : SCT\\Dependency\\EfiCompliantBBTest",
+ L"<|==============================================================",
+ NULL
+ };
//
// Locate the standard test library protocol
@@ -430,6 +477,62 @@ Routine Description:
return Status;
}
+ //
+ // Check PlatformConfig.ini file is exise or not.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+ Status = OpenIniFile (
+ ProfileLib,
+ L"Report",
+ L"PlatformConfig.ini",
+ &ConfigINI
+ );
+ if (ConfigINI != NULL) {
+ //
+ // If file exise, delete it.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+
+ Status = gtBS->LocateDevicePath (
+ &gEfiSimpleFileSystemProtocolGuid,
+ &DevicePath,
+ &DeviceHandle
+ );
+ if (EFI_ERROR (Status)) return Status;
+
+ Status = gtBS->HandleProtocol (
+ DeviceHandle,
+ &gEfiSimpleFileSystemProtocolGuid,
+ (VOID*)&Volume
+ );
+ if (EFI_ERROR (Status)) return Status;
+
+ Status = Volume->OpenVolume(Volume, &Root);
+ if (EFI_ERROR (Status)) return Status;
+
+ Status = Root->Open (
+ Root,
+ &OldFile,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE,
+ 0
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = OldFile->Delete (OldFile);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Root->Close (Root);
+ }
+
//
// Open the INI file
//
@@ -453,6 +556,68 @@ Routine Description:
return Status;
}
+ GenConfigINI = TRUE;
+ Index = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &Index
+ );
+ if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") == 0)) {
+ GenConfigINI = FALSE;
+ }
+
+ if (GenConfigINI == TRUE) {
+ //
+ // Create the config.ini file.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+
+ Status = ProfileLib->EfiIniCreate (
+ ProfileLib,
+ DevicePath,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ &ConfigINI
+ );
+ if (EFI_ERROR (Status)) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gTestGenericFailureGuid,
+ L"UEFI Compliant - Cannot create or open INI file",
+ L"%a:%d:",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ return Status;
+ }
+ //
+ // Gen PlatformConfig.ini title and description.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ CONFIN_TITLE_STRING,
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", 0x00)
+ );
+ for (Index=0; TitleString[Index] != NULL ;Index++) {
+ ConfigINI->SetString (
+ ConfigINI,
+ CONFIN_TITLE_STRING,
+ TitleString[Index],
+ L"|>"
+ );
+ }
+ ConstructionAndAcquisition (NULL, ConfigINI);
+ }
+
//
// Check the console protocols
//
@@ -594,6 +759,26 @@ Routine Description:
//
CloseIniFile (ProfileLib, IniFile);
+ //
+ // Save data to platform.ini
+ //
+ if (GenConfigINI == TRUE) {
+ ErrorData = ConstructionAndAcquisition (L"END", ConfigINI);
+ //
+ // Update fail count.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", ErrorData->ErrorCount)
+ );
+ //
+ // If have error occor and GenTestINI flag is on, gen the report file.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ }
return EFI_SUCCESS;
}
@@ -810,6 +995,11 @@ CheckConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ConsoleDevices")) {
+ GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", ValueC);
+ }
}
}
@@ -888,6 +1078,12 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiConfigSupport")) {
+ GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value[2]);
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value[3]);
+ }
}
}
@@ -929,6 +1125,9 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiFontSupport")) {
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]);
+ }
}
}
@@ -1028,6 +1227,11 @@ CheckGraphicalConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"GraphicalConsoleDevices")) {
+ GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC);
+ }
}
}
@@ -1098,6 +1302,9 @@ CheckPointerProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PointerDevices")) {
+ GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA);
+ }
}
}
@@ -1211,6 +1418,12 @@ CheckBootFromDiskProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromDiskDevices")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", ValueC);
+ GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", ValueD);
+ }
}
}
@@ -1353,6 +1566,12 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNetworkDevices")) {
+ GenTestConfigContent (L"gEfiPxeBaseCodeProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleNetworkProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiNetworkInterfaceIdentifierProtocolGuid", Value[2]);
+ }
}
}
@@ -1391,6 +1610,9 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ValidateBootImageThruNet")) {
+ GenTestConfigContent (L"Variable \"SetupMode\"", ValueC);
+ }
}
}
@@ -1481,6 +1703,15 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1582,6 +1813,21 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiArpProtocolGuid ", Value[8]);
+ GenTestConfigContent (L"gEfiIp4ProtocolGuid ", Value[9]);
+ GenTestConfigContent (L"gEfiDhcp4ProtocolGuid ", Value[10]);
+ GenTestConfigContent (L"gEfiTcp4ProtocolGuid ", Value[11]);
+ GenTestConfigContent (L"gEfiUdp4ProtocolGuid ", Value[12]);
+ }
}
}
@@ -1679,6 +1925,13 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1774,6 +2027,17 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiDhcp6ProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiTcp6ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiIp6ProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiUdp6ProtocolGuid ", Value[8]);
+ }
}
}
@@ -1830,6 +2094,9 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"VlanSupport")) {
+ GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9]);
+ }
}
}
@@ -1902,6 +2169,9 @@ CheckUartProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UartDevices")) {
+ GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA);
+ }
}
}
@@ -1986,6 +2256,10 @@ CheckPciProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PciBusSupport")) {
+ GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2070,6 +2344,10 @@ CheckUsbProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UsbBusSupport")) {
+ GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2139,6 +2417,9 @@ CheckNVMeProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2222,6 +2503,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNVMe")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ }
}
}
@@ -2258,6 +2542,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2330,6 +2617,9 @@ CheckScsiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThru")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2428,6 +2718,10 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromScsi")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC);
+ }
}
}
@@ -2465,6 +2759,9 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThruSupport")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2550,6 +2847,10 @@ CheckBootFromIScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromIscsi")) {
+ GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", ValueB);
+ }
}
}
@@ -2637,6 +2938,10 @@ CheckDebugProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DebugSupport")) {
+ GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB);
+ }
}
}
@@ -2706,6 +3011,9 @@ CheckDriverOverrideProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PlatformDriverOverride")) {
+ GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", ValueA);
+ }
}
}
@@ -2774,6 +3082,9 @@ CheckATAProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"AtaPassThru")) {
+ GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2845,6 +3156,12 @@ CheckEbcProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) {
+ GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk != NULL);
+ GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage != NULL);
+ GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterICacheFlush != NULL);
+ GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion != NULL);
+ }
}
}
@@ -2941,6 +3258,9 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -2998,6 +3318,10 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns4ProtocolGuid ", ValueB);
+ }
}
}
@@ -3067,6 +3391,9 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3124,6 +3451,10 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns6ProtocolGuid ", ValueB);
+ }
}
}
@@ -3205,6 +3536,10 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3263,6 +3598,11 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiTlsProtocolGuid ", ValueC);
+ }
}
}
@@ -3346,6 +3686,10 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3404,6 +3748,11 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiHttpProtocolGuid ", ValueC);
+ }
}
}
@@ -3493,6 +3842,11 @@ CheckEAPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EAPSupport")) {
+ GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC);
+ }
}
}
@@ -3588,6 +3942,11 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ }
}
//
@@ -3652,6 +4011,12 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid ", ValueD);
+ }
}
}
@@ -3743,6 +4108,11 @@ CheckBlueToothLEProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothLESupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", ValueC);
+ }
}
}
@@ -3832,6 +4202,10 @@ CheckIPSecProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"IPSecSupport")) {
+ GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB);
+ }
}
}
@@ -3852,3 +4226,119 @@ CheckIPSecProtocols (
return EFI_SUCCESS;
}
+
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ CHAR16 *TitleString,
+ EFI_INI_FILE_HANDLE ConfigINI
+){
+ UINTN Index;
+ static CONFIG_ERROR_DATA Data;
+
+ if (TitleString == NULL && ConfigINI != NULL) {
+ //
+ // If only gave ConfigINI, init struct.
+ //
+ gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, (VOID**)&(Data.TitleString));
+ Data.ConfigINI = ConfigINI;
+ Data.ErrorCount = 0;
+
+ return NULL;
+ } else if (TitleString != NULL && ConfigINI == NULL) {
+ //
+ // If Only gave TitleString, update the title and error count +1.
+ //
+ for (Index=0; Data.TitleString[Index]=TitleString[Index], TitleString[Index]!=0; Index++);
+ Data.ErrorCount++;
+
+ return &Data;
+ } else if (TitleString != NULL && ConfigINI != NULL) {
+ //
+ // If Both not NULL, end of the function, free the buffer.
+ //
+ gtBS->FreePool (Data.TitleString);
+ return &Data;
+ }
+ //
+ // If both NULL, just return struct data.
+ //
+ return &Data;
+}
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+){
+ CONFIG_ERROR_DATA *ErrorData;
+ EFI_STATUS Status;
+ CHAR16 String[MAX_LENGTH];
+ UINT32 MaxLength;
+
+ //
+ // Check need to gen config.ini or not.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_PLATFORM_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") == 0)) {
+ return EFI_UNSUPPORTED;
+ }
+
+ //
+ // If platform owner is not sure platform config yet, this item can skip this test.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"IGNORE_COMPLIANT_TEST_CSV",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
+ *AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
+
+ ErrorData = ConstructionAndAcquisition (TestItemString, NULL);
+ //
+ // Set title
+ //
+ ErrorData->ConfigINI->SetStringByOrder (
+ ErrorData->ConfigINI,
+ ErrorData->ErrorCount,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItemString),
+ L"Device Status :",
+ L": Unavailable"
+ );
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (NULL, NULL);
+ //
+ // Gen content
+ //
+ ErrorData->ConfigINI->SetString (
+ ErrorData->ConfigINI,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorData->TitleString),
+ SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString),
+ Value ? L": Exist in system !": L": Not exist in system !"
+ );
+
+ return EFI_SUCCESS;
+}
+
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest".
@ 2019-10-14 9:01 ArvinX Chen
0 siblings, 0 replies; 7+ messages in thread
From: ArvinX Chen @ 2019-10-14 9:01 UTC (permalink / raw)
To: devel; +Cc: Eric Jin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2155
Now the test item "EFICompliantTest" will be gen in the XXX.csv.
However, I find most of the SCT user will not know what platform
config they test is, so I think we can independently generate a
file of the "EFICompliantTest" tests, then the SCT tester can send
this file to the platform owner and let them directly handle the
compliant issue.
This patch will auto gen a file in path SCT\Report\PlatformConfig.ini
once tester retest again, system will delete the current PlatformConfig.ini
and create a new one. If tester want to ignore test results in *.csv,
tester can modify EfiCompliant.ini to control it.
Cc: Eric Jin <eric.jin@intel.com>
Signed-off-by: ArvinX Chen <arvinx.chen@intel.com>
---
.../Dependency/Config/EfiCompliant.ini | 13 +-
.../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 498 ++++++++++++++++++++-
2 files changed, 509 insertions(+), 2 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
index d234d87a..4deaae3b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
@@ -1,6 +1,6 @@
## @file
#
-# Copyright 2006 - 2016 Unified EFI, Inc.<BR>
+# Copyright 2006 - 2019 Unified EFI, Inc.<BR>
# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -24,6 +24,14 @@
#
# Notes:
#
+### [Test Configuration Specific]
+#
+# GEN_CONFIG_INI_FILE_ON = <yes: Generate PlatformConfig.ini under the report folder>
+#
+# IGNORE_COMPLIANT_TEST_CSV = <yes: EFI compliant testing fail will not be generated in the report/*.csv file, but if GEN_CONFIG_INI_FILE_ON is "no", this item will aways be no.>
+#
+### [Platform Specific]
+#
# ConsoleDevices = <yes: if this platform includes console devices>
#
# HiiConfigSupport = <yes: if this platform includes Hii Config Support>
@@ -91,6 +99,9 @@
# IPSecSupport = <yes: if this platform supports IPSec network>
#
#--*/
+[Test Configuration Specific]
+GEN_CONFIG_INI_FILE_ON = yes
+IGNORE_COMPLIANT_TEST_CSV = no
[Platform Specific]
ConsoleDevices = yes
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index ae76c909..64210bb8 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
@@ -28,7 +28,7 @@ Abstract:
// Includes
//
-#include "SctLib.h"
+#include "SctLib.h"
#include "EfiCompliantBbTestMain_uefi.h"
#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
#include EFI_PROTOCOL_DEFINITION (SimpleTextInEx)
@@ -87,6 +87,9 @@ extern EFI_GUID gGlobalVariableGuid;
//
#define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific"
+#define SECTION_NAME_CONFIGURATION_SPECIFIC L"Test Configuration Specific"
+#define CONFIN_TITLE_STRING L"|================= Configuration Environment =================|"
+#define MAX_SIZE 0xFF
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 }}
@@ -170,6 +173,12 @@ EFI_GUID gEfiBlueToothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x
EFI_GUID gEfiBlueToothLEConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }};
+typedef struct CONFIG_ERROR_DATA {
+ UINT8 ErrorCount;
+ CHAR16 *TitleString;
+ EFI_INI_FILE_HANDLE ConfigINI;
+} CONFIG_ERROR_DATA;
+
//
// The Max length of pre-defined string value(yes or no)
// in the EfiCompliant.ini
@@ -381,6 +390,25 @@ CheckIPSecProtocols (
IN EFI_INI_FILE_HANDLE IniFile
);
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ IN CHAR16 *TitleString,
+ IN EFI_INI_FILE_HANDLE ConfigINI
+);
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+);
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+);
+
//
// External functions implementation
//
@@ -405,6 +433,25 @@ Routine Description:
EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
EFI_TEST_PROFILE_LIBRARY_PROTOCOL *ProfileLib;
EFI_INI_FILE_HANDLE IniFile;
+ EFI_INI_FILE_HANDLE ConfigINI;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume;
+ EFI_HANDLE DeviceHandle;
+ EFI_FILE *Root;
+ EFI_FILE *OldFile;
+ CONFIG_ERROR_DATA *ErrorData;
+ UINT8 Index;
+ BOOLEAN GenConfigINI;
+ CHAR16 String[MAX_LENGTH];
+ CHAR16 *FilePath;
+ CHAR16 *TitleString[] = {
+ L"<|If fail item is not 0, it mean platform config have error ___",
+ L"<|occur or EfiCompliant.ini setting have wrong. ________________",
+ L"<|Please sent this file and EfiCompliant.ini to platform owner .",
+ L"<|EfiCompliant.ini is in the : SCT\\Dependency\\EfiCompliantBBTest",
+ L"<|==============================================================",
+ NULL
+ };
//
// Locate the standard test library protocol
@@ -430,6 +477,68 @@ Routine Description:
return Status;
}
+ //
+ // Check PlatformConfig.ini file is exise or not.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+ Status = OpenIniFile (
+ ProfileLib,
+ L"Report",
+ L"PlatformConfig.ini",
+ &ConfigINI
+ );
+ if (ConfigINI != NULL) {
+ //
+ // If file exise, delete it.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+
+ Status = gtBS->LocateDevicePath (
+ &gEfiSimpleFileSystemProtocolGuid,
+ &DevicePath,
+ &DeviceHandle
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = gtBS->HandleProtocol (
+ DeviceHandle,
+ &gEfiSimpleFileSystemProtocolGuid,
+ (VOID*)&Volume
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = Volume->OpenVolume(Volume, &Root);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = Root->Open (
+ Root,
+ &OldFile,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE,
+ 0
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = OldFile->Delete (OldFile);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Root->Close (Root);
+ }
+
//
// Open the INI file
//
@@ -453,6 +562,68 @@ Routine Description:
return Status;
}
+ GenConfigINI = TRUE;
+ Index = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &Index
+ );
+ if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") == 0)) {
+ GenConfigINI = FALSE;
+ }
+
+ if (GenConfigINI == TRUE) {
+ //
+ // Create the config.ini file.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+
+ Status = ProfileLib->EfiIniCreate (
+ ProfileLib,
+ DevicePath,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ &ConfigINI
+ );
+ if (EFI_ERROR (Status)) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gTestGenericFailureGuid,
+ L"UEFI Compliant - Cannot create or open INI file",
+ L"%a:%d:",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ return Status;
+ }
+ //
+ // Gen PlatformConfig.ini title and description.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ CONFIN_TITLE_STRING,
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", 0x00)
+ );
+ for (Index=0; TitleString[Index] != NULL ;Index++) {
+ ConfigINI->SetString (
+ ConfigINI,
+ CONFIN_TITLE_STRING,
+ TitleString[Index],
+ L"|>"
+ );
+ }
+ ConstructionAndAcquisition (NULL, ConfigINI);
+ }
+
//
// Check the console protocols
//
@@ -594,6 +765,26 @@ Routine Description:
//
CloseIniFile (ProfileLib, IniFile);
+ //
+ // Save data to platform.ini
+ //
+ if (GenConfigINI == TRUE) {
+ ErrorData = ConstructionAndAcquisition (L"END", ConfigINI);
+ //
+ // Update fail count.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", ErrorData->ErrorCount)
+ );
+ //
+ // If have error occor and GenTestINI flag is on, gen the report file.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ }
return EFI_SUCCESS;
}
@@ -810,6 +1001,11 @@ CheckConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ConsoleDevices")) {
+ GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", ValueC);
+ }
}
}
@@ -888,6 +1084,12 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiConfigSupport")) {
+ GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value[2]);
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value[3]);
+ }
}
}
@@ -929,6 +1131,9 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiFontSupport")) {
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]);
+ }
}
}
@@ -1028,6 +1233,11 @@ CheckGraphicalConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"GraphicalConsoleDevices")) {
+ GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC);
+ }
}
}
@@ -1098,6 +1308,9 @@ CheckPointerProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PointerDevices")) {
+ GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA);
+ }
}
}
@@ -1211,6 +1424,12 @@ CheckBootFromDiskProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromDiskDevices")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", ValueC);
+ GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", ValueD);
+ }
}
}
@@ -1353,6 +1572,12 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNetworkDevices")) {
+ GenTestConfigContent (L"gEfiPxeBaseCodeProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleNetworkProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiNetworkInterfaceIdentifierProtocolGuid", Value[2]);
+ }
}
}
@@ -1391,6 +1616,9 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ValidateBootImageThruNet")) {
+ GenTestConfigContent (L"Variable \"SetupMode\"", ValueC);
+ }
}
}
@@ -1481,6 +1709,15 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1582,6 +1819,21 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiArpProtocolGuid ", Value[8]);
+ GenTestConfigContent (L"gEfiIp4ProtocolGuid ", Value[9]);
+ GenTestConfigContent (L"gEfiDhcp4ProtocolGuid ", Value[10]);
+ GenTestConfigContent (L"gEfiTcp4ProtocolGuid ", Value[11]);
+ GenTestConfigContent (L"gEfiUdp4ProtocolGuid ", Value[12]);
+ }
}
}
@@ -1679,6 +1931,13 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1774,6 +2033,17 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiDhcp6ProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiTcp6ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiIp6ProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiUdp6ProtocolGuid ", Value[8]);
+ }
}
}
@@ -1830,6 +2100,9 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"VlanSupport")) {
+ GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9]);
+ }
}
}
@@ -1902,6 +2175,9 @@ CheckUartProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UartDevices")) {
+ GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA);
+ }
}
}
@@ -1986,6 +2262,10 @@ CheckPciProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PciBusSupport")) {
+ GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2070,6 +2350,10 @@ CheckUsbProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UsbBusSupport")) {
+ GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2139,6 +2423,9 @@ CheckNVMeProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2222,6 +2509,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNVMe")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ }
}
}
@@ -2258,6 +2548,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2330,6 +2623,9 @@ CheckScsiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThru")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2428,6 +2724,10 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromScsi")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC);
+ }
}
}
@@ -2465,6 +2765,9 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThruSupport")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2550,6 +2853,10 @@ CheckBootFromIScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromIscsi")) {
+ GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", ValueB);
+ }
}
}
@@ -2637,6 +2944,10 @@ CheckDebugProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DebugSupport")) {
+ GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB);
+ }
}
}
@@ -2706,6 +3017,9 @@ CheckDriverOverrideProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PlatformDriverOverride")) {
+ GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", ValueA);
+ }
}
}
@@ -2774,6 +3088,9 @@ CheckATAProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"AtaPassThru")) {
+ GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2845,6 +3162,12 @@ CheckEbcProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) {
+ GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk != NULL);
+ GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage != NULL);
+ GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterICacheFlush != NULL);
+ GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion != NULL);
+ }
}
}
@@ -2941,6 +3264,9 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -2998,6 +3324,10 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns4ProtocolGuid ", ValueB);
+ }
}
}
@@ -3067,6 +3397,9 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3124,6 +3457,10 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns6ProtocolGuid ", ValueB);
+ }
}
}
@@ -3205,6 +3542,10 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3263,6 +3604,11 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiTlsProtocolGuid ", ValueC);
+ }
}
}
@@ -3346,6 +3692,10 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3404,6 +3754,11 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiHttpProtocolGuid ", ValueC);
+ }
}
}
@@ -3493,6 +3848,11 @@ CheckEAPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EAPSupport")) {
+ GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC);
+ }
}
}
@@ -3588,6 +3948,11 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ }
}
//
@@ -3652,6 +4017,12 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid ", ValueD);
+ }
}
}
@@ -3743,6 +4114,11 @@ CheckBlueToothLEProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothLESupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", ValueC);
+ }
}
}
@@ -3832,6 +4208,10 @@ CheckIPSecProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"IPSecSupport")) {
+ GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB);
+ }
}
}
@@ -3852,3 +4232,119 @@ CheckIPSecProtocols (
return EFI_SUCCESS;
}
+
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ CHAR16 *TitleString,
+ EFI_INI_FILE_HANDLE ConfigINI
+){
+ UINTN Index;
+ static CONFIG_ERROR_DATA Data;
+
+ if (TitleString == NULL && ConfigINI != NULL) {
+ //
+ // If only gave ConfigINI, init struct.
+ //
+ gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, (VOID**)&(Data.TitleString));
+ Data.ConfigINI = ConfigINI;
+ Data.ErrorCount = 0;
+
+ return NULL;
+ } else if (TitleString != NULL && ConfigINI == NULL) {
+ //
+ // If Only gave TitleString, update the title and error count +1.
+ //
+ for (Index=0; Data.TitleString[Index]=TitleString[Index], TitleString[Index]!=0; Index++);
+ Data.ErrorCount++;
+
+ return &Data;
+ } else if (TitleString != NULL && ConfigINI != NULL) {
+ //
+ // If Both not NULL, end of the function, free the buffer.
+ //
+ gtBS->FreePool (Data.TitleString);
+ return &Data;
+ }
+ //
+ // If both NULL, just return struct data.
+ //
+ return &Data;
+}
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+){
+ CONFIG_ERROR_DATA *ErrorData;
+ EFI_STATUS Status;
+ CHAR16 String[MAX_LENGTH];
+ UINT32 MaxLength;
+
+ //
+ // Check need to gen config.ini or not.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") == 0)) {
+ return EFI_UNSUPPORTED;
+ }
+
+ //
+ // If platform owner is not sure platform config yet, this item can skip this test.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"IGNORE_COMPLIANT_TEST_CSV",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
+ *AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
+
+ ErrorData = ConstructionAndAcquisition (TestItemString, NULL);
+ //
+ // Set title
+ //
+ ErrorData->ConfigINI->SetStringByOrder (
+ ErrorData->ConfigINI,
+ ErrorData->ErrorCount,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItemString),
+ L"Device Status :",
+ L": Unavailable"
+ );
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (NULL, NULL);
+ //
+ // Gen content
+ //
+ ErrorData->ConfigINI->SetString (
+ ErrorData->ConfigINI,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorData->TitleString),
+ SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString),
+ Value ? L": Exist in system !": L": Not exist in system !"
+ );
+
+ return EFI_SUCCESS;
+}
+
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest".
@ 2019-10-15 8:52 Chen, ArvinX
0 siblings, 0 replies; 7+ messages in thread
From: Chen, ArvinX @ 2019-10-15 8:52 UTC (permalink / raw)
To: devel; +Cc: Eric Jin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2155
Now the test item "EFICompliantTest" will be gen in the XXX.csv.
However, I find most of the SCT user will not know what platform
config they test is, so I think we can independently generate a
file of the "EFICompliantTest" tests, then the SCT tester can send
this file to the platform owner and let them directly handle the
compliant issue.
This patch will auto gen a file in path SCT\Report\PlatformConfig.ini
once tester retest again, system will delete the current PlatformConfig.ini
and create a new one. If tester want to ignore test results in *.csv,
tester can modify EfiCompliant.ini to control it.
Cc: Eric Jin <eric.jin@intel.com>
Signed-off-by: ArvinX Chen <arvinx.chen@intel.com>
---
.../Dependency/Config/EfiCompliant.ini | 13 +-
.../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 498 ++++++++++++++++++++-
2 files changed, 509 insertions(+), 2 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
index d234d87a..4deaae3b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
@@ -1,6 +1,6 @@
## @file
#
-# Copyright 2006 - 2016 Unified EFI, Inc.<BR>
+# Copyright 2006 - 2019 Unified EFI, Inc.<BR>
# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -24,6 +24,14 @@
#
# Notes:
#
+### [Test Configuration Specific]
+#
+# GEN_CONFIG_INI_FILE_ON = <yes: Generate PlatformConfig.ini under the report folder>
+#
+# IGNORE_COMPLIANT_TEST_CSV = <yes: EFI compliant testing fail will not be generated in the report/*.csv file, but if GEN_CONFIG_INI_FILE_ON is "no", this item will aways be no.>
+#
+### [Platform Specific]
+#
# ConsoleDevices = <yes: if this platform includes console devices>
#
# HiiConfigSupport = <yes: if this platform includes Hii Config Support>
@@ -91,6 +99,9 @@
# IPSecSupport = <yes: if this platform supports IPSec network>
#
#--*/
+[Test Configuration Specific]
+GEN_CONFIG_INI_FILE_ON = yes
+IGNORE_COMPLIANT_TEST_CSV = no
[Platform Specific]
ConsoleDevices = yes
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index ae76c909..eae51415 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
@@ -28,7 +28,7 @@ Abstract:
// Includes
//
-#include "SctLib.h"
+#include "SctLib.h"
#include "EfiCompliantBbTestMain_uefi.h"
#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
#include EFI_PROTOCOL_DEFINITION (SimpleTextInEx)
@@ -87,6 +87,9 @@ extern EFI_GUID gGlobalVariableGuid;
//
#define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific"
+#define SECTION_NAME_CONFIGURATION_SPECIFIC L"Test Configuration Specific"
+#define CONFIN_TITLE_STRING L"|================= Configuration Environment =================|"
+#define MAX_SIZE 0xFF
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 }}
@@ -170,6 +173,12 @@ EFI_GUID gEfiBlueToothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x
EFI_GUID gEfiBlueToothLEConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }};
+typedef struct CONFIG_ERROR_DATA {
+ UINT8 ErrorCount;
+ CHAR16 *TitleString;
+ EFI_INI_FILE_HANDLE ConfigINI;
+} CONFIG_ERROR_DATA;
+
//
// The Max length of pre-defined string value(yes or no)
// in the EfiCompliant.ini
@@ -381,6 +390,25 @@ CheckIPSecProtocols (
IN EFI_INI_FILE_HANDLE IniFile
);
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ IN CHAR16 *TitleString,
+ IN EFI_INI_FILE_HANDLE ConfigINI
+);
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+);
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+);
+
//
// External functions implementation
//
@@ -405,6 +433,25 @@ Routine Description:
EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
EFI_TEST_PROFILE_LIBRARY_PROTOCOL *ProfileLib;
EFI_INI_FILE_HANDLE IniFile;
+ EFI_INI_FILE_HANDLE ConfigINI;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume;
+ EFI_HANDLE DeviceHandle;
+ EFI_FILE *Root;
+ EFI_FILE *OldFile;
+ CONFIG_ERROR_DATA *ErrorData;
+ UINT8 Index;
+ BOOLEAN GenConfigINI;
+ CHAR16 String[MAX_LENGTH];
+ CHAR16 *FilePath;
+ CHAR16 *TitleString[] = {
+ L"<|If fail item is not 0, it mean platform config have error ___",
+ L"<|occur or EfiCompliant.ini setting have wrong. ________________",
+ L"<|Please sent this file and EfiCompliant.ini to platform owner .",
+ L"<|EfiCompliant.ini is in the : SCT\\Dependency\\EfiCompliantBBTest",
+ L"<|==============================================================",
+ NULL
+ };
//
// Locate the standard test library protocol
@@ -430,6 +477,68 @@ Routine Description:
return Status;
}
+ //
+ // Check PlatformConfig.ini file is exise or not.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+ Status = OpenIniFile (
+ ProfileLib,
+ L"Report",
+ L"PlatformConfig.ini",
+ &ConfigINI
+ );
+ if (ConfigINI != NULL) {
+ //
+ // If file exise, delete it.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+
+ Status = gtBS->LocateDevicePath (
+ &gEfiSimpleFileSystemProtocolGuid,
+ &DevicePath,
+ &DeviceHandle
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = gtBS->HandleProtocol (
+ DeviceHandle,
+ &gEfiSimpleFileSystemProtocolGuid,
+ (VOID*)&Volume
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = Volume->OpenVolume(Volume, &Root);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = Root->Open (
+ Root,
+ &OldFile,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE,
+ 0
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = OldFile->Delete (OldFile);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Root->Close (Root);
+ }
+
//
// Open the INI file
//
@@ -453,6 +562,68 @@ Routine Description:
return Status;
}
+ GenConfigINI = FALSE;
+ Index = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &Index
+ );
+ if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
+ GenConfigINI = TRUE;
+ }
+
+ if (GenConfigINI == TRUE) {
+ //
+ // Create the config.ini file.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+
+ Status = ProfileLib->EfiIniCreate (
+ ProfileLib,
+ DevicePath,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ &ConfigINI
+ );
+ if (EFI_ERROR (Status)) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gTestGenericFailureGuid,
+ L"UEFI Compliant - Cannot create or open INI file",
+ L"%a:%d:",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ return Status;
+ }
+ //
+ // Gen PlatformConfig.ini title and description.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ CONFIN_TITLE_STRING,
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", 0x00)
+ );
+ for (Index=0; TitleString[Index] != NULL ;Index++) {
+ ConfigINI->SetString (
+ ConfigINI,
+ CONFIN_TITLE_STRING,
+ TitleString[Index],
+ L"|>"
+ );
+ }
+ ConstructionAndAcquisition (NULL, ConfigINI);
+ }
+
//
// Check the console protocols
//
@@ -594,6 +765,26 @@ Routine Description:
//
CloseIniFile (ProfileLib, IniFile);
+ //
+ // Save data to platform.ini
+ //
+ if (GenConfigINI == TRUE) {
+ ErrorData = ConstructionAndAcquisition (L"END", ConfigINI);
+ //
+ // Update fail count.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", ErrorData->ErrorCount)
+ );
+ //
+ // If have error occor and GenTestINI flag is on, gen the report file.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ }
return EFI_SUCCESS;
}
@@ -810,6 +1001,11 @@ CheckConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ConsoleDevices")) {
+ GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", ValueC);
+ }
}
}
@@ -888,6 +1084,12 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiConfigSupport")) {
+ GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value[2]);
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value[3]);
+ }
}
}
@@ -929,6 +1131,9 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiFontSupport")) {
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]);
+ }
}
}
@@ -1028,6 +1233,11 @@ CheckGraphicalConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"GraphicalConsoleDevices")) {
+ GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC);
+ }
}
}
@@ -1098,6 +1308,9 @@ CheckPointerProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PointerDevices")) {
+ GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA);
+ }
}
}
@@ -1211,6 +1424,12 @@ CheckBootFromDiskProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromDiskDevices")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", ValueC);
+ GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", ValueD);
+ }
}
}
@@ -1353,6 +1572,12 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNetworkDevices")) {
+ GenTestConfigContent (L"gEfiPxeBaseCodeProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleNetworkProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiNetworkInterfaceIdentifierProtocolGuid", Value[2]);
+ }
}
}
@@ -1391,6 +1616,9 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ValidateBootImageThruNet")) {
+ GenTestConfigContent (L"Variable \"SetupMode\"", ValueC);
+ }
}
}
@@ -1481,6 +1709,15 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1582,6 +1819,21 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiArpProtocolGuid ", Value[8]);
+ GenTestConfigContent (L"gEfiIp4ProtocolGuid ", Value[9]);
+ GenTestConfigContent (L"gEfiDhcp4ProtocolGuid ", Value[10]);
+ GenTestConfigContent (L"gEfiTcp4ProtocolGuid ", Value[11]);
+ GenTestConfigContent (L"gEfiUdp4ProtocolGuid ", Value[12]);
+ }
}
}
@@ -1679,6 +1931,13 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1774,6 +2033,17 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiDhcp6ProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiTcp6ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiIp6ProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiUdp6ProtocolGuid ", Value[8]);
+ }
}
}
@@ -1830,6 +2100,9 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"VlanSupport")) {
+ GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9]);
+ }
}
}
@@ -1902,6 +2175,9 @@ CheckUartProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UartDevices")) {
+ GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA);
+ }
}
}
@@ -1986,6 +2262,10 @@ CheckPciProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PciBusSupport")) {
+ GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2070,6 +2350,10 @@ CheckUsbProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UsbBusSupport")) {
+ GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2139,6 +2423,9 @@ CheckNVMeProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2222,6 +2509,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNVMe")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ }
}
}
@@ -2258,6 +2548,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2330,6 +2623,9 @@ CheckScsiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThru")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2428,6 +2724,10 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromScsi")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC);
+ }
}
}
@@ -2465,6 +2765,9 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThruSupport")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2550,6 +2853,10 @@ CheckBootFromIScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromIscsi")) {
+ GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", ValueB);
+ }
}
}
@@ -2637,6 +2944,10 @@ CheckDebugProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DebugSupport")) {
+ GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB);
+ }
}
}
@@ -2706,6 +3017,9 @@ CheckDriverOverrideProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PlatformDriverOverride")) {
+ GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", ValueA);
+ }
}
}
@@ -2774,6 +3088,9 @@ CheckATAProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"AtaPassThru")) {
+ GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2845,6 +3162,12 @@ CheckEbcProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) {
+ GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk != NULL);
+ GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage != NULL);
+ GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterICacheFlush != NULL);
+ GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion != NULL);
+ }
}
}
@@ -2941,6 +3264,9 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -2998,6 +3324,10 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns4ProtocolGuid ", ValueB);
+ }
}
}
@@ -3067,6 +3397,9 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3124,6 +3457,10 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns6ProtocolGuid ", ValueB);
+ }
}
}
@@ -3205,6 +3542,10 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3263,6 +3604,11 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiTlsProtocolGuid ", ValueC);
+ }
}
}
@@ -3346,6 +3692,10 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3404,6 +3754,11 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiHttpProtocolGuid ", ValueC);
+ }
}
}
@@ -3493,6 +3848,11 @@ CheckEAPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EAPSupport")) {
+ GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC);
+ }
}
}
@@ -3588,6 +3948,11 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ }
}
//
@@ -3652,6 +4017,12 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid ", ValueD);
+ }
}
}
@@ -3743,6 +4114,11 @@ CheckBlueToothLEProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothLESupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", ValueC);
+ }
}
}
@@ -3832,6 +4208,10 @@ CheckIPSecProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"IPSecSupport")) {
+ GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB);
+ }
}
}
@@ -3852,3 +4232,119 @@ CheckIPSecProtocols (
return EFI_SUCCESS;
}
+
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ CHAR16 *TitleString,
+ EFI_INI_FILE_HANDLE ConfigINI
+){
+ UINTN Index;
+ static CONFIG_ERROR_DATA Data;
+
+ if (TitleString == NULL && ConfigINI != NULL) {
+ //
+ // If only gave ConfigINI, init struct.
+ //
+ gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, (VOID**)&(Data.TitleString));
+ Data.ConfigINI = ConfigINI;
+ Data.ErrorCount = 0;
+
+ return NULL;
+ } else if (TitleString != NULL && ConfigINI == NULL) {
+ //
+ // If Only gave TitleString, update the title and error count +1.
+ //
+ for (Index=0; Data.TitleString[Index]=TitleString[Index], TitleString[Index]!=0; Index++);
+ Data.ErrorCount++;
+
+ return &Data;
+ } else if (TitleString != NULL && ConfigINI != NULL) {
+ //
+ // If Both not NULL, end of the function, free the buffer.
+ //
+ gtBS->FreePool (Data.TitleString);
+ return &Data;
+ }
+ //
+ // If both NULL, just return struct data.
+ //
+ return &Data;
+}
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+){
+ CONFIG_ERROR_DATA *ErrorData;
+ EFI_STATUS Status;
+ CHAR16 String[MAX_LENGTH];
+ UINT32 MaxLength;
+
+ //
+ // Check need to gen config.ini or not.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") == 0)) {
+ return EFI_UNSUPPORTED;
+ }
+
+ //
+ // If platform owner is not sure platform config yet, this item can skip this test.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"IGNORE_COMPLIANT_TEST_CSV",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
+ *AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
+
+ ErrorData = ConstructionAndAcquisition (TestItemString, NULL);
+ //
+ // Set title
+ //
+ ErrorData->ConfigINI->SetStringByOrder (
+ ErrorData->ConfigINI,
+ ErrorData->ErrorCount,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItemString),
+ L"Device Status :",
+ L": Unavailable"
+ );
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (NULL, NULL);
+ //
+ // Gen content
+ //
+ ErrorData->ConfigINI->SetString (
+ ErrorData->ConfigINI,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorData->TitleString),
+ SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString),
+ Value ? L": Exist in system !": L": Not exist in system !"
+ );
+
+ return EFI_SUCCESS;
+}
+
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest".
@ 2019-10-16 6:33 Chen, ArvinX
0 siblings, 0 replies; 7+ messages in thread
From: Chen, ArvinX @ 2019-10-16 6:33 UTC (permalink / raw)
To: devel; +Cc: Eric Jin
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2155
Now the test item "EFICompliantTest" will be gen in the XXX.csv.
However, I find most of the SCT user will not know what platform
config they test is, so I think we can independently generate a
file of the "EFICompliantTest" tests, then the SCT tester can send
this file to the platform owner and let them directly handle the
compliant issue.
This patch will auto gen a file in path SCT\Report\PlatformConfig.ini
once tester retest again, system will delete the current PlatformConfig.ini
and create a new one. If tester want to ignore test results in *.csv,
tester can modify EfiCompliant.ini to control it.
Cc: Eric Jin <eric.jin@intel.com>
Signed-off-by: ArvinX Chen <arvinx.chen@intel.com>
---
.../Dependency/Config/EfiCompliant.ini | 13 +-
.../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 498 ++++++++++++++++++++-
2 files changed, 509 insertions(+), 2 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
index d234d87a..4deaae3b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Dependency/Config/EfiCompliant.ini
@@ -1,6 +1,6 @@
## @file
#
-# Copyright 2006 - 2016 Unified EFI, Inc.<BR>
+# Copyright 2006 - 2019 Unified EFI, Inc.<BR>
# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -24,6 +24,14 @@
#
# Notes:
#
+### [Test Configuration Specific]
+#
+# GEN_CONFIG_INI_FILE_ON = <yes: Generate PlatformConfig.ini under the report folder>
+#
+# IGNORE_COMPLIANT_TEST_CSV = <yes: EFI compliant testing fail will not be generated in the report/*.csv file, but if GEN_CONFIG_INI_FILE_ON is "no", this item will aways be no.>
+#
+### [Platform Specific]
+#
# ConsoleDevices = <yes: if this platform includes console devices>
#
# HiiConfigSupport = <yes: if this platform includes Hii Config Support>
@@ -91,6 +99,9 @@
# IPSecSupport = <yes: if this platform supports IPSec network>
#
#--*/
+[Test Configuration Specific]
+GEN_CONFIG_INI_FILE_ON = yes
+IGNORE_COMPLIANT_TEST_CSV = no
[Platform Specific]
ConsoleDevices = yes
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index ae76c909..be06d139 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
@@ -28,7 +28,7 @@ Abstract:
// Includes
//
-#include "SctLib.h"
+#include "SctLib.h"
#include "EfiCompliantBbTestMain_uefi.h"
#include EFI_PROTOCOL_DEFINITION (SimpleTextIn)
#include EFI_PROTOCOL_DEFINITION (SimpleTextInEx)
@@ -87,6 +87,9 @@ extern EFI_GUID gGlobalVariableGuid;
//
#define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific"
+#define SECTION_NAME_CONFIGURATION_SPECIFIC L"Test Configuration Specific"
+#define CONFIN_TITLE_STRING L"|================= Configuration Environment =================|"
+#define MAX_SIZE 0xFF
#define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \
{ 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 }}
@@ -170,6 +173,12 @@ EFI_GUID gEfiBlueToothAttributeProtocolGuid = { 0x898890e9, 0x84b2, 0x4f3a, { 0x
EFI_GUID gEfiBlueToothLEConfigProtocolGuid = { 0x8f76da58, 0x1f99, 0x4275, { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }};
+typedef struct CONFIG_ERROR_DATA {
+ UINT8 ErrorCount;
+ CHAR16 *TitleString;
+ EFI_INI_FILE_HANDLE ConfigINI;
+} CONFIG_ERROR_DATA;
+
//
// The Max length of pre-defined string value(yes or no)
// in the EfiCompliant.ini
@@ -381,6 +390,25 @@ CheckIPSecProtocols (
IN EFI_INI_FILE_HANDLE IniFile
);
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ IN CHAR16 *TitleString,
+ IN EFI_INI_FILE_HANDLE ConfigINI
+);
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+);
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+);
+
//
// External functions implementation
//
@@ -405,6 +433,25 @@ Routine Description:
EFI_STANDARD_TEST_LIBRARY_PROTOCOL *StandardLib;
EFI_TEST_PROFILE_LIBRARY_PROTOCOL *ProfileLib;
EFI_INI_FILE_HANDLE IniFile;
+ EFI_INI_FILE_HANDLE ConfigINI;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume;
+ EFI_HANDLE DeviceHandle;
+ EFI_FILE *Root;
+ EFI_FILE *OldFile;
+ CONFIG_ERROR_DATA *ErrorData;
+ UINT8 Index;
+ BOOLEAN GenConfigINI;
+ CHAR16 String[MAX_LENGTH];
+ CHAR16 *FilePath;
+ CHAR16 *TitleString[] = {
+ L"<|If fail item is not 0, it mean platform config have error ___",
+ L"<|occur or EfiCompliant.ini setting have wrong. ________________",
+ L"<|Please sent this file and EfiCompliant.ini to platform owner .",
+ L"<|EfiCompliant.ini is in the : SCT\\Dependency\\EfiCompliantBBTest",
+ L"<|==============================================================",
+ NULL
+ };
//
// Locate the standard test library protocol
@@ -430,6 +477,68 @@ Routine Description:
return Status;
}
+ //
+ // Check PlatformConfig.ini file is exise or not.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+ Status = OpenIniFile (
+ ProfileLib,
+ L"Report",
+ L"PlatformConfig.ini",
+ &ConfigINI
+ );
+ if (ConfigINI != NULL) {
+ //
+ // If file exise, delete it.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+
+ Status = gtBS->LocateDevicePath (
+ &gEfiSimpleFileSystemProtocolGuid,
+ &DevicePath,
+ &DeviceHandle
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = gtBS->HandleProtocol (
+ DeviceHandle,
+ &gEfiSimpleFileSystemProtocolGuid,
+ (VOID*)&Volume
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = Volume->OpenVolume(Volume, &Root);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = Root->Open (
+ Root,
+ &OldFile,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE,
+ 0
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Status = OldFile->Delete (OldFile);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ Root->Close (Root);
+ }
+
//
// Open the INI file
//
@@ -453,6 +562,68 @@ Routine Description:
return Status;
}
+ GenConfigINI = FALSE;
+ Index = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &Index
+ );
+ if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
+ GenConfigINI = TRUE;
+ }
+
+ if (GenConfigINI == TRUE) {
+ //
+ // Create the config.ini file.
+ //
+ ProfileLib->EfiGetSystemDevicePath (
+ ProfileLib,
+ &DevicePath,
+ &FilePath
+ );
+
+ Status = ProfileLib->EfiIniCreate (
+ ProfileLib,
+ DevicePath,
+ SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", FilePath),
+ &ConfigINI
+ );
+ if (EFI_ERROR (Status)) {
+ StandardLib->RecordAssertion (
+ StandardLib,
+ EFI_TEST_ASSERTION_FAILED,
+ gTestGenericFailureGuid,
+ L"UEFI Compliant - Cannot create or open INI file",
+ L"%a:%d:",
+ __FILE__,
+ (UINTN)__LINE__
+ );
+ return Status;
+ }
+ //
+ // Gen PlatformConfig.ini title and description.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ CONFIN_TITLE_STRING,
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", 0x00)
+ );
+ for (Index=0; TitleString[Index] != NULL ;Index++) {
+ ConfigINI->SetString (
+ ConfigINI,
+ CONFIN_TITLE_STRING,
+ TitleString[Index],
+ L"|>"
+ );
+ }
+ ConstructionAndAcquisition (NULL, ConfigINI);
+ }
+
//
// Check the console protocols
//
@@ -594,6 +765,26 @@ Routine Description:
//
CloseIniFile (ProfileLib, IniFile);
+ //
+ // Save data to platform.ini
+ //
+ if (GenConfigINI == TRUE) {
+ ErrorData = ConstructionAndAcquisition (L"END", ConfigINI);
+ //
+ // Update fail count.
+ //
+ ConfigINI->SetStringByOrder (
+ ConfigINI,
+ 0x00,
+ L"|================= Configuration Environment =================|",
+ L"<|Unavailable (Fail) item have :",
+ SctPoolPrint (L": \"%02d\" --", ErrorData->ErrorCount)
+ );
+ //
+ // If have error occor and GenTestINI flag is on, gen the report file.
+ //
+ CloseIniFile (ProfileLib, ConfigINI);
+ }
return EFI_SUCCESS;
}
@@ -810,6 +1001,11 @@ CheckConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ConsoleDevices")) {
+ GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", ValueC);
+ }
}
}
@@ -888,6 +1084,12 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiConfigSupport")) {
+ GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value[2]);
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value[3]);
+ }
}
}
@@ -929,6 +1131,9 @@ CheckHiiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiFontSupport")) {
+ GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]);
+ }
}
}
@@ -1028,6 +1233,11 @@ CheckGraphicalConsoleProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"GraphicalConsoleDevices")) {
+ GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC);
+ }
}
}
@@ -1098,6 +1308,9 @@ CheckPointerProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PointerDevices")) {
+ GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA);
+ }
}
}
@@ -1211,6 +1424,12 @@ CheckBootFromDiskProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromDiskDevices")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", ValueC);
+ GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", ValueD);
+ }
}
}
@@ -1353,6 +1572,12 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNetworkDevices")) {
+ GenTestConfigContent (L"gEfiPxeBaseCodeProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiSimpleNetworkProtocolGuid ", Value[0]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiNetworkInterfaceIdentifierProtocolGuid", Value[2]);
+ }
}
}
@@ -1391,6 +1616,9 @@ CheckBootFromNetworkProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ValidateBootImageThruNet")) {
+ GenTestConfigContent (L"Variable \"SetupMode\"", ValueC);
+ }
}
}
@@ -1481,6 +1709,15 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1582,6 +1819,21 @@ CheckUefiNetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UefiNetworkApplication")) {
+ GenTestConfigContent (L"gEfiManagedNetworkServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiArpServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp4ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiDhcp4ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiTcp4ServiceBindingProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiUdp4ServiceBindingProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiIp4Config2ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiManagedNetworkProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiArpProtocolGuid ", Value[8]);
+ GenTestConfigContent (L"gEfiIp4ProtocolGuid ", Value[9]);
+ GenTestConfigContent (L"gEfiDhcp4ProtocolGuid ", Value[10]);
+ GenTestConfigContent (L"gEfiTcp4ProtocolGuid ", Value[11]);
+ GenTestConfigContent (L"gEfiUdp4ProtocolGuid ", Value[12]);
+ }
}
}
@@ -1679,6 +1931,13 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -1774,6 +2033,17 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Support")) {
+ GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", Value[0]);
+ GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", Value[1]);
+ GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", Value[2]);
+ GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", Value[3]);
+ GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Value[4]);
+ GenTestConfigContent (L"gEfiDhcp6ProtocolGuid ", Value[5]);
+ GenTestConfigContent (L"gEfiTcp6ProtocolGuid ", Value[6]);
+ GenTestConfigContent (L"gEfiIp6ProtocolGuid ", Value[7]);
+ GenTestConfigContent (L"gEfiUdp6ProtocolGuid ", Value[8]);
+ }
}
}
@@ -1830,6 +2100,9 @@ CheckUefiV6NetworkApplication (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"VlanSupport")) {
+ GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9]);
+ }
}
}
@@ -1902,6 +2175,9 @@ CheckUartProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UartDevices")) {
+ GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA);
+ }
}
}
@@ -1986,6 +2262,10 @@ CheckPciProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PciBusSupport")) {
+ GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2070,6 +2350,10 @@ CheckUsbProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"UsbBusSupport")) {
+ GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB);
+ }
}
}
@@ -2139,6 +2423,9 @@ CheckNVMeProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2222,6 +2509,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNVMe")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ }
}
}
@@ -2258,6 +2548,9 @@ CheckBootFromNVMe (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"NVMExpressPassThru")) {
+ GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2330,6 +2623,9 @@ CheckScsiProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThru")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2428,6 +2724,10 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromScsi")) {
+ GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC);
+ }
}
}
@@ -2465,6 +2765,9 @@ CheckBootFromScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThruSupport")) {
+ GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2550,6 +2853,10 @@ CheckBootFromIScsi (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromIscsi")) {
+ GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", ValueB);
+ }
}
}
@@ -2637,6 +2944,10 @@ CheckDebugProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DebugSupport")) {
+ GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB);
+ }
}
}
@@ -2706,6 +3017,9 @@ CheckDriverOverrideProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"PlatformDriverOverride")) {
+ GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", ValueA);
+ }
}
}
@@ -2774,6 +3088,9 @@ CheckATAProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"AtaPassThru")) {
+ GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA);
+ }
}
}
@@ -2845,6 +3162,12 @@ CheckEbcProtocol (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) {
+ GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk != NULL);
+ GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage != NULL);
+ GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc->RegisterICacheFlush != NULL);
+ GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion != NULL);
+ }
}
}
@@ -2941,6 +3264,9 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -2998,6 +3324,10 @@ CheckDNS4Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support")) {
+ GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns4ProtocolGuid ", ValueB);
+ }
}
}
@@ -3067,6 +3397,9 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3124,6 +3457,10 @@ CheckDNS6Protocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support")) {
+ GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiDns6ProtocolGuid ", ValueB);
+ }
}
}
@@ -3205,6 +3542,10 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3263,6 +3604,11 @@ CheckTLSProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) {
+ GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiTlsProtocolGuid ", ValueC);
+ }
}
}
@@ -3346,6 +3692,10 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ }
}
StandardLib->RecordAssertion (
StandardLib,
@@ -3404,6 +3754,11 @@ CheckHTTPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport")) {
+ GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiHttpProtocolGuid ", ValueC);
+ }
}
}
@@ -3493,6 +3848,11 @@ CheckEAPProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"EAPSupport")) {
+ GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB);
+ GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC);
+ }
}
}
@@ -3588,6 +3948,11 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ }
}
//
@@ -3652,6 +4017,12 @@ CheckBlueToothClassicProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothClassicSupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid ", ValueC);
+ GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid ", ValueD);
+ }
}
}
@@ -3743,6 +4114,11 @@ CheckBlueToothLEProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothLESupport")) {
+ GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", ValueA);
+ GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", ValueB);
+ GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", ValueC);
+ }
}
}
@@ -3832,6 +4208,10 @@ CheckIPSecProtocols (
);
if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
+ if (!GenTestConfigTitle (IniFile, &AssertionType, L"IPSecSupport")) {
+ GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA);
+ GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB);
+ }
}
}
@@ -3852,3 +4232,119 @@ CheckIPSecProtocols (
return EFI_SUCCESS;
}
+
+CONFIG_ERROR_DATA*
+ConstructionAndAcquisition (
+ CHAR16 *TitleString,
+ EFI_INI_FILE_HANDLE ConfigINI
+){
+ UINTN Index;
+ static CONFIG_ERROR_DATA Data;
+
+ if (TitleString == NULL && ConfigINI != NULL) {
+ //
+ // If only gave ConfigINI, init struct.
+ //
+ gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, (VOID**)&(Data.TitleString));
+ Data.ConfigINI = ConfigINI;
+ Data.ErrorCount = 0;
+
+ return NULL;
+ } else if (TitleString != NULL && ConfigINI == NULL) {
+ //
+ // If Only gave TitleString, update the title and error count +1.
+ //
+ for (Index=0; Data.TitleString[Index]=TitleString[Index], TitleString[Index]!=0; Index++);
+ Data.ErrorCount++;
+
+ return &Data;
+ } else if (TitleString != NULL && ConfigINI != NULL) {
+ //
+ // If Both not NULL, end of the function, free the buffer.
+ //
+ gtBS->FreePool (Data.TitleString);
+ return &Data;
+ }
+ //
+ // If both NULL, just return struct data.
+ //
+ return &Data;
+}
+
+EFI_STATUS
+GenTestConfigTitle (
+ IN EFI_INI_FILE_HANDLE IniFile,
+ IN OUT EFI_TEST_ASSERTION *AssertionType,
+ IN CHAR16 *TestItemString
+){
+ CONFIG_ERROR_DATA *ErrorData;
+ EFI_STATUS Status;
+ CHAR16 String[MAX_LENGTH];
+ UINT32 MaxLength;
+
+ //
+ // Check need to gen config.ini or not.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"GEN_CONFIG_INI_FILE_ON",
+ String,
+ &MaxLength
+ );
+ if (EFI_ERROR (Status) || !(SctStriCmp (String, L"yes") == 0)) {
+ return EFI_UNSUPPORTED;
+ }
+
+ //
+ // If platform owner is not sure platform config yet, this item can skip this test.
+ //
+ MaxLength = MAX_LENGTH;
+ Status = IniFile->GetString (
+ IniFile,
+ SECTION_NAME_CONFIGURATION_SPECIFIC,
+ L"IGNORE_COMPLIANT_TEST_CSV",
+ String,
+ &MaxLength
+ );
+ if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") == 0)) {
+ *AssertionType = EFI_TEST_ASSERTION_WARNING;
+ }
+
+ ErrorData = ConstructionAndAcquisition (TestItemString, NULL);
+ //
+ // Set title
+ //
+ ErrorData->ConfigINI->SetStringByOrder (
+ ErrorData->ConfigINI,
+ ErrorData->ErrorCount,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItemString),
+ L"Device Status :",
+ L": Unavailable"
+ );
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+GenTestConfigContent (
+ IN CHAR16 *ProtocolGUIDString,
+ IN BOOLEAN Value
+){
+ CONFIG_ERROR_DATA *ErrorData;
+
+ ErrorData = ConstructionAndAcquisition (NULL, NULL);
+ //
+ // Gen content
+ //
+ ErrorData->ConfigINI->SetString (
+ ErrorData->ConfigINI,
+ SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorData->TitleString),
+ SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString),
+ Value ? L": Exist in system !": L": Not exist in system !"
+ );
+
+ return EFI_SUCCESS;
+}
+
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-10-16 6:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-14 9:01 [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest" ArvinX Chen
-- strict thread matches above, loose matches on Subject: below --
2019-10-16 6:33 Chen, ArvinX
2019-10-15 8:52 Chen, ArvinX
2019-10-14 8:47 ArvinX Chen
2019-10-14 7:20 ArvinX Chen
2019-09-09 6:28 ArvinX Chen
2019-09-09 6:24 ArvinX Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox