[edk2-devel] [PATCH v1 0/1] Add support for running shell test application in an immutable volume

Kun Qin posted 1 patch 11 months, 1 week ago
Failed in applying to current master (apply log)
There is a newer version of this series
UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c | 81 +++++++++++---------
1 file changed, 43 insertions(+), 38 deletions(-)
[edk2-devel] [PATCH v1 0/1] Add support for running shell test application in an immutable volume
Posted by Kun Qin 11 months, 1 week ago
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4467

Current implementation of UnitTestFrameworkPkg for shell-based unit test
will save the unit test cache to the same file system as the test
application itself. This works as long as the test application is on a
writable volume, such as USB or EFI partition.

However, sometimes the test application would live inside the firmware
volume because it was integrated into the UEFI image and published
through drivers such as "FvSimpleFileSystem". In this case, attempting to
write cache file to the file system will fail and thus unable to run the
tests.

The included change will write the test cache to the path where this unit
test is invoked. i.e. test is on FS0, which is a FV file system, but FS1
is a usb file system. The traditional flow of running this test in shell
will be "fs0:", "test.efi", which will fail to write to "fs0:". The
updated flow is to navigate shell to "fs1:", then execute the test with
"fs0:test.efi". This way the cache file will be saved to "fs1:" properly.

This change will have no impact on existing users who already run shell
based tests from writeable file systesms, such as USB, FAT on NVMe.

Patch v1 branch: https://github.com/kuqin12/edk2/tree/unit_test_fv_v1.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Michael Kubacki <mikuback@linux.microsoft.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>

kuqin12 (1):
  UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache to
    Drive

 UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c | 81 +++++++++++---------
 1 file changed, 43 insertions(+), 38 deletions(-)

-- 
2.40.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105513): https://edk2.groups.io/g/devel/message/105513
Mute This Topic: https://groups.io/mt/99249445/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-