public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/2] lib: tst_test: Add per filesystem mkfs and mount opts
Date: Fri, 21 Mar 2025 07:41:51 +0100	[thread overview]
Message-ID: <20250321064151.GA145712@pevik> (raw)
In-Reply-To: <CAEemH2d8OzjHVi7ZJD3ah=C+JpDFmGcRTj=4CzDZ950uNqBfmw@mail.gmail.com>

Hi Li,

> On Fri, Mar 21, 2025 at 1:31 AM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi Cyril, all,

> > > This commit does:

> > > * Group the filesystem type, mkfs and mount options into a separate
> > >   structure

> > > * Add an array of these structures to be able to define per filesystem
> > >   mkfs and mount options

> > > The details on the usage should be hopefully clear from the
> > > documentation comments for the struct tst_test.

> > FYI, this merged as cce6188916 ("lib: tst_test: Add per filesystem mkfs and
> > mount opts") causes this behavior of none testing run when there is no
> > suitable
> > filesystem. I found it when trying to bisect something with rapido-linux
> > and
> > compile kernel without Btrfs and XFS. Don't we want to add some TCONF?


> I think we need TCONF there. Can you confirm below change makes sense?

Thanks! LGTM (untested). Can you please send a patch? (I'll test it).

Kind regards,
Petr

> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -1856,6 +1856,7 @@ static int run_tcases_per_fs(void)
>         int ret = 0;
>         unsigned int i;
>         const char *const *filesystems =
> tst_get_supported_fs_types(tst_test->skip_filesystems);
> +       bool found_valid_fs = false;

>         if (!filesystems[0])
>                 tst_brk(TCONF, "There are no supported filesystems");
> @@ -1866,6 +1867,7 @@ static int run_tcases_per_fs(void)
>                 if (!fs)
>                         continue;

> +               found_valid_fs = true;
>                 ret = run_tcase_on_fs(fs, filesystems[i]);

>                 if (ret == TCONF)
> @@ -1877,6 +1879,9 @@ static int run_tcases_per_fs(void)
>                 do_exit(ret);
>         }

> +       if (!found_valid_fs)
> +               tst_brk(TCONF, "No required filesystems are available");
> +
>         return ret;
>  }




> > Kind regards,
> > Petr

> > ioctl_ficlone03.c:
> >         .filesystems = (struct tst_fs []) {
> >                 {.type = "btrfs"},
> >                 {.type = "bcachefs"},
> >                 {
> >                         .type = "xfs",
> >                         .min_kver = "4.16",
> >                         .mkfs_ver = "mkfs.xfs >= 1.5.0",
> >                         .mkfs_opts = (const char *const []) {"-m",
> > "reflink=1", NULL},
> >                 },
> >                 {}
> >         },

> > rapido1:/opt/ltp/testcases/bin# ./ioctl_ficlone03; echo $?
> > tst_buffers.c:57: TINFO: Test is using guarded buffers
> > tst_tmpdir.c:317: TINFO: Using /tmp/LTP_iocSKLS9l as tmpdir (tmpfs
> > filesystem)
> > tst_device.c:99: TINFO: Found free device 0 '/dev/loop0'
> > tst_test.c:1900: TINFO: LTP version: 20250130-166-g17960d952
> > tst_test.c:1904: TINFO: Tested kernel: 4.5.0-00002-g22bd332f11d4 #162 SMP
> > Thu Mar 20 18:00:10 CET 2025 x86_64
> > tst_kconfig.c:88: TINFO: Parsing kernel config '/.config'
> > tst_test.c:1724: TINFO: Overall timeout per run is 0h 00m 31s
> > tst_supported_fs_types.c:97: TINFO: Kernel supports ext2
> > tst_supported_fs_types.c:62: TINFO: mkfs.ext2 does exist
> > tst_supported_fs_types.c:97: TINFO: Kernel supports ext3
> > tst_supported_fs_types.c:62: TINFO: mkfs.ext3 does exist
> > tst_supported_fs_types.c:97: TINFO: Kernel supports ext4
> > tst_supported_fs_types.c:62: TINFO: mkfs.ext4 does exist
> > tst_supported_fs_types.c:105: TINFO: Skipping bcachefs because of FUSE
> > blacklist
> > tst_supported_fs_types.c:97: TINFO: Kernel supports vfat
> > tst_supported_fs_types.c:62: TINFO: mkfs.vfat does exist
> > tst_supported_fs_types.c:97: TINFO: Kernel supports tmpfs
> > tst_supported_fs_types.c:49: TINFO: mkfs is not needed for tmpfs

> > Summary:
> > passed   0
> > failed   0
> > broken   0
> > skipped  0
> > warnings 0
> > 0

> > rapido1:/opt/ltp/testcases/bin# grep -e CONFIG_BTRFS_FS -e CONFIG_XFS_FS
> > /.config
> > + grep -e CONFIG_BTRFS_FS -e CONFIG_XFS_FS /.config
> > # CONFIG_XFS_FS is not set
> > # CONFIG_BTRFS_FS is not set

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

  reply	other threads:[~2025-03-21  6:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 12:11 [LTP] [PATCH v2 0/2] tst_test per FS options and small cleanup Cyril Hrubis
2024-06-12 12:11 ` [LTP] [PATCH v2 1/2] lib: tst_test: Add per filesystem mkfs and mount opts Cyril Hrubis
2024-06-17 17:37   ` Avinesh Kumar
2024-07-04 14:48     ` Cyril Hrubis
2025-03-20 17:31   ` Petr Vorel
2025-03-21  3:00     ` Li Wang via ltp
2025-03-21  6:41       ` Petr Vorel [this message]
2025-03-21  7:53         ` Li Wang via ltp
2024-06-12 12:11 ` [LTP] [PATCH v2 2/2] syscalls: quotactl: Move mkfs opts into tst_test 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=20250321064151.GA145712@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox