From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.2370.1571207527217177596 for ; Tue, 15 Oct 2019 23:32:07 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: eric.jin@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 23:32:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,302,1566889200"; d="scan'208";a="201984994" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 15 Oct 2019 23:32:06 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 15 Oct 2019 23:32:06 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 15 Oct 2019 23:32:05 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.165]) by SHSMSX154.ccr.corp.intel.com ([10.239.6.54]) with mapi id 14.03.0439.000; Wed, 16 Oct 2019 14:32:04 +0800 From: "Eric Jin" To: "Chen, ArvinX" , "devel@edk2.groups.io" Subject: Re: [edk2-devel] [edk2-test] [PATCH V3] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest". Thread-Topic: [edk2-devel] [edk2-test] [PATCH V3] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest". Thread-Index: AdWD6twkt0AwSTVyTJe9y/5yrd57iw== Date: Wed, 16 Oct 2019 06:32:03 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzVhN2ZmYjktY2EzZC00Y2M0LTlhNDMtYjA1YWVmZDRlOWJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidWxkb2M1TjdvR2NlSVVuemhSdXlKdnJ5aTFpd2ZGRXMyTnpzOCtXakNUS3IrT05WeHhnR2FVcVlyT2d6ZkVvbiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: eric.jin@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Adjust the prefix to [edk2-devel] [edk2-test] [PATCH V3] in subject Hi Arvin, Still have one comment in the GenTestConfigTitle() > -----Original Message----- > From: Chen, ArvinX > Sent: Tuesday, October 15, 2019 4:53 PM > To: devel@edk2.groups.io > Cc: Jin, Eric > Subject: [PATCH] uefi-sct/SctPkg: Auto gen result of "EFICompliantTest". >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2155 >=20 > 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 t= hey > 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. >=20 > This patch will auto gen a file in path SCT\Report\PlatformConfig.ini onc= e > tester retest again, system will delete the current PlatformConfig.ini an= d > create a new one. If tester want to ignore test results in *.csv, tester = can > modify EfiCompliant.ini to control it. >=20 > Cc: Eric Jin > Signed-off-by: ArvinX Chen > --- > .../Dependency/Config/EfiCompliant.ini | 13 +- > .../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c | 498 > ++++++++++++++++++++- > 2 files changed, 509 insertions(+), 2 deletions(-) >=20 > diff --git a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Depende > ncy/Config/EfiCompliant.ini b/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Depende > ncy/Config/EfiCompliant.ini > index d234d87a..4deaae3b 100644 > --- a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/Depende > ncy/Config/EfiCompliant.ini > +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTes > +++ t/Dependency/Config/EfiCompliant.ini > @@ -1,6 +1,6 @@ > ## @file > # > -# Copyright 2006 - 2016 Unified EFI, Inc.
> +# Copyright 2006 - 2019 Unified EFI, Inc.
> # Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved. # # > This program and the accompanying materials @@ -24,6 +24,14 @@ # # > Notes: > # > +### [Test Configuration Specific] > +# > +# GEN_CONFIG_INI_FILE_ON =3D the report folder> > +# > +# IGNORE_COMPLIANT_TEST_CSV =3D 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 =3D > # > # HiiConfigSupport =3D > @@ -91,6 +99,9 @@ > # IPSecSupport =3D > # > #--*/ > +[Test Configuration Specific] > +GEN_CONFIG_INI_FILE_ON =3D yes > +IGNORE_COMPLIANT_TEST_CSV =3D no >=20 > [Platform Specific] > ConsoleDevices =3D yes > diff --git a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompli > antBBTestPlatform_uefi.c b/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompli > antBBTestPlatform_uefi.c > index ae76c909..eae51415 100644 > --- a/uefi- > sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompli > antBBTestPlatform_uefi.c > +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTes > +++ t/EfiCompliantBBTestPlatform_uefi.c > @@ -28,7 +28,7 @@ Abstract: > // Includes > // >=20 > -#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; // >=20 > #define SECTION_NAME_PLATFORM_SPECIFIC L"Platform Specific" > +#define SECTION_NAME_CONFIGURATION_SPECIFIC L"Test Configuration > Specific" > +#define CONFIN_TITLE_STRING L"|=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > Configuration Environment =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D|" > +#define MAX_SIZE 0xFF >=20 > #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 =3D { 0x898890e9, 0x84b2, 0x4f3a, { 0x >=20 > EFI_GUID gEfiBlueToothLEConfigProtocolGuid =3D { 0x8f76da58, 0x1f99, 0x4= 275, > { 0xa4, 0xec, 0x47, 0x56, 0x51, 0x5b, 0x1c, 0xe8 }}; >=20 > +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 > ); >=20 > +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[] =3D { > + 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"<|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D", > + NULL > + }; >=20 > // > // Locate the standard test library protocol @@ -430,6 +477,68 @@ Rout= ine > Description: > return Status; > } >=20 > + // > + // Check PlatformConfig.ini file is exise or not. > + // > + ProfileLib->EfiGetSystemDevicePath ( > + ProfileLib, > + &DevicePath, > + &FilePath > + ); > + Status =3D OpenIniFile ( > + ProfileLib, > + L"Report", > + L"PlatformConfig.ini", > + &ConfigINI > + ); > + if (ConfigINI !=3D NULL) { > + // > + // If file exise, delete it. > + // > + CloseIniFile (ProfileLib, ConfigINI); > + > + Status =3D gtBS->LocateDevicePath ( > + &gEfiSimpleFileSystemProtocolGuid, > + &DevicePath, > + &DeviceHandle > + ); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > + Status =3D gtBS->HandleProtocol ( > + DeviceHandle, > + &gEfiSimpleFileSystemProtocolGuid, > + (VOID*)&Volume > + ); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > + Status =3D Volume->OpenVolume(Volume, &Root); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > + Status =3D Root->Open ( > + Root, > + &OldFile, > + SctPoolPrint (L"%s\\Report\\PlatformConfig.ini", Fi= lePath), > + EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, > + 0 > + ); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > + Status =3D OldFile->Delete (OldFile); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > + Root->Close (Root); > + } > + > // > // Open the INI file > // > @@ -453,6 +562,68 @@ Routine Description: > return Status; > } >=20 > + GenConfigINI =3D FALSE; > + Index =3D MAX_LENGTH; > + Status =3D IniFile->GetString ( > + IniFile, > + SECTION_NAME_CONFIGURATION_SPECIFIC, > + L"GEN_CONFIG_INI_FILE_ON", > + String, > + &Index > + ); > + if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > + GenConfigINI =3D TRUE; > + } > + > + if (GenConfigINI =3D=3D TRUE) { > + // > + // Create the config.ini file. > + // > + ProfileLib->EfiGetSystemDevicePath ( > + ProfileLib, > + &DevicePath, > + &FilePath > + ); > + > + Status =3D ProfileLib->EfiIniCreate ( > + ProfileLib, > + DevicePath, > + SctPoolPrint (L"%s\\Report\\PlatformConfig.in= i", 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=3D0; TitleString[Index] !=3D 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); >=20 > + // > + // Save data to platform.ini > + // > + if (GenConfigINI =3D=3D TRUE) { > + ErrorData =3D ConstructionAndAcquisition (L"END", ConfigINI); > + // > + // Update fail count. > + // > + ConfigINI->SetStringByOrder ( > + ConfigINI, > + 0x00, > + L"|=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Configuration Environment > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D|", > + L"<|Unavailable (Fail) item have :", > + SctPoolPrint (L": \"%02d\" --", ErrorData->Error= Count) > + ); > + // > + // If have error occor and GenTestINI flag is on, gen the report fil= e. > + // > + CloseIniFile (ProfileLib, ConfigINI); } > return EFI_SUCCESS; > } >=20 > @@ -810,6 +1001,11 @@ CheckConsoleProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"ConsoleDevices= ")) { > + GenTestConfigContent (L"gEfiSimpleTextInProtocolGuid ", Valu= eA); > + GenTestConfigContent (L"gEfiSimpleTextOutProtocolGuid ", Valu= eB); > + GenTestConfigContent (L"gEfiSimpleTextInputExProtocolGuid", > ValueC); > + } > } > } >=20 > @@ -888,6 +1084,12 @@ CheckHiiProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiConfigSuppo= rt")) { > + GenTestConfigContent (L"gEfiHiiDatabaseProtocolGuid ", Value= [0]); > + GenTestConfigContent (L"gEfiHiiStringProtocolGuid ", Value= [1]); > + GenTestConfigContent (L"gEfiHiiConfigRoutingProtocolGuid", Value= [2]); > + GenTestConfigContent (L"gEfiHiiFontProtocolGuid ", Value= [3]); > + } > } > } >=20 > @@ -929,6 +1131,9 @@ CheckHiiProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"HiiFontSuppo= rt")) { > + GenTestConfigContent (L"gEfiHiiFontProtocolGuid", Value[4]); > + } > } > } >=20 > @@ -1028,6 +1233,11 @@ CheckGraphicalConsoleProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"GraphicalConsoleDevices")) { > + GenTestConfigContent (L"gEfiGraphicsOutputProtocolGuid", ValueA)= ; > + GenTestConfigContent (L"gEfiEdidDiscoveredProtocolGuid", ValueB)= ; > + GenTestConfigContent (L"gEfiEdidActiveProtocolGuid ", ValueC)= ; > + } > } > } >=20 > @@ -1098,6 +1308,9 @@ CheckPointerProtocol ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"PointerDevices= ")) { > + GenTestConfigContent (L"gEfiSimplePointerProtocolGuid", ValueA); > + } > } > } >=20 > @@ -1211,6 +1424,12 @@ CheckBootFromDiskProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"BootFromDiskDevices")) { > + GenTestConfigContent (L"gEfiBlockIoProtocolGuid ", Value= A); > + GenTestConfigContent (L"gEfiDiskIoProtocolGuid ", Value= B); > + GenTestConfigContent (L"gEfiSimpleFileSystemProtocolGuid", Value= C); > + GenTestConfigContent (L"gEfiUnicodeCollationProtocolGuid", Value= D); > + } > } > } >=20 > @@ -1353,6 +1572,12 @@ CheckBootFromNetworkProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D 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"gEfiNetworkInterfaceIdentifierProtocolGu= id", > Value[2]); > + } > } > } >=20 > @@ -1391,6 +1616,9 @@ CheckBootFromNetworkProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"ValidateBootImageThruNet")) { > + GenTestConfigContent (L"Variable \"SetupMode\"", ValueC); > + } > } > } >=20 > @@ -1481,6 +1709,15 @@ CheckUefiNetworkApplication ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D 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") =3D=3D 0))= { > AssertionType =3D 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]); > + } > } > } >=20 > @@ -1679,6 +1931,13 @@ CheckUefiV6NetworkApplication ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Suppor= t")) { > + GenTestConfigContent (L"gEfiDhcp6ServiceBindingProtocolGuid", > Value[0]); > + GenTestConfigContent (L"gEfiTcp6ServiceBindingProtocolGuid ", > Value[1]); > + GenTestConfigContent (L"gEfiIp6ServiceBindingProtocolGuid ", > Value[2]); > + GenTestConfigContent (L"gEfiUdp6ServiceBindingProtocolGuid ", > Value[3]); > + GenTestConfigContent (L"gEfiIp6ConfigProtocolGuid ", Va= lue[4]); > + } > } > StandardLib->RecordAssertion ( > StandardLib, > @@ -1774,6 +2033,17 @@ CheckUefiV6NetworkApplication ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"UEFIIPv6Supp= ort")) { > + 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]); > + } > } > } >=20 > @@ -1830,6 +2100,9 @@ CheckUefiV6NetworkApplication ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0= )) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"VlanSuppor= t")) { > + GenTestConfigContent (L"gEfiVlanConfigProtocolGuid", Value[9= ]); > + } > } > } >=20 > @@ -1902,6 +2175,9 @@ CheckUartProtocol ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"UartDevices"))= { > + GenTestConfigContent (L"gEfiSerialIoProtocolGuid", ValueA); > + } > } > } >=20 > @@ -1986,6 +2262,10 @@ CheckPciProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"PciBusSupport"= )) { > + GenTestConfigContent (L"gEfiPciRootBridgeIoProtocolGuid", ValueA= ); > + GenTestConfigContent (L"gEfiPciIoProtocolGuid ", ValueB= ); > + } > } > } >=20 > @@ -2070,6 +2350,10 @@ CheckUsbProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"UsbBusSupport"= )) { > + GenTestConfigContent (L"gEfiUsb2HcProtocolGuid", ValueA); > + GenTestConfigContent (L"gEfiUsbIoProtocolGuid ", ValueB); > + } > } > } >=20 > @@ -2139,6 +2423,9 @@ CheckNVMeProtocol ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"NVMExpressPassThru")) { > + GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", > ValueA); > + } > } > } >=20 > @@ -2222,6 +2509,9 @@ CheckBootFromNVMe ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromNVMe")= ) { > + GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB); > + } > } > } >=20 > @@ -2258,6 +2548,9 @@ CheckBootFromNVMe ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"NVMExpressPassThru")) { > + GenTestConfigContent (L"gEfiNvmExpressPassThruProtocolGuid", > ValueA); > + } > } > } >=20 > @@ -2330,6 +2623,9 @@ CheckScsiProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"ExtScsiPassThr= u")) { > + GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", ValueA= ); > + } > } > } >=20 > @@ -2428,6 +2724,10 @@ CheckBootFromScsi ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromScsi")= ) { > + GenTestConfigContent (L"gEfiBlockIoProtocolGuid", ValueB); > + GenTestConfigContent (L"gEfiScsiIoProtocolGuid ", ValueC); > + } > } > } >=20 > @@ -2465,6 +2765,9 @@ CheckBootFromScsi ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"ExtScsiPassThruSupport")) { > + GenTestConfigContent (L"gEfiExtScsiPassThruProtocolGuid", Valu= eA); > + } > } > } >=20 > @@ -2550,6 +2853,10 @@ CheckBootFromIScsi ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"BootFromIscsi"= )) { > + GenTestConfigContent (L"gEfiIScsiInitiatorNameProtocolGuid", Val= ueA); > + GenTestConfigContent (L"gEfiAuthenticationInfoProtocolGuid", > ValueB); > + } > } > } >=20 > @@ -2637,6 +2944,10 @@ CheckDebugProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"DebugSupport")= ) { > + GenTestConfigContent (L"gEfiDebugSupportProtocolGuid", ValueA); > + GenTestConfigContent (L"gEfiDebugPortProtocolGuid ", ValueB); > + } > } > } >=20 > @@ -2706,6 +3017,9 @@ CheckDriverOverrideProtocol ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"PlatformDriverOverride")) { > + GenTestConfigContent (L"gEfiPlatformDriverOverrideProtocolGuid", > ValueA); > + } > } > } >=20 > @@ -2774,6 +3088,9 @@ CheckATAProtocol ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"AtaPassThru"))= { > + GenTestConfigContent (L"gEfiAtaPassThruProtocolGuid", ValueA); > + } > } > } >=20 > @@ -2845,6 +3162,12 @@ CheckEbcProtocol ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"EBCSupport")) = { > + GenTestConfigContent (L"Ebc->CreateThunk", Ebc->CreateThunk !=3D > NULL); > + GenTestConfigContent (L"Ebc->UnloadImage", Ebc->UnloadImage !=3D > NULL); > + GenTestConfigContent (L"Ebc->RegisterICacheFlush", Ebc- > >RegisterICacheFlush !=3D NULL); > + GenTestConfigContent (L"Ebc->GetVersion ", Ebc->GetVersion !=3D > NULL); > + } > } > } >=20 > @@ -2941,6 +3264,9 @@ CheckDNS4Protocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D 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") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS4Support"= )) { > + GenTestConfigContent (L"gEfiDns4ServiceBindingProtocolGuid", > ValueA); > + GenTestConfigContent (L"gEfiDns4ProtocolGuid ", V= alueB); > + } > } > } >=20 > @@ -3067,6 +3397,9 @@ CheckDNS6Protocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D 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") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"DNS6Support"= )) { > + GenTestConfigContent (L"gEfiDns6ServiceBindingProtocolGuid", > ValueA); > + GenTestConfigContent (L"gEfiDns6ProtocolGuid ", V= alueB); > + } > } > } >=20 > @@ -3205,6 +3542,10 @@ CheckTLSProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")) = { > + GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", Valu= eA); > + GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", Valu= eB); > + } > } > StandardLib->RecordAssertion ( > StandardLib, > @@ -3263,6 +3604,11 @@ CheckTLSProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"TLSSupport")= ) { > + GenTestConfigContent (L"gEfiTlsServiceBindingProtocolGuid", Va= lueA); > + GenTestConfigContent (L"gEfiTlsConfigurationProtocolGuid ", Va= lueB); > + GenTestConfigContent (L"gEfiTlsProtocolGuid ", Va= lueC); > + } > } > } >=20 > @@ -3346,6 +3692,10 @@ CheckHTTPProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport"))= { > + GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", > ValueA); > + GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", Val= ueB); > + } > } > StandardLib->RecordAssertion ( > StandardLib, > @@ -3404,6 +3754,11 @@ CheckHTTPProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"HTTPSupport"= )) { > + GenTestConfigContent (L"gEfiHttpServiceBindingProtocolGuid", > ValueA); > + GenTestConfigContent (L"gEfiHttpUtilitiesProtocolGuid ", V= alueB); > + GenTestConfigContent (L"gEfiHttpProtocolGuid ", V= alueC); > + } > } > } >=20 > @@ -3493,6 +3848,11 @@ CheckEAPProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"EAPSupport")) = { > + GenTestConfigContent (L"gEfiEapProtocolGuid ", ValueA)= ; > + GenTestConfigContent (L"gEfiEapConfigProtocolGuid ", ValueB)= ; > + GenTestConfigContent (L"gEfiEapManagement2ProtocolGuid", ValueC)= ; > + } > } > } >=20 > @@ -3588,6 +3948,11 @@ CheckBlueToothClassicProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"BlueToothClassicSupport")) { > + GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid "= , > ValueA); > + GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGuid"= , > ValueB); > + GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid "= , > ValueC); > + } > } >=20 > // > @@ -3652,6 +4017,12 @@ CheckBlueToothClassicProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0))= { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, > L"BlueToothClassicSupport")) { > + GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid = ", > ValueA); > + GenTestConfigContent (L"gEfiBlueToothServiceBindingProtocolGui= d", > ValueB); > + GenTestConfigContent (L"gEfiBlueToothConfigProtocolGuid = ", > ValueC); > + GenTestConfigContent (L"gEfiBlueToothIoProtocolGuid = ", > ValueD); > + } > } > } >=20 > @@ -3743,6 +4114,11 @@ CheckBlueToothLEProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"BlueToothLESup= port")) > { > + GenTestConfigContent (L"gEfiBlueToothHcProtocolGuid ", Val= ueA); > + GenTestConfigContent (L"gEfiBlueToothAttributeProtocolGuid", > ValueB); > + GenTestConfigContent (L"gEfiBlueToothLEConfigProtocolGuid ", > ValueC); > + } > } > } >=20 > @@ -3832,6 +4208,10 @@ CheckIPSecProtocols ( > ); > if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > AssertionType =3D EFI_TEST_ASSERTION_FAILED; > + if (!GenTestConfigTitle (IniFile, &AssertionType, L"IPSecSupport")= ) { > + GenTestConfigContent (L"gEfiIPSecConfigProtocolGuid", ValueA); > + GenTestConfigContent (L"gEfiIPSec2ProtocolGuid ", ValueB); > + } > } > } >=20 > @@ -3852,3 +4232,119 @@ CheckIPSecProtocols ( >=20 > return EFI_SUCCESS; > } > + > +CONFIG_ERROR_DATA* > +ConstructionAndAcquisition ( > + CHAR16 *TitleString, > + EFI_INI_FILE_HANDLE ConfigINI > +){ > + UINTN Index; > + static CONFIG_ERROR_DATA Data; > + > + if (TitleString =3D=3D NULL && ConfigINI !=3D NULL) { > + // > + // If only gave ConfigINI, init struct. > + // > + gtBS->AllocatePool (EfiBootServicesData ,MAX_SIZE, > (VOID**)&(Data.TitleString)); > + Data.ConfigINI =3D ConfigINI; > + Data.ErrorCount =3D 0; > + > + return NULL; > + } else if (TitleString !=3D NULL && ConfigINI =3D=3D NULL) { > + // > + // If Only gave TitleString, update the title and error count +1. > + // > + for (Index=3D0; Data.TitleString[Index]=3DTitleString[Index], > TitleString[Index]!=3D0; Index++); > + Data.ErrorCount++; > + > + return &Data; > + } else if (TitleString !=3D NULL && ConfigINI !=3D 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 =3D MAX_LENGTH; > + Status =3D IniFile->GetString ( > + IniFile, > + SECTION_NAME_CONFIGURATION_SPECIFIC, > + L"GEN_CONFIG_INI_FILE_ON", > + String, > + &MaxLength > + ); > + if (!EFI_ERROR (Status) && !(SctStriCmp (String, L"yes") =3D=3D 0)) { The judgement need be adjusted to=20 if (EFI_ERROR (Status) || (SctStriCmp (String, L"yes") !=3D 0)) { > + return EFI_UNSUPPORTED; > + } > + > + // > + // If platform owner is not sure platform config yet, this item can s= kip this > test. > + // > + MaxLength =3D MAX_LENGTH; > + Status =3D IniFile->GetString ( > + IniFile, > + SECTION_NAME_CONFIGURATION_SPECIFIC, > + L"IGNORE_COMPLIANT_TEST_CSV", > + String, > + &MaxLength > + ); > + if (!EFI_ERROR (Status) && (SctStriCmp (String, L"yes") =3D=3D 0)) { > + *AssertionType =3D EFI_TEST_ASSERTION_WARNING; } > + > + ErrorData =3D ConstructionAndAcquisition (TestItemString, NULL); // > + // Set title // ErrorData->ConfigINI->SetStringByOrder ( > + ErrorData->ConfigINI, > + ErrorData->ErrorCount, > + SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, TestItem= String), > + L"Device Status :", > + L": Unavailable" > + ); > + > + return EFI_SUCCESS; > +} > + > +EFI_STATUS > +GenTestConfigContent ( > + IN CHAR16 *ProtocolGUIDString, > + IN BOOLEAN Value > +){ > + CONFIG_ERROR_DATA *ErrorData; > + > + ErrorData =3D ConstructionAndAcquisition (NULL, NULL); // // Gen > + content // ErrorData->ConfigINI->SetString ( > + ErrorData->ConfigINI, > + SctPoolPrint (L"%02d. %s",ErrorData->ErrorCount, ErrorDat= a- > >TitleString), > + SctPoolPrint (L" %s <-| Status :", ProtocolGUIDString), > + Value ? L": Exist in system !": L": Not exist in system= !" > + ); > + > + return EFI_SUCCESS; > +} > + > -- > 2.16.2.windows.1