On Mon, Mar 10, 2025 at 09:37:36PM +0100, Marek Vasut wrote: > On 3/10/25 4:30 PM, Tom Rini wrote: > > On Sat, Mar 08, 2025 at 09:12:16PM +0100, Marek Vasut wrote: > > > Add tests for the exfat filesystem. These tests are largely an > > > extension of the FS_GENERIC tests with the following notable > > > exceptions. > > > > > > The filesystem image for exfat tests is generated using combination > > > of exfatutils mkfs.exfat and python fattools. The fattols are capable > > > > Did you mean "exfatprogs" and not "exfatutils" ? But we need to update > > tools/docker/Dockerfile to list the tool there. > > It seems the CI container already has the tools in it ?
Implicitly and not explicitly then.
> Where do I update the docker container, is that tools/docker/Dockerfile ?
Yes, thanks.
> > > of generating exfat filesystem images too, but this is not used, the
> >
> > Presumably because "fattools mkfat" seems to have further external
> > dependencies and so would be more of a pain to use.
>
> I don't think it does, but I think we should stick to tools which will be in
> production systems as much as possible, and that is mkfs.exfat from
> exfatprogs . The fattools is only used here because mkfs.exfat cannot create
> an image from list of files.
Well, I tried "fattools mkfs.exfat" and it wanted tkinter to be
installed, so that's why I'd not bother with it.
> [...]
>
> > > test/py/requirements.txt | 1 +
> > > test/py/tests/fs_helper.py | 8 ++++++--
> > > test/py/tests/test_fs/conftest.py | 20 +++++++++++---------
> > > test/py/tests/test_fs/test_ext.py | 20 ++++++++++++++------
> > > 4 files changed, 32 insertions(+), 17 deletions(-)
> >
> > We also need to update test/py/tests/test_fs/fstest_helpers.py to know
> > to call fsck.exfat.
>
> Fixed in V2, thanks.
>
> > [snip]
> > > @@ -64,6 +66,8 @@ def mk_fs(config, fs_type, size, prefix, src_dir=None,
> > > size_gran = 0x100000):
> > > check_call(f'tune2fs -O ^metadata_csum {fs_img}',
> > > shell=True)
> > > elif fs_lnxtype == 'vfat' and src_dir:
> > > check_call(f'mcopy -i {fs_img} -vsmpQ {src_dir}/* ::/',
> > > shell=True)
> > > + elif fs_lnxtype == 'exfat' and src_dir:
> > > + check_call(f'fattools cp {src_dir}/* {fs_img}', shell=True)
> > > return fs_img
> > > except CalledProcessError:
> > > call(f'rm -f {fs_img}', shell=True)
> >
> > A cleanup to use fattools in both cases would be nice, as a follow-up.
> See above, I am not convinced we should go for fattools all across the
> board. Do you think we should ?
In that we can't drop dosfsutils entirely, it's not a big deal either
way.
--
Tom
signature.asc
Description: PGP signature

