зеркало из https://github.com/microsoft/mu_plus.git
Update Test App to Check Early Storage Size
Description Block some tests in the MsWheaEarlyStorageUnitTestApp behind a check to the size of the early storage. This change is to prevent the test from failing on platforms that do not have enough early storage to accommodate the required early storage entries. - [x] Impacts functionality? - **Functionality** - Does the change ultimately impact how firmware functions? - Examples: Add a new library, publish a new PPI, update an algorithm, ... - [ ] Impacts security? - **Security** - Does the change have a direct security impact on an application, flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ... - [ ] Breaking change? - **Breaking change** - Will anyone consuming this change experience a break in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ... - [x] Includes tests? - **Tests** - Does the change include any explicit test code? - Examples: Unit tests, integration tests, robot tests, ... - [ ] Includes documentation? - **Documentation** - Does the change contain explicit documentation additions outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ... How This Was Tested Running the MsWheaEarlyUnitTestApp on Q35 Integration Instructions N/A
This commit is contained in:
Родитель
fc18ba46fb
Коммит
931055c3e8
|
@ -535,6 +535,13 @@ MsWheaEarlyUnitTestAppEntryPoint (
|
|||
|
||||
DEBUG ((DEBUG_ERROR, "%a %a v%a\n", __FUNCTION__, UNIT_TEST_APP_NAME, UNIT_TEST_APP_VERSION));
|
||||
|
||||
// Only run the following tests if the early storage region can store at least one entry.
|
||||
// If the region is too small, log an error to alert the tester to the issue.
|
||||
if (MsWheaESGetMaxDataCount () < sizeof (MS_WHEA_EARLY_STORAGE_ENTRY_COMMON)) {
|
||||
UT_LOG_ERROR ("Early storage capacity is not large enough to fit an early storage entry! Skipping tests.\n");
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
// Start setting up the test framework for running the tests.
|
||||
Status = InitUnitTestFramework (&Fw, UNIT_TEST_APP_NAME, gEfiCallerBaseName, UNIT_TEST_APP_VERSION);
|
||||
if (EFI_ERROR (Status) != FALSE) {
|
||||
|
@ -621,15 +628,18 @@ MsWheaEarlyUnitTestAppEntryPoint (
|
|||
NULL
|
||||
);
|
||||
|
||||
AddTestCase (
|
||||
Misc,
|
||||
"MsWhea ES store entry",
|
||||
"MsWhea.Miscellaneous.MsWheaESStoreEntryTest",
|
||||
MsWheaESStoreEntryTest,
|
||||
MsWheaESVerify,
|
||||
MsWheaESCleanUp,
|
||||
NULL
|
||||
);
|
||||
// Only run the following test if the early storage capacity is large enough
|
||||
if (MsWheaESGetMaxDataCount () >= (sizeof (MS_WHEA_EARLY_STORAGE_ENTRY_COMMON) * 2)) {
|
||||
AddTestCase (
|
||||
Misc,
|
||||
"MsWhea ES store entry",
|
||||
"MsWhea.Miscellaneous.MsWheaESStoreEntryTest",
|
||||
MsWheaESStoreEntryTest,
|
||||
MsWheaESVerify,
|
||||
MsWheaESCleanUp,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
AddTestCase (
|
||||
Misc,
|
||||
|
|
Загрузка…
Ссылка в новой задаче