public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Add support for running shell test application in an immutable volume
@ 2023-05-31 19:13 Kun Qin
  2023-05-31 19:13 ` [PATCH v1 1/1] UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache to Drive Kun Qin
  0 siblings, 1 reply; 7+ messages in thread
From: Kun Qin @ 2023-05-31 19:13 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Michael Kubacki, Sean Brogan

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-07  1:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31 19:13 [PATCH v1 0/1] Add support for running shell test application in an immutable volume Kun Qin
2023-05-31 19:13 ` [PATCH v1 1/1] UnitTestFrameworkPkg: UnitTestPersistenceLib: Save Unit Test Cache to Drive Kun Qin
2023-05-31 20:39   ` Michael D Kinney
2023-06-01 15:50     ` Kun Qin
2023-06-01 16:48       ` Michael D Kinney
2023-06-01 17:47         ` [edk2-devel] " Kun Qin
2023-06-07  1:14         ` Kun Qin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox