[LTP] LTP fs_fill test on vfat - ENOSPC

Andrei Gherzan andrei.gherzan@canonical.com
Thu Feb 16 11:31:45 CET 2023


Hi. Thanks for your feedback.

On 23/02/16 10:51AM, Cyril Hrubis wrote:
> Hi!
> > There a couple of ways to deal with this:
> > 
> > 1. Force the filesystem creation in FAT32. This would be the best way
> > forward in my opinion, but I can't see anything that supports doing so on
> > a per-filesystem basis in LTP.
> > 2. Increase the minimal numbers of entries available in the root
> > directory via "-r ROOT-DIR-ENTRIES"[1]. This would only push the crash
> > on fewer systems.
> > 3. Use a subdirectory in the test setup. Something like /subdir/threadX.
> > If I'm not missing any support to do 1, this would probably be the
> > easiest to do.
> > 
> > I'm happy to go forward with a PR to fix this properly but looking
> > forward to your feedback on how to steer this.
> 
> For number 1 we could probably add a special case in the test library,
> something as (beware untested):
> 
> diff --git a/lib/tst_mkfs.c b/lib/tst_mkfs.c
> index 736324f04..0e6e9ebd1 100644
> --- a/lib/tst_mkfs.c
> +++ b/lib/tst_mkfs.c
> @@ -50,6 +50,9 @@ void tst_mkfs_(const char *file, const int lineno, void (cleanup_fn)(void),
>                 return;
>         }
> 
> +       if (!strcmp(fs_type, "vfat"))
> +               argv[pos++] = "-F 32";
> +
>         snprintf(mkfs, sizeof(mkfs), "mkfs.%s", fs_type);
> 
>         if (fs_opts) {

I did consider this as well, but I haven't proposed it initially because
I didn't want to come with a solution that will switch all tests to
Fat32. This is a limitation for tests that create a large enough number
of directories in the root of the filesystem, so I wanted to keep the
scope there.

I have tested, and we will locally go with my proposed 3rd option for
now. Does that sound resonable for a push to upstrem too? 

-- 
Andrei Gherzan


More information about the ltp mailing list