From: Cyril Hrubis <chrubis@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] tst_supported_fs: Implement checking paths against skiplist
Date: Fri, 23 Sep 2022 17:17:50 +0200 [thread overview]
Message-ID: <Yy3OHtHNt9heYZef@yuki> (raw)
In-Reply-To: <20220921155006.13360-1-mdoucha@suse.cz>
Hi!
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
>
> Implement tst_supported_fs feature suggested by pvorel in his patch:
> tst_test.sh: Fix filesystem support detection
>
> Although the tst_fs_type_name() functions could use some improvements,
> e.g. ext4 must be specified in skiplist as "ext2/ext3/ext4" to get properly
> skipped and vfat is missing from the list of known filesystems.
>
> testcases/lib/tst_supported_fs.c | 49 ++++++++++++++++++++++++++------
> 1 file changed, 41 insertions(+), 8 deletions(-)
>
> diff --git a/testcases/lib/tst_supported_fs.c b/testcases/lib/tst_supported_fs.c
> index 70d4d38c7..5873d0ba1 100644
> --- a/testcases/lib/tst_supported_fs.c
> +++ b/testcases/lib/tst_supported_fs.c
> @@ -32,9 +32,13 @@ static void usage(void)
> fprintf(stderr, "tst_supported_fs -s skip_list fs_type\n");
> fprintf(stderr, " if fs_type is in skip_list, return 1 otherwise return 0\n\n");
>
> + fprintf(stderr, "tst_supported_fs -s skip_list -d path\n");
> + fprintf(stderr, " if filesystem mounted on path is in skip_list, return 1 otherwise return 0\n\n");
> +
> fprintf(stderr, "fs_type - a specified filesystem type\n");
> fprintf(stderr, "skip_list - filesystems to skip, delimiter: '%c'\n",
> SKIP_DELIMITER);
> + fprintf(stderr, "path - any valid file or directory\n");
> }
>
> static char **parse_skiplist(char *fs)
> @@ -62,10 +66,11 @@ static char **parse_skiplist(char *fs)
> int main(int argc, char *argv[])
> {
> const char *const *filesystems;
> + const char *fsname = NULL;
> int i, ret;
> char **skiplist = NULL;
>
> - while ((ret = getopt(argc, argv, "hs:"))) {
> + while ((ret = getopt(argc, argv, "hs:d:"))) {
^
It's customary to sort these
in alphabetical order.
Other than that:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-09-23 15:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 15:50 [LTP] [PATCH] tst_supported_fs: Implement checking paths against skiplist Martin Doucha
2022-09-22 4:16 ` Li Wang
2022-09-22 8:14 ` Martin Doucha
2022-09-22 8:43 ` Petr Vorel
2022-09-22 9:08 ` Li Wang
2022-09-22 9:56 ` Petr Vorel
2022-09-22 9:02 ` Petr Vorel
2022-09-22 9:24 ` Li Wang
2022-09-22 10:40 ` Petr Vorel
2022-09-22 10:55 ` Cyril Hrubis
2022-09-22 10:57 ` Martin Doucha
2022-09-22 11:20 ` Petr Vorel
2022-09-22 14:42 ` Cyril Hrubis
2022-09-22 20:22 ` Petr Vorel
2022-09-22 8:56 ` Petr Vorel
2022-09-22 20:26 ` Petr Vorel
2022-09-23 10:00 ` Petr Vorel
2022-09-26 7:48 ` Petr Vorel
2022-09-23 15:17 ` Cyril Hrubis [this message]
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=Yy3OHtHNt9heYZef@yuki \
--to=chrubis@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.