All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: ltp@lists.linux.it, benjamin.copeland@linaro.org
Subject: Re: [LTP] [PATCH] file_attr02: Add XFS kernel config requirement
Date: Mon, 27 Oct 2025 10:21:18 +0100	[thread overview]
Message-ID: <aP85jhbSvlYxeOiQ@rei> (raw)
In-Reply-To: <aPu2lqXN8G7h4e7D@stanley.mountain>

Hi!
> > I wonder why tst_get_supported_fs_types() from lib/tst_supported_fs_types.c did
> > not detect it. Could you please post whole output?
> > 
> > Because if code in struct tst_test.filesystems does not work, many tests would
> > be affected with this setup. I'm probably missing something, but I'd prefer to
> > fix the detection in the library than force config (we don't have any CONFIG_.*_FS
> > in testcases/).

I think that we have a but in the test library, it looks like we do not
check for the kernel support if we have only one filesystem defined in
the tst_test.filesystems.

The problem is that we are trying to avoid formatting and mounting the
filesystem for each test iteration (if -i 10 is passed) but that means
that we skip the filesystem kernel support. We only check for mkfs in
the setup and prepare the device.

This should fix it:

diff --git a/lib/tst_test.c b/lib/tst_test.c
index b8894f782..d49f34623 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1530,6 +1530,10 @@ 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_fs_is_supported(tdev.fs_type))
+                               tst_brk(TCONF, "The %s filesystem is not supported", tdev.fs_type);
+
                        if (tst_test->filesystems && tst_test->filesystems->mkfs_ver)
                                tst_check_cmd(tst_test->filesystems->mkfs_ver, 1);


-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2025-10-27  9:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24 12:56 [LTP] [PATCH] file_attr02: Add XFS kernel config requirement Anders Roxell
2025-10-24 13:30 ` Petr Vorel
2025-10-24 17:25   ` Dan Carpenter
2025-10-27  9:21     ` Cyril Hrubis [this message]
2025-10-27 14:32       ` Anders Roxell
2025-10-27 15:11         ` Cyril Hrubis
2025-10-27 15:19           ` Dan Carpenter
2025-10-30 18:24             ` 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=aP85jhbSvlYxeOiQ@rei \
    --to=chrubis@suse.cz \
    --cc=benjamin.copeland@linaro.org \
    --cc=dan.carpenter@linaro.org \
    --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 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.