public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Avinesh Kumar <akumar@suse.de>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/2] lib: tst_test: Add per filesystem mkfs and mount opts
Date: Mon, 17 Jun 2024 19:37:17 +0200	[thread overview]
Message-ID: <3575698.dWV9SEqChM@localhost> (raw)
In-Reply-To: <20240612121106.11127-2-chrubis@suse.cz>

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.

> - *
> - * @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.

> +	 * entry and is either followed by a terminating entry or by filesystem
> +	 * description(s) plus terminating entry.
> +	 */
> +	if (!tst_test->filesystems[0].type)
> +		ret = 1;
> +
> +	while (tst_test->filesystems[ret].type)
> +		ret++;
> +
> +	return ret;
> +}
> +

Regards,
Avinesh



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

  reply	other threads:[~2024-06-17 17:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 12:11 [LTP] [PATCH v2 0/2] tst_test per FS options and small cleanup Cyril Hrubis
2024-06-12 12:11 ` [LTP] [PATCH v2 1/2] lib: tst_test: Add per filesystem mkfs and mount opts Cyril Hrubis
2024-06-17 17:37   ` Avinesh Kumar [this message]
2024-07-04 14:48     ` Cyril Hrubis
2025-03-20 17:31   ` Petr Vorel
2025-03-21  3:00     ` Li Wang via ltp
2025-03-21  6:41       ` Petr Vorel
2025-03-21  7:53         ` Li Wang via ltp
2024-06-12 12:11 ` [LTP] [PATCH v2 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=3575698.dWV9SEqChM@localhost \
    --to=akumar@suse.de \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox