Re: [LTP] [PATCH v2] statvfs01: Convert to new LTP API

Petr Vorel
2022-11-30T08:52:37Z

Hi Avinesh,

> Removed the TINFO statements,
> Added a validation of statvfs.f_namemax field by trying to create
> files of valid and invalid length names.
Very nice rewrite, thanks for adding this veryfication.
It'd be nice to update this in docparse description.

> +
> +/*\
> + * [Description]
> + *
> + * Verify that statvfs() executes successfully for all
> + * available filesystems.
e.g.:
Verify that statvfs() executes successfully for all
available filesystems. Verify statvfs.f_namemax field
by trying to create files of valid and invalid length names.

I can merge it with this change.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

...
> +static struct tst_test test = {
> + .test_all = run,
> + .setup = setup,
> + .needs_root = 1,
> + .mount_device = 1,
> + .mntpoint = MNT_POINT,
> + .all_filesystems = 1,
> + .skip_filesystems = (const char *const[]) {
> + "vfat",
> + "exfat",
I was looking what's wrong with vfat and exfat.
statvfs.f_namemax returns 1530, which is obviously too long, thus valid_fname
obviously returns ENAMETOOLONG (36). Tested on 6.1.0-rc6-1.g4c01546-default.
I wonder why, isn't that a bug?

Kind regards,
Petr