All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it, automated-testing@yoctoproject.org
Subject: Re: [LTP] [PATCH v3 06/10] tst_supported_fs: Support skip list when query single fs
Date: Fri, 02 Sep 2022 10:38:22 +0100	[thread overview]
Message-ID: <87tu5q15gj.fsf@suse.de> (raw)
In-Reply-To: <20220804121946.19564-7-pvorel@suse.cz>


Hi,

Acked-by: Richard Palethorpe <rpalethorpe@suse.com>

Petr Vorel <pvorel@suse.cz> writes:

> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> New in v3
>
>  include/tst_fs.h                 | 10 ++++++++++
>  lib/tst_supported_fs_types.c     | 18 ++++++++++++++++++
>  testcases/lib/tst_supported_fs.c |  2 +-
>  3 files changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/include/tst_fs.h b/include/tst_fs.h
> index 8159b99eb..2fe97f174 100644
> --- a/include/tst_fs.h
> +++ b/include/tst_fs.h
> @@ -182,6 +182,16 @@ enum tst_fs_impl {
>   */
>  enum tst_fs_impl tst_fs_is_supported(const char *fs_type);
>  
> +/*
> + * Check filesystem support (@see tst_fs_is_supported()), but consider also
> + * filesystems to skip.
> + *
> + * @fs_type A filesystem name to check the support for.
> + * @skiplist A NULL terminated array of filesystems to skip.
> + */
> +enum tst_fs_impl tst_fs_is_supported_skiplist(const char *fs_type, const char
> +					      *const *skiplist);
> +
>  /*
>   * Returns NULL-terminated array of kernel-supported filesystems.
>   *
> diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
> index 9726d193a..8c9379c1b 100644
> --- a/lib/tst_supported_fs_types.c
> +++ b/lib/tst_supported_fs_types.c
> @@ -134,6 +134,24 @@ enum tst_fs_impl tst_fs_is_supported(const char *fs_type)
>  	return TST_FS_UNSUPPORTED;
>  }
>  
> +enum tst_fs_impl tst_fs_is_supported_skiplist(const char *fs_type, const char
> +					      *const *skiplist)
> +{
> +	int ret;
> +
> +	ret = tst_fs_is_supported(fs_type);
> +
> +	if (!ret)
> +		return ret;
> +
> +	if (tst_fs_in_skiplist(fs_type, skiplist)) {
> +		tst_brk(TCONF, "%s is not supported by the test",
> +			fs_type);
> +	}
> +
> +	return ret;
> +}
> +
>  const char **tst_get_supported_fs_types(const char *const *skiplist)
>  {
>  	unsigned int i, j = 0;
> diff --git a/testcases/lib/tst_supported_fs.c b/testcases/lib/tst_supported_fs.c
> index 87be2b759..75945c809 100644
> --- a/testcases/lib/tst_supported_fs.c
> +++ b/testcases/lib/tst_supported_fs.c
> @@ -70,7 +70,7 @@ int main(int argc, char *argv[])
>  	}
>  
>  	if (optind < argc)
> -		return !tst_fs_is_supported(argv[optind]);
> +		return !tst_fs_is_supported_skiplist(argv[optind], (const char * const*)skiplist);
>  
>  	filesystems = tst_get_supported_fs_types((const char * const*)skiplist);
>  	for (i = 0; filesystems[i]; i++)
> -- 
> 2.37.1


-- 
Thank you,
Richard.

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

  reply	other threads:[~2022-09-02  9:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 12:19 [LTP] [PATCH v3 00/10] shell: nfs: $TST_ALL_FILESYSTEMS (.all_filesystems) Petr Vorel
2022-08-04 12:19 ` [LTP] [PATCH v3 01/10] tst_test.sh: Fix tst_mkfs() for tmpfs Petr Vorel
2022-09-02  9:18   ` Richard Palethorpe
2022-09-02  9:34     ` Petr Vorel
2022-09-02  9:44       ` Richard Palethorpe
2022-09-02 10:22         ` Petr Vorel
2022-08-04 12:19 ` [LTP] [PATCH v3 02/10] tst_device: Add clear command Petr Vorel
2022-08-04 12:19 ` [LTP] [PATCH v3 03/10] tst_test.sh: Allow $ ; after whitelisted variable Petr Vorel
2022-09-02  9:31   ` Richard Palethorpe
2022-08-04 12:19 ` [LTP] [PATCH v3 04/10] tst_mount_device.sh: Cover early tst_umount call Petr Vorel
2022-09-02  9:32   ` Richard Palethorpe
2022-08-04 12:19 ` [LTP] [PATCH v3 05/10] tst_supported_fs: Implement skip list Petr Vorel
2022-09-02  9:43   ` Richard Palethorpe
2022-08-04 12:19 ` [LTP] [PATCH v3 06/10] tst_supported_fs: Support skip list when query single fs Petr Vorel
2022-09-02  9:38   ` Richard Palethorpe [this message]
2022-08-04 12:19 ` [LTP] [PATCH v3 07/10] shell: Add $TST_SKIP_FILESYSTEMS + tests Petr Vorel
2022-09-02  9:39   ` Richard Palethorpe
2022-08-04 12:19 ` [LTP] [PATCH v3 08/10] tst_test.sh: Add $TST_ALL_FILESYSTEMS Petr Vorel
2022-09-02  9:40   ` Richard Palethorpe
2022-08-04 12:19 ` [LTP] [PATCH v3 09/10] shell: Add test for TST_ALL_FILESYSTEMS=1 Petr Vorel
2022-09-02  9:40   ` Richard Palethorpe
2022-08-04 12:19 ` [RFC][PATCH v3 10/10] nfs: Use TST_ALL_FILESYSTEMS=1 Petr Vorel
2022-08-04 12:19   ` [LTP] " Petr Vorel
2022-09-02  9:26 ` [LTP] [PATCH v3 00/10] shell: nfs: $TST_ALL_FILESYSTEMS (.all_filesystems) Richard Palethorpe

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=87tu5q15gj.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=automated-testing@yoctoproject.org \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@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.