The stress tests for UEFI runtime service

Bug #1958206 reported by Sunny Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Firmware Test Suite
Fix Released
High
Ivan Hu

Bug Description

Hi FWTS owners and experts,

Do you know why we need to do the stress test for UEFI runtime service GetNextHighMonotonicCount? I saw it was added by the commit below, but I don't see any reason.
   - https://github.com/ColinIanKing/fwts/commit/ad3bb059b3a54bf21555e01f57ea0c4fcc2e434a

Since the edk2 GetNextHighMonotonicCount implementation below would set a UEFI variable, running this stress test would use up the space of the UEFI variable store and then cause the failures with other test cases that are also related to the UEFI variable.
 - https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c

We run into this issue on several ARM embedded platforms (non-server and non-workstation systems) like RPi4 because it is common to see that ARM embedded platforms allocate NVRAM space less than 64k for UEFI variable store.

For reproducing this issue, you just need to run FWTS uefirtmisc test twice on RPi4. Each uefirtmisc test would take 36k, so you would run into this issue at the second time run.

Therefore, if we have no reason to do the stress test, can we remove it? If we have a reason, can we have a flag to enable/disable GetNextHighMonotonicCount stress test?

Furthermore, can we also reduce the value of uefi_set_variable_multiple to 20? The current setting (40) would also take 14k that is a little bit much for the ARM embedded devices (non-server and non-workstation systems).

For more information, please check https://github.com/pftf/RPi4/issues/163.

Best Regards,
Sunny

Ivan Hu (ivan.hu)
Changed in fwts:
assignee: nobody → Ivan Hu (ivan.hu)
importance: Undecided → High
Revision history for this message
Ivan Hu (ivan.hu) wrote :

Add checking the resources should be the solution for this issue instead of reducing multiple times of the stress tests.

Patch has been sent for review,
https://lists.ubuntu.com/archives/fwts-devel/2022-January/013448.html

Changed in fwts:
status: New → Fix Committed
Revision history for this message
Sunny Wang (sunnywang-arm) wrote :

Thanks, Ivan. Just reviewed and added comments
https://lists.ubuntu.com/archives/fwts-devel/2022-January/013449.html

Revision history for this message
Sunny Wang (sunnywang-arm) wrote :
Revision history for this message
Sunny Wang (sunnywang-arm) wrote :
Revision history for this message
Ivan Hu (ivan.hu) wrote :

I've tested with two platforms, include intel EDK2 UEFI develop kit(RainbowPass).
Run test uefirtmisc several times till the insufficient remaining storage. Fortunately, after reboot, they recover the remaining storage storage.

Revision history for this message
Ivan Hu (ivan.hu) wrote :

Another patch which sets the default of get next high monotonic count stress test to 50, and adds
option(--uefi-get-mn-count-multiple) to specify iterations.

https://lists.ubuntu.com/archives/fwts-devel/2022-January/013458.html

has been sent for review.

Ivan Hu (ivan.hu)
Changed in fwts:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.