All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] lib: tst_test: Add per filesystem mkfs and mount opts
Date: Tue, 11 Jun 2024 13:02:03 +0200	[thread overview]
Message-ID: <20240611110203.GA34462@pevik> (raw)
In-Reply-To: <85b362c0-9126-45cb-90af-9fe09b848661@suse.cz>

Hi Martin, Cyril,

> Hi,
> a design note below.

...
> > + * @fss: A NULL type terminated array of per file system type options. If
> > + *       tst_test.all_filesystems is not set the array describes a list of
> > + *       file systems to test along with parameters to pass to mkfs and mount.
> > + *       If tst_test.all_filesystems is set the mkfs and mount options are
> > + *       taken from tst_test.fs unless there is an override for a given
> > + *       file system type defined in this array.

> I like the general idea but I don't see the point of having separate .fs and
> .fss. You could simply use .fss[0] for the same purpose as .fs.

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.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-06-11 11:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 12:34 [LTP] [PATCH 0/2] tst_test per FS options and small cleanup Cyril Hrubis
2024-06-03 12:34 ` [LTP] [PATCH 1/2] lib: tst_test: Add per filesystem mkfs and mount opts Cyril Hrubis
2024-06-03 13:22   ` Andrea Cervesato via ltp
2024-06-07 10:29   ` Petr Vorel
2024-06-11  9:54   ` Martin Doucha
2024-06-11 11:02     ` Petr Vorel [this message]
2024-06-11 11:44       ` Martin Doucha
2024-06-11 12:23         ` Cyril Hrubis
2024-06-11 12:42           ` Martin Doucha
2024-06-11 13:11             ` Cyril Hrubis
2024-06-11 13:16               ` Martin Doucha
2024-06-11 13:18                 ` Cyril Hrubis
2024-06-03 12:34 ` [LTP] [PATCH 2/2] syscalls: quotactl: Move mkfs opts into tst_test Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240611110203.GA34462@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mdoucha@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.