[LTP] LTP fs_fill test on vfat - ENOSPC

Cyril Hrubis chrubis@suse.cz
Thu Feb 16 10:51:36 CET 2023


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) {


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list