[LTP] [PATCH v2 01/13] syscalls/quotactl01: Also test with vfsv1 format

Cyril Hrubis chrubis@suse.cz
Mon Nov 8 16:25:42 CET 2021

>  static void setup(void)
>  {
> -	const char *const cmd[] = {"quotacheck", "-ugF", "vfsv0", MNTPOINT, NULL};
> +	const char *const cmd[] = {"quotacheck", "-ugF", fmt_variants[tst_variant].fmt_name, MNTPOINT, NULL};

I would be inclined to store the variants pointer on a first line in the
setup so that the code gets slightly easier to read as:

	const struct quotactl_fmt_variant *var = &fmt_variants[tst_variant];

Then we can do var->fmt_name and var->fmt_id in the rest of the setup code...

Anyways the code looks good:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

Cyril Hrubis

More information about the ltp mailing list