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

Martin Doucha mdoucha@suse.cz
Tue Jun 11 13:44:06 CEST 2024


On 11. 06. 24 13:02, Petr Vorel wrote:
> Look at the second patch where it is used (quotactl08.c):
> 
> static struct tst_test test = {
> 	...
> 	.fs = {
> 		.mkfs_opts = (const char *const[]){
> 			"-O quota", NULL
> 		},
> 		.type = "ext4",
> 	},
> 
> So would you set it as array?
> 
> static struct tst_test test = {
> 	...
> 	.fss = (struct tst_fs[]){
> 		{
> 			.mkfs_opts = (const char *const[]){
> 				"-O quota", NULL
> 			},
> 			.type = "ext4",
> 		},
> 		{}
> 	},
> 
> It's a bit verbose, but maybe having separate .fs is slightly more confusing.
> 
> Also having only array, we could use .fs name for it.

It's a lot less confusing than having half of the filesystem settings in 
.fs and the other half in .fss when you enable .all_filesystems.

-- 
Martin Doucha   mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic



More information about the ltp mailing list