public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 1/3] Filter mkfs version in tst_fs
Date: Fri, 4 Oct 2024 16:00:30 +0200	[thread overview]
Message-ID: <Zv_0_tsJE6XMSKMz@yuki.lan> (raw)
In-Reply-To: <20241002-ioctl_ficlone01_fix-v3-1-7e077918dfd4@suse.com>

Hi!
> +		if (ver_parser >= ver_get)
> +			break;
> +
> +		check_msg = "%s required >= %d, but got %d, "
> +			"the version is required in order run the test.";

I would drop the "the version is required in order to run the test."
part from these messages, since it does not add any more value on the
top of the first part of the meassage.

> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index d226157e0..192fee309 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -1250,6 +1250,7 @@ static const char *default_fs_type(void)
>  static void do_setup(int argc, char *argv[])
>  {
>  	char *tdebug_env = getenv("LTP_ENABLE_DEBUG");
> +	int ret = 0;
>  
>  	if (!tst_test)
>  		tst_brk(TBROK, "No tests to run");
> @@ -1310,7 +1311,7 @@ static void do_setup(int argc, char *argv[])
>  		int i;
>  
>  		for (i = 0; (cmd = tst_test->needs_cmds[i]); ++i)
> -			tst_check_cmd(cmd);
> +			tst_check_cmd(cmd, 1);
>  	}
>  
>  	if (tst_test->needs_drivers) {
> @@ -1415,8 +1416,15 @@ static void do_setup(int argc, char *argv[])
>  
>  		tdev.fs_type = default_fs_type();
>  
> -		if (!tst_test->all_filesystems && count_fs_descs() <= 1)
> +		if (!tst_test->all_filesystems && count_fs_descs() <= 1) {
> +			if (tst_test->filesystems->mkfs_ver)
> +				ret = tst_check_cmd(tst_test->filesystems->mkfs_ver, 0);
> +
> +			if (ret)
> +				return;

And if we are here, it means that the test runs only for a single
filesystem, so we should instead do:

			if (tst_test->filesystem->mkfs_ver)
				tst_check_mcd(tst_test->filesystems->mkfs_ver, 1);

The rest looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2024-10-04 14:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 12:22 [LTP] [PATCH v3 0/3] Fix ioctl_ficlone(range) failures on certain FS Andrea Cervesato
2024-10-02 12:22 ` [LTP] [PATCH v3 1/3] Filter mkfs version in tst_fs Andrea Cervesato
2024-10-04 14:00   ` Cyril Hrubis [this message]
2024-10-02 12:22 ` [LTP] [PATCH v3 2/3] Add minimum kernel requirement for FS setup Andrea Cervesato
2024-10-04 14:08   ` Cyril Hrubis
2024-10-08 11:34     ` Andrea Cervesato via ltp
2024-10-08 11:50       ` Cyril Hrubis
2024-10-02 12:22 ` [LTP] [PATCH v3 3/3] Setup minimal kernel for ioctl_clone(range) tests Andrea Cervesato

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=Zv_0_tsJE6XMSKMz@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.de \
    --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