* [LTP] [PATCH] tst_test: Add TCONF when no required filesystems are available
@ 2025-03-21 7:52 Li Wang via ltp
2025-03-21 10:18 ` Petr Vorel
2025-03-21 10:23 ` Cyril Hrubis
0 siblings, 2 replies; 4+ messages in thread
From: Li Wang via ltp @ 2025-03-21 7:52 UTC (permalink / raw)
To: ltp
Currently, when no required filesystems (filesystem[i].type) are available,
the test silently does nothing, leading to a misleading test summary.
This patch adds a check to issue TCONF when no valid filesystems are found,
ensuring clearer test results.
# ./ioctl_ficlone03
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
Reported-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Li Wang <liwang@redhat.com>
---
lib/tst_test.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 3823ea109..9a23cd4a0 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1855,6 +1855,7 @@ static int run_tcases_per_fs(void)
{
int ret = 0;
unsigned int i;
+ bool found_valid_fs = false;
const char *const *filesystems = tst_get_supported_fs_types(tst_test->skip_filesystems);
if (!filesystems[0])
@@ -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;
}
--
2.48.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] tst_test: Add TCONF when no required filesystems are available
2025-03-21 7:52 [LTP] [PATCH] tst_test: Add TCONF when no required filesystems are available Li Wang via ltp
@ 2025-03-21 10:18 ` Petr Vorel
2025-03-21 12:05 ` Li Wang via ltp
2025-03-21 10:23 ` Cyril Hrubis
1 sibling, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2025-03-21 10:18 UTC (permalink / raw)
To: Li Wang; +Cc: ltp
Hi Li,
> Currently, when no required filesystems (filesystem[i].type) are available,
> the test silently does nothing, leading to a misleading test summary.
> This patch adds a check to issue TCONF when no valid filesystems are found,
> ensuring clearer test results.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
Thanks!
Kind regards,
Petr
> # ./ioctl_ficlone03
> 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
> Reported-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
> lib/tst_test.c | 5 +++++
> 1 file changed, 5 insertions(+)
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 3823ea109..9a23cd4a0 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -1855,6 +1855,7 @@ static int run_tcases_per_fs(void)
> {
> int ret = 0;
> unsigned int i;
> + bool found_valid_fs = false;
nit: I would chose slightly shorter variable name (e.g. tested), but that's not
important.
Thanks for sending a patch!
Kind regards,
Petr
> const char *const *filesystems = tst_get_supported_fs_types(tst_test->skip_filesystems);
> if (!filesystems[0])
> @@ -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;
> }
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] tst_test: Add TCONF when no required filesystems are available
2025-03-21 10:18 ` Petr Vorel
@ 2025-03-21 12:05 ` Li Wang via ltp
0 siblings, 0 replies; 4+ messages in thread
From: Li Wang via ltp @ 2025-03-21 12:05 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
On Fri, Mar 21, 2025 at 6:18 PM Petr Vorel <pvorel@suse.cz> wrote:
> Hi Li,
>
> > Currently, when no required filesystems (filesystem[i].type) are
> available,
> > the test silently does nothing, leading to a misleading test summary.
>
> > This patch adds a check to issue TCONF when no valid filesystems are
> found,
> > ensuring clearer test results.
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Tested-by: Petr Vorel <pvorel@suse.cz>
>
> Thanks!
>
> Kind regards,
> Petr
>
> > # ./ioctl_ficlone03
> > 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
>
> > Reported-by: Petr Vorel <pvorel@suse.cz>
> > Signed-off-by: Li Wang <liwang@redhat.com>
> > ---
> > lib/tst_test.c | 5 +++++
> > 1 file changed, 5 insertions(+)
>
> > diff --git a/lib/tst_test.c b/lib/tst_test.c
> > index 3823ea109..9a23cd4a0 100644
> > --- a/lib/tst_test.c
> > +++ b/lib/tst_test.c
> > @@ -1855,6 +1855,7 @@ static int run_tcases_per_fs(void)
> > {
> > int ret = 0;
> > unsigned int i;
> > + bool found_valid_fs = false;
> nit: I would chose slightly shorter variable name (e.g. tested), but
> that's not
> important.
>
'found_valid_fs' is more understandable, I merged it into the original
version.
Thanks for your testing and review.
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] tst_test: Add TCONF when no required filesystems are available
2025-03-21 7:52 [LTP] [PATCH] tst_test: Add TCONF when no required filesystems are available Li Wang via ltp
2025-03-21 10:18 ` Petr Vorel
@ 2025-03-21 10:23 ` Cyril Hrubis
1 sibling, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2025-03-21 10:23 UTC (permalink / raw)
To: Li Wang; +Cc: ltp
Hi!
Good catch.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-21 12:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 7:52 [LTP] [PATCH] tst_test: Add TCONF when no required filesystems are available Li Wang via ltp
2025-03-21 10:18 ` Petr Vorel
2025-03-21 12:05 ` Li Wang via ltp
2025-03-21 10:23 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox