Linux Test Project
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] lib: LTP_SINGLE_FS_TYPE fix fuse blacklist
Date: Thu, 22 May 2025 19:47:38 +0200	[thread overview]
Message-ID: <aC9jOhqDkRwGp9-T@rei> (raw)
In-Reply-To: <20250522173111.GA19708@pevik>

Hi!
> > The case of LTP_SINGLE_FS_TYPE did not proplerly used the fuse
> > filesystem blacklist and we enabled fuse filesystem even for tests that
> > explicitly stated in the tst_test structure that they do not work with
> > fuse.
> 
> > Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> > CC: Jan Polensky <japo@linux.ibm.com>
> > ---
> >  lib/tst_supported_fs_types.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> > diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
> > index bbbb8df19..3a394283c 100644
> > --- a/lib/tst_supported_fs_types.c
> > +++ b/lib/tst_supported_fs_types.c
> > @@ -158,8 +158,10 @@ const char **tst_get_supported_fs_types(const char *const *skiplist)
> >  	only_fs = getenv("LTP_SINGLE_FS_TYPE");
> 
> >  	if (only_fs) {
> > +		enum tst_fs_impl ret;
> >  		tst_res(TINFO, "WARNING: testing only %s", only_fs);
> > -		if (tst_fs_is_supported(only_fs))
> > +		ret = tst_fs_is_supported(only_fs);
> > +		if (ret == TST_FS_KERNEL || (ret == TST_FS_FUSE && !skip_fuse))
> >  			fs_types[0] = only_fs;
> 
> Is it really good thing to do?
> Because LTP_SINGLE_FS_TYPE forces whatever filesystems, it ignores
> .skip_filesystems. E.g. creat09.c don't want to be tested on ntfs (and others
> but we can force it):

Ah, right, we have to apply the skiplist as well, so on the top of that
we need, I will send a v2.

diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
index 3a394283c..736e68dec 100644
--- a/lib/tst_supported_fs_types.c
+++ b/lib/tst_supported_fs_types.c
@@ -159,10 +159,16 @@ const char **tst_get_supported_fs_types(const char *const *skiplist)

        if (only_fs) {
                enum tst_fs_impl ret;
+
                tst_res(TINFO, "WARNING: testing only %s", only_fs);
+
+               if (tst_fs_in_skiplist(only_fs, skiplist))
+                       return fs_types;
+
                ret = tst_fs_is_supported(only_fs);
                if (ret == TST_FS_KERNEL || (ret == TST_FS_FUSE && !skip_fuse))
                        fs_types[0] = only_fs;
+
                return fs_types;
        }

> Could we clearly define what we expect from LTP_SINGLE_FS_TYPE?
> FYI I put links to the discussion in the ticket
> https://github.com/linux-test-project/ltp/issues/1242
> 
> I understand the wish to use LTP_SINGLE_FS_TYPE for a proper testing.  If that
> requires to respect .skip_filesystems, but
> 1) it should be done for all filesystems
> 2) we should have another variable to allow to force the user defined
> filesystem, e.g.
> LTP_SINGLE_FS_TYPE=ntfs LTP_SINGLE_FS_TYPE_FORCE_FS=1

What about LTP_FORCE_SINGLE_FS_TYPE=ntfs that would do the same as
LTP_SINGLE_FS_TYPE=ntfs but would disable the skiplist?

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2025-05-22 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21  9:53 [LTP] [PATCH] lib: LTP_SINGLE_FS_TYPE fix fuse blacklist Cyril Hrubis
2025-05-22 16:14 ` Jan Polensky
2025-05-22 17:31 ` Petr Vorel
2025-05-22 17:47   ` Cyril Hrubis [this message]
2025-05-22 19:26     ` Petr Vorel
2025-05-22 19:57       ` Petr Vorel
2025-05-26 10:09         ` 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=aC9jOhqDkRwGp9-T@rei \
    --to=chrubis@suse.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox