From: Petr Vorel <pvorel@suse.cz>
To: Zorro Lang <zlang@kernel.org>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/3] ioctl_ficlone02.c: set all_filesystems to zero
Date: Mon, 9 Dec 2024 12:34:00 +0100 [thread overview]
Message-ID: <20241209113400.GA210779@pevik> (raw)
In-Reply-To: <20241209094911.ugpcoshtuj5l2n25@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>
> On Mon, Dec 09, 2024 at 07:14:16AM +0100, Petr Vorel wrote:
> > > On Mon, Dec 02, 2024 at 03:42:08PM +0100, Petr Vorel wrote:
> > > > > Hi!
> > > > > > The code to skip filesystems in the case of all filesystems is in the
> > > > > > run_tcase_per_fs() function:
> > > > > > 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);
> > > > > > The skip_filesystems array is passed to the tst_get_supporte_fs_types()
> > > > > > function which filters out them.
> > > > > Perhaps you mean that the skiplist does not work with .all_filesystems
> > > > > _and_ the LTP_SINGLE_FS_TYPE environment variable?
> > > > > I guess that we need:
> > > > > diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
> > > > > index bbbb8df19..49b1d7205 100644
> > > > > --- a/lib/tst_supported_fs_types.c
> > > > > +++ b/lib/tst_supported_fs_types.c
> > > > > @@ -159,6 +159,10 @@ const char **tst_get_supported_fs_types(const char *const *skiplist)
> > > > > if (only_fs) {
> > > > > tst_res(TINFO, "WARNING: testing only %s", only_fs);
> > > > > +
> > > > > + if (tst_fs_in_skiplist(only_fs, skiplist))
> > > > > + tst_brk(TCONF, "Requested filesystems is in test skiplist");
> > > > > +
> > > > It's a nice feature to be able to force testing on filesystem even it's set to
> > > > be skipped without need to manually enable the filesystem and recompile.
> > > > (It helps testing with LTP compiled as a package without need to compile LTP.)
> > > > Therefore I would avoid this.
> > > > @Zorro Lang or are you testing whole syscalls on particular filesystem via
> > > > LTP_SINGLE_FS_TYPE=xfs ?
> > > Oh, yes, I always use LTP with different LTP_SINGLE_FS_TYPE. So that's might be
> > > the problem?
> > Thanks for confirming your use case.
> > Well, "Testing only" in the help (-h) was added there to suggest it's for
> > testing/debugging LTP, not a production testing. But newer mind, I'll implement
> > Cyril's suggestion, real usage justify it. + I'll add LTP_FORCE_SINGLE_FS_TYPE.
> > We could allow more filesystems, e.g. instead of running LTP few times with
> > different LTP_SINGLE_FS_TYPE value: e.g.
> > for fs in ext4 xfs btrfs; do LTP_SINGLE_FS_TYPE=fs ioctl_ficlone02; done
> > we could introduce support for particular filesystems
> > LTP_FILESYSTEMS="ext4,xfs,btrfs" ioctl_ficlone02
> > (Probably define new variable because "SINGLE" is misleading when supporting
> > more filesystems. Also when we touch it, I would consider renaming variable
> > FILESYSTEMS is more obvious for newcomers than "FS_TYPE".)
> > WDYT?
> I generally mount a known filesystem on /mnt/ltpdir, and specify "-d /mnt/ltpdir"
> (to be TMPDIR). Then set (export)
> LTP_SINGLE_FS_TYPE
> LTP_DEV_FS_TYPE
> LTP_BIG_DEV_FS_TYPE
> to be the same fs with the one mounted on $TMPDIR. Then run ltp more likes:
> for cmdfile in fs fs_perms_simple syscalls fs_bind fsx mm commands fcntl-locktests fs_readonly ipc io containers cve smoketest syscalls-ipc dio ltp-aiodio.part1 ltp-aiodio.part2 ltp-aiodio.part3 ltp-aiodio.part4 ltp-aio-stress; do
> runltp -p -d /mnt/ltpdir -b /dev/loop0 -B xfs -z /dev/loop1 -Z xfs -f $cmdfile ...
> done
NOTE: I recommend you to test kirk [1], the runltp replacement. Output is in
JSON, which is much easier to parse. It also has more features. We should add
some documentation about kirk into LTP documentation.
Kind regards,
Petr
[1] https://github.com/linux-test-project/kirk
> I do this to test each filesystem in different test jobs. Each test job test one fs.
> I think that might make sure all system calls/IOs test on same filesystem, no matter
> on TMPDIR or someone device. Am I right? Or I missunderstand something?
> Thanks,
> Zorro
> > Kind regards,
> > Petr
> > > Thanks,
> > > Zorro
> > --
> > Mailing list info: https://lists.linux.it/listinfo/ltp
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-12-09 11:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 9:36 [LTP] [PATCH 0/3] LTP random fixes for xfs and btrfs Zorro Lang via ltp
2024-12-01 9:36 ` [LTP] [PATCH 1/3] ioctl_ficlone02.c: set all_filesystems to zero Zorro Lang via ltp
2024-12-02 13:36 ` Cyril Hrubis
2024-12-02 13:59 ` Cyril Hrubis
2024-12-02 14:42 ` Petr Vorel
2024-12-02 15:23 ` Cyril Hrubis
2024-12-03 4:53 ` Petr Vorel
2024-12-03 7:58 ` Cyril Hrubis
2024-12-03 9:24 ` Petr Vorel
2024-12-09 5:53 ` Zorro Lang via ltp
2024-12-09 6:14 ` Petr Vorel
2024-12-09 9:49 ` Zorro Lang via ltp
2024-12-09 10:42 ` Petr Vorel
2024-12-09 11:34 ` Petr Vorel [this message]
2024-12-11 12:08 ` Cyril Hrubis
2024-12-11 19:40 ` Petr Vorel
2024-12-01 9:36 ` [LTP] [PATCH 2/3] stat04+lstat03: fix bad blocksize mkfs option for xfs Zorro Lang via ltp
2024-12-02 13:56 ` Cyril Hrubis
2024-12-01 9:36 ` [LTP] [PATCH 3/3] stat04+lstat03: skip test on btrfs Zorro Lang via ltp
2024-12-02 13:55 ` Cyril Hrubis
2024-12-01 9:55 ` [LTP] [PATCH 0/3] LTP random fixes for xfs and btrfs Qu Wenruo via ltp
2024-12-03 16:22 ` David Sterba
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=20241209113400.GA210779@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=zlang@kernel.org \
/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