[LTP] [PATCH v2 1/2] lib: tst_test: Add per filesystem mkfs and mount opts

Cyril Hrubis chrubis@suse.cz
Thu Jul 4 16:48:47 CEST 2024


Hi!
> >  /**
> >   * struct tst_test - A test description.
> >   *
> > @@ -377,29 +407,22 @@ struct tst_ulimit_val {
> >   *
> >   * @dev_min_size: A minimal device size in megabytes.
> >   *
> > - * @dev_fs_type: If set overrides the default file system type for the device and
> > - *               sets the tst_device.fs_type.
>  * @format_device: Does all tst_test.needs_device would do and also formats
>  *                 the device with tst_test.dev_fs_type file system as well.
> We should also update 'format_device' documentation according to these changes.

I've removed the tst_test.dev_fs_type and kept it just as "... with file
system as well."

> > - *
> > - * @dev_fs_opts: A NULL terminated array of options passed to mkfs in the case
> > - *               of 'tst_test.format_device'. These options are passed to mkfs
> > - *               before the device path.
> > - *
> ...
> ...
> > @@ -1160,6 +1160,38 @@ static void set_ulimit_(const char *file, const int lineno, const struct tst_uli
> >  	safe_setrlimit(file, lineno, conf->resource, &rlim);
> >  }
> >  
> > +static unsigned int count_fs_descs(void)
> > +{
> > +	unsigned int ret = 0;
> > +
> > +	if (!tst_test->filesystems)
> > +		return 0;
> > +
> > +	/*
> > +	 * First entry is special, if it has zero type is the it's the default
> this sentence seems a bit off.
> 
> with these,
> Reviewed-by: Avinesh Kumar <akumar@suse.de>
> for both patches.

Fixed this one as well and pushed.

Thanks everyone for the reviews!

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list