[PATCH] uefirtmisc: add checking the resources for testing

Sunny Wang Sunny.Wang at arm.com
Wed Jan 19 09:23:54 UTC 2022


Hi Ivan,

Thanks for working on this.

However, if my understanding is correct, this solution won't work. The UEFI variable storage space is still used up by uefirtmisc test. Then, any SetVariable related test following uefirtmisc would still fail due to no remaining space.
For example, when we run " fwts -r stdout -q --sbbr", uefirtvariable uefirttime will be run after uefirtmisc. Then, both tests would still fail.
It looks like you would like to skip the stress test for the system that doesn't have large UEFI variable storage space. If so, I think you can call QueryVariableInfo() and check the RemainingVariableStorageSize. It will be good to skip all the stress test if the RemainingVariableStorageSize is smaller than 64k.

Best Regards,
Sunny

-----Original Message-----
From: fwts-devel <fwts-devel-bounces at lists.ubuntu.com> On Behalf Of Ivan Hu
Sent: 19 January 2022 08:34
To: fwts-devel at lists.ubuntu.com
Subject: [PATCH] uefirtmisc: add checking the resources for testing

BugLink: https://bugs.launchpad.net/fwts/+bug/1958206

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/uefi/uefirtmisc/uefirtmisc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c
index f6038f5f..db33ad66 100644
--- a/src/uefi/uefirtmisc/uefirtmisc.c
+++ b/src/uefi/uefirtmisc/uefirtmisc.c
@@ -91,6 +91,11 @@ static int getnexthighmonotoniccount_test(fwts_framework *fw, uint32_t multitest
                                        "service is not supported on this platform.");
                                return FWTS_SKIP;
                        }
+                       if (status == EFI_OUT_OF_RESOURCES) {
+                               fwts_skipped(fw, "Skipping test, run out of resources for "
+                                       "GetNextHighMonotonicCount runtime service test.");
+                               return FWTS_SKIP;
+                       }
                        fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeGetNextHighMonotonicCount",
                                "Failed to get high monotonic count with UEFI runtime service.");
                        fwts_uefi_print_status_info(fw, status);
--
2.25.1


--
fwts-devel mailing list
fwts-devel at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


More information about the fwts-devel mailing list