From: "Eric Jin" <eric.jin@intel.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>,
EDK II Development <devel@edk2.groups.io>
Cc: Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
Stephano Cetola <stephano.cetola@linux.intel.com>
Subject: Re: [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: setting key toggle state may be unsupported
Date: Wed, 11 Sep 2019 02:20:35 +0000 [thread overview]
Message-ID: <DA72DC7456565B47808A57108259571F63811E47@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20190904213350.1239-1-xypron.glpk@gmx.de>
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 issue is reasonable or not.
if (Status == EFI_UNSUPPORTED) {
AssertionType = EFI_TEST_ASSERTION_WARNING;
} else {
if ( EFI_INVALID_PARAMETER != Status) {
AssertionType = EFI_TEST_ASSERTION_FAILED;
} else {
AssertionType = 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 <xypron.glpk@gmx.de>
Sent: Thursday, September 5, 2019 5:34 AM
To: EDK II Development <devel@edk2.groups.io>
Cc: Jin, Eric <eric.jin@intel.com>; Supreeth Venkatesh <supreeth.venkatesh@arm.com>; Stephano Cetola <stephano.cetola@linux.intel.com>; Heinrich Schuchardt <xypron.glpk@gmx.de>
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_PROTOCOL.SetState(). For instance a serial console would not allow to set toggle 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 <xypron.glpk@gmx.de>
---
.../SimpleTextInputExBBTestConformance.c | 37 ++++++++++++-------
1 file changed, 23 insertions(+), 14 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/BlackBoxTest/SimpleTextInputExBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/BlackBoxTest/SimpleTextInputExBBTestConformance.c
index d997b651..7876d8db 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/BlackBoxTest/SimpleTextInputExBBTestConformance.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/Black
+++ BoxTest/SimpleTextInputExBBTestConformance.c
@@ -483,22 +483,31 @@ BBTestSetStateConformanceTestCheckpoint1 (
); } }- - if ( EFI_INVALID_PARAMETER != Status) {- AssertionType = EFI_TEST_ASSERTION_FAILED;++ if (Status == EFI_UNSUPPORTED) {+ StandardLib->RecordMessage(+ StandardLib,+ EFI_VERBOSE_LEVEL_QUIET,+ L"SetState isn't supported, Status - %r\n",+ Status+ ); } else {- AssertionType = EFI_TEST_ASSERTION_PASSED;+ if ( EFI_INVALID_PARAMETER != Status) {+ AssertionType = EFI_TEST_ASSERTION_FAILED;+ } else {+ AssertionType = 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+ ); }- 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- ); return EFI_SUCCESS; }--
2.23.0.rc1
prev parent reply other threads:[~2019-09-11 2:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 21:33 [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: setting key toggle state may be unsupported Heinrich Schuchardt
2019-09-11 2:20 ` Eric Jin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DA72DC7456565B47808A57108259571F63811E47@SHSMSX103.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox