Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uefi-sct: Incorrect test validation of EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() in ReadKeyStrokeEx Conformance Test (Bugzilla Bug 4862) #234

Open
tianocore-issues opened this issue Oct 8, 2024 · 4 comments

Comments

@tianocore-issues
Copy link

This issue was created automatically with bugzilla2github

Bugzilla Bug 4862

Date: 2024-10-08T14:02:24+00:00
From: Edhay <<edhaya.chandran>>
To: Edhay <<edhaya.chandran>>
CC: edhaya.chandran, Sunny.Wang, vincent.stehle

Last updated: 2024-11-07T16:47:44+00:00

@tianocore-issues
Copy link
Author

Comment 23434

Date: 2024-10-08 14:02:24 +0000
From: Edhay <<edhaya.chandran>>

  • Industry Specification: ---
  • Release Observed: EDK II Master
  • Releases to Fix: EDK II Master
  • Target OS: ---
  • Bugzilla Assignee(s): Edhay <<edhaya.chandran>>

UEFI specification does not require the setting of toggle states to be supported. This holds true even if EFI_KEY_STATE_EXPOSED is supported.

The spec does not describe what passing or not passing EFI_TOGGLE_STATE_VALID to SetState() will result in. This should be clarified in the specification.

EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.SetState() returning EFI_UNSUPPORTED must be accepted as a valid return value. It does not constitute a bug.

The solution in https://bugzilla.tianocore.org/show_bug.cgi?id=3390
must be extended to ReadKeyStrokeEx Conformance Test

https://github.com/tianocore/edk2-test/blob/master/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleTextInputEx/BlackBoxTest/SimpleTextInputExBBTestConformance.c#L494

Presently this test prints a warning when toggle state is passed as NULL.

@tianocore-issues
Copy link
Author

Comment 23518

Date: 2024-11-07 10:38:14 +0000
From: Edhay <<edhaya.chandran>>

The issue is valid.
Assigned to Edhay.

@tianocore-issues
Copy link
Author

Comment 23521

Date: 2024-11-07 11:20:26 +0000
From: Sunny Wang <<Sunny.Wang>>

Took a further look into this one after our meeting. I think the problem is that the whole test BBTestSetStateConformanceTestCheckpoint1 is invalid or wrong. Just like you mentioned in the comment, the spec does not describe what passing or not passing EFI_TOGGLE_STATE_VALID to SetState() will result in. Actually the UEFI spec doesn't mention EFI_INVALID_PARAMETER as one of SetState() returned status codes, so I think this test should either be removed or be changed to check EFI_UNSUPPORTED instead.

@tianocore-issues
Copy link
Author

Comment 23526

Date: 2024-11-07 16:46:44 +0000
From: Edhay <<edhaya.chandran>>

Thank you, Sunny for the update.
Yes, I agree that the test itself may need to change.

Presently the spec supports the below return values for SetState():
EFI_SUCCESS : The device state was set appropriately.
EFI_DEVICE_ERROR: The device is not functioning correctly and could not have the setting adjusted.
EFI_UNSUPPORTED : The device does not support the ability to have its state set or the requested state change was not supported.

For the NULL input,
my proposal is to change the test to below:
If return value EFI_SUCCESS : Print error
If return value EFI_DEVICE_ERROR: Print warning. Device itself has an error. Ideally even for non-NULL values the device should return the same if its not functioning correctly.
If return value EFI_UNSUPPORTED : Print Success

Please let me know your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant