From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: eric.jin@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Tue, 10 Sep 2019 19:20:39 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 19:20:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,491,1559545200"; d="scan'208";a="184353041" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga008.fm.intel.com with ESMTP; 10 Sep 2019 19:20:38 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Sep 2019 19:20:37 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Sep 2019 19:20:37 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.140]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.92]) with mapi id 14.03.0439.000; Wed, 11 Sep 2019 10:20:35 +0800 From: "Eric Jin" To: Heinrich Schuchardt , EDK II Development CC: Supreeth Venkatesh , Stephano Cetola Subject: Re: [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: setting key toggle state may be unsupported Thread-Topic: [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: setting key toggle state may be unsupported Thread-Index: AQHVY2h+stjJ8Ab/W0+zVSakHStoCKclwvhA Date: Wed, 11 Sep 2019 02:20:35 +0000 Message-ID: References: <20190904213350.1239-1-xypron.glpk@gmx.de> In-Reply-To: <20190904213350.1239-1-xypron.glpk@gmx.de> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 Hi Heinrich, It is reasonable to accept the EFI_UNSUPPORTED. I agree. The patch had better adjust the StandardLib->RecordMessage to StandardLib->= RecordAssertion, and the AssertionType is EFI_TEST_ASSERTION_WARNING. It gives SCT user a chance to notice this(not silence it) to judge the issu= e is reasonable or not. if (Status =3D=3D EFI_UNSUPPORTED) { AssertionType =3D EFI_TEST_ASSERTION_WARNING; } else { if ( EFI_INVALID_PARAMETER !=3D Status) { AssertionType =3D EFI_TEST_ASSERTION_FAILED; } else { AssertionType =3D EFI_TEST_ASSERTION_PASSED; } } StandardLib->RecordAssertion ( StandardLib, AssertionType, gSimpleTextInputExBBTestConformanceAssertionGuid003, L"SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState - SetState() returns = EFI_INVALID_PARAMETER with KeyToggleState being NULL.", L"%a:%d: Status - %r", __FILE__, (UINTN)__LINE__, Status ); What is your opinion on this? Best Regards Eric -----Original Message----- From: Heinrich Schuchardt =20 Sent: Thursday, September 5, 2019 5:34 AM To: EDK II Development Cc: Jin, Eric ; Supreeth Venkatesh ; Stephano Cetola ; Heinrich Schuc= hardt Subject: [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: setting key toggle state = may be unsupported It is allowable that a system does not support EFI_SIMPLE_TEXT_INPUT_EX_PRO= TOCOL.SetState(). For instance a serial console would not allow to set togg= le keys. In this case do not expect the function to check its arguments. It= will typically directly return EFI_UNSUPPORTED. Signed-off-by: Heinrich Schuchardt --- .../SimpleTextInputExBBTestConformance.c | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/B= lackBoxTest/SimpleTextInputExBBTestConformance.c b/uefi-sct/SctPkg/TestCase= /UEFI/EFI/Protocol/SimpleTextInputEx/BlackBoxTest/SimpleTextInputExBBTestCo= nformance.c index d997b651..7876d8db 100644 --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/BlackBox= Test/SimpleTextInputExBBTestConformance.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/Black +++ BoxTest/SimpleTextInputExBBTestConformance.c @@ -483,22 +483,31 @@ BBTestSetStateConformanceTestCheckpoint1 ( ); } }- - if ( EFI_INVALID_PARAMETER !=3D = Status) {- AssertionType =3D EFI_TEST_ASSERTION_FAILED;++ if (Status = =3D=3D EFI_UNSUPPORTED) {+ StandardLib->RecordMessage(+ = StandardLib,+ EFI_VERBOSE_LEVEL_QUIET,+ = L"SetState isn't supported, Status - %r\n",+ Status+ = ); } else {- AssertionType =3D EFI_TEST_ASSERTION_PAS= SED;+ if ( EFI_INVALID_PARAMETER !=3D Status) {+ AssertionType =3D = EFI_TEST_ASSERTION_FAILED;+ } else {+ AssertionType =3D EFI_TEST_AS= SERTION_PASSED;+ }+ StandardLib->RecordAssertion (+ Stand= ardLib,+ AssertionType,+ gSimpleTextInputExBBTestCo= nformanceAssertionGuid003,+ L"SIMPLE_TEXT_INPUT_EX_PROTOCOL.Set= State - SetState() returns EFI_INVALID_PARAMETER with KeyToggleState being = NULL.",+ L"%a:%d: Status - %r",+ __FILE__,+ = (UINTN)__LINE__,+ Status+ ); }- StandardLib= ->RecordAssertion (- StandardLib,- AssertionType,- = gSimpleTextInputExBBTestConformanceAssertionGuid003,- L"SIM= PLE_TEXT_INPUT_EX_PROTOCOL.SetState - SetState() returns EFI_INVALID_PARAME= TER with KeyToggleState being NULL.",- L"%a:%d: Status - %r",- = __FILE__,- (UINTN)__LINE__,- Status- = ); return EFI_SUCCESS; }--=20 2.23.0.rc1