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.

> 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.

> fattools are only used as a replacement for dosfstools 'mcopy' and
> 'mdir', which are used to insert files and directories into existing
> fatfs images and list existing fatfs images respectively, without the
> need for superuser access to mount such images.
> 
> The exfat filesystem has no filesystem specific command, there is only
> the generic filesystem command interface, therefore check_ubconfig()
> has to special case exfat and skip check for CONFIG_CMD_EXFAT and
> instead check for CONFIG_FS_EXFAT.
> 
> Signed-off-by: Marek Vasut <ma...@denx.de>
> ---
> Cc: Baruch Siach <bar...@tkos.co.il>
> Cc: Francesco Dolcini <francesco.dolc...@toradex.com>
> Cc: Heinrich Schuchardt <xypron.g...@gmx.de>
> Cc: Hiago De Franco <hiago.fra...@toradex.com>
> Cc: Ilias Apalodimas <ilias.apalodi...@linaro.org>
> Cc: Nam Cao <nam...@linutronix.de>
> Cc: Simon Glass <s...@chromium.org>
> Cc: Sughosh Ganu <sughosh.g...@linaro.org>
> Cc: Tom Rini <tr...@konsulko.com>
> Cc: u-boot@lists.denx.de
> ---
>  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.

[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.

Otherwise looks good, thanks!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to