[LTP] [PATCH v2] statvfs01: Convert to new LTP API
Petr Vorel
pvorel@suse.cz
Thu Dec 1 11:45:46 CET 2022
Hi all,
> Avinesh Kumar <akumar@suse.de> wrote:
> > How about
> > > 1) don't skip exfat and vfat but just skip creating file with valid
> > name? or
> > > 2) Add #define NLS_MAX_CHARSET_SIZE 6 and for vfat and exfat calculate
> > > length as: buf.f_namemax / NLS_MAX_CHARSET_SIZE - 1 ?
> > Thank you for the review and research on vfat, exfat scenarios.
> > I have adopted the option 1 for now and sent a v3 of this patch.
> I thought option_1 meant to skip creating a valide-file when
> detecting on "vfat,exfat" FS, but not skip for others.
> Or probably I misunderstood Petr's words.
No, you understood me well. I wanted this to be in v3,
but it's not there :).
Kind regards,
Petr
> Anyway, don't hurry to send V3 until we get an agreement :).
> --- a/testcases/kernel/syscalls/statvfs/statvfs01.c
> +++ b/testcases/kernel/syscalls/statvfs/statvfs01.c
> @@ -30,7 +30,10 @@ static void run(void)
> memset(valid_fname, 'a', buf.f_namemax - 1);
> memset(invalid_fname, 'b', buf.f_namemax + 1);
> - TST_EXP_FD(creat(valid_fname, 0444));
> + long fs_type = tst_fs_type(TEST_PATH);
> + if (fs_type != TST_VFAT_MAGIC && fs_type != TST_EXFAT_MAGIC)
> + TST_EXP_FD(creat(valid_fname, 0444));
> +
> TST_EXP_FAIL(creat(invalid_fname, 0444), ENAMETOOLONG);
> }
> @@ -46,9 +49,4 @@ static struct tst_test test = {
> .mount_device = 1,
> .mntpoint = MNT_POINT,
> .all_filesystems = 1,
> - .skip_filesystems = (const char *const[]) {
> - "vfat",
> - "exfat",
> - NULL
> - }
> };
More information about the ltp
mailing list