public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Richard Palethorpe <rpalethorpe@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v6 3/8] tst_supported_fs: Support skip list when query single fs
Date: Fri, 16 Sep 2022 13:45:08 +0200	[thread overview]
Message-ID: <YyRhxDnUoIDG0OCa@yuki> (raw)
In-Reply-To: <20220915093639.2261-4-pvorel@suse.cz>

Hi!
> And use this feature in zram01.sh.

This looks like an leftover.

> Also print TINFO if test it supported by the test, quit with TCONF
> otherwise (code from do_test_setup() tst_test.c).
> 
> Acked-by: Richard Palethorpe <rpalethorpe@suse.com>
> Reviewed-by: Li Wang <liwang@redhat.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/lib/tst_supported_fs.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/testcases/lib/tst_supported_fs.c b/testcases/lib/tst_supported_fs.c
> index 2b42d5bb3..e2261244d 100644
> --- a/testcases/lib/tst_supported_fs.c
> +++ b/testcases/lib/tst_supported_fs.c
> @@ -80,14 +80,19 @@ int main(int argc, char *argv[])
>  		return 2;
>  	}
>  
> -	if (optind < argc)
> -		return !tst_fs_is_supported(argv[optind]);
> +	if (optind < argc) {
> +		if (tst_fs_in_skiplist(argv[optind], (const char * const*)skiplist))
> +			tst_brk(TCONF, "%s is not supported by the test", argv[optind]);
>  
> +		tst_res(TINFO, "%s is supported by the test", argv[optind]);
> +
> +		return 0;
> +	}

So we now do not check if filesystem is supported just check against the
skiplist?

I guess that it would mqake sense if -s option was present, but
shouldn't we check for mkfs and kernel support without -s if filesystem
was specified?

>  	filesystems = tst_get_supported_fs_types((const char * const*)skiplist);
>  
>  	if (!filesystems[0])
> -		tst_brk(TCONF, "There are no supported filesystems");
> +		tst_brk(TCONF, "There are no supported filesystems or all skipped");
>  
>  	for (i = 0; filesystems[i]; i++)
>  		printf("%s\n", filesystems[i]);
> -- 
> 2.37.3
> 

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2022-09-16 11:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  9:36 [LTP] [PATCH v6 0/8] shell: df01.sh: $TST_ALL_FILESYSTEMS Petr Vorel
2022-09-15  9:36 ` [LTP] [PATCH v6 1/8] tst_supported_fs: Implement skip list Petr Vorel
2022-09-15  9:36 ` [LTP] [PATCH v6 2/8] zram01.sh: Use tst_supported_fs -s tmpfs Petr Vorel
2022-09-16 11:33   ` Cyril Hrubis
2022-09-15  9:36 ` [LTP] [PATCH v6 3/8] tst_supported_fs: Support skip list when query single fs Petr Vorel
2022-09-16 11:45   ` Cyril Hrubis [this message]
2022-09-16 12:09     ` Petr Vorel
2022-09-16 12:28       ` Cyril Hrubis
2022-09-16 12:39         ` Petr Vorel
2022-09-16 12:10     ` Petr Vorel
2022-09-15  9:36 ` [LTP] [PATCH v6 4/8] shell: Add $TST_SKIP_FILESYSTEMS + tests Petr Vorel
2022-09-16 11:50   ` Cyril Hrubis
2022-09-15  9:36 ` [LTP] [PATCH v6 5/8] tst_test.sh: Add $TST_ALL_FILESYSTEMS Petr Vorel
2022-09-16 12:45   ` Cyril Hrubis
2022-09-16 13:09     ` Petr Vorel
2022-09-16 13:17       ` Cyril Hrubis
2022-09-16 20:27         ` Petr Vorel
2022-09-15  9:36 ` [LTP] [PATCH v6 6/8] tst_test.sh: Allow | after whitelisted variable Petr Vorel
2022-09-16 13:02   ` Cyril Hrubis
2022-09-15  9:36 ` [LTP] [PATCH v6 7/8] shell: Add tests for TST_ALL_FILESYSTEMS=1 Petr Vorel
2022-09-15  9:36 ` [LTP] [PATCH v6 8/8] df01.sh: Convert to TST_ALL_FILESYSTEMS=1 Petr Vorel
2022-09-16 13:10   ` Cyril Hrubis
2022-09-16 13:11     ` Cyril Hrubis
2022-09-16 20:39       ` Petr Vorel
2022-09-16 13:12     ` Petr Vorel
2022-09-16 21:22 ` [LTP] [PATCH v6 0/8] shell: df01.sh: $TST_ALL_FILESYSTEMS Petr Vorel

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=YyRhxDnUoIDG0OCa@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    --cc=rpalethorpe@suse.com \
    /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