[PATCH v2 5/7] test: Convert fs_helper to use a class
Tom Rini
trini at konsulko.com
Mon Mar 2 17:03:56 CET 2026
On Sat, Feb 28, 2026 at 11:22:45AM -0700, Simon Glass wrote:
> From: Simon Glass <simon.glass at canonical.com>
>
> It is somewhat inconvenient that callers to mk_fs() must create their
> own temporary directory. Convert it to a class so this can be handled
> automatically, using a context manager.
Instead how about:
Create a class around mk_fs (and later setup_image) to handle the common
tasks of image creation. Many callers of fs_helper.mk_fs create their
own scratch directories while users of fs_helper.setup_image rely on one
being returned. Unify this by adding 'srcdir' as a field while converting
to a class.
And I didn't try out a 'git show -w' to see if that makes it clear the
underlying logic wasn't changed in mk_fs.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260302/43eb7f7b/attachment.sig>
More information about the U-Boot
mailing list