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

Kun Qin kuqin12 at gmail.com
Wed May 31 19:13:57 UTC 2023


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 at intel.com>
Cc: Michael Kubacki <mikuback at linux.microsoft.com>
Cc: Sean Brogan <sean.brogan at 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/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list