All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
@ 2021-12-13 19:34 Petr Vorel
  2021-12-14  7:46 ` Li Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2021-12-13 19:34 UTC (permalink / raw)
  To: ltp

LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE environment variable tests only that
filesystem instead of all supported filesystems.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 doc/user-guide.txt           | 2 ++
 lib/tst_supported_fs_types.c | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/doc/user-guide.txt b/doc/user-guide.txt
index 6a9fb33005..098916d23d 100644
--- a/doc/user-guide.txt
+++ b/doc/user-guide.txt
@@ -15,6 +15,8 @@ For running LTP network tests see `testcases/network/README.md`.
                           'n' or '0': never colorize.
 | 'LTP_DEV'             | Path to the block device to be used
                           (C: '.needs_device = 1', shell: 'TST_NEEDS_DEVICE=1').
+| 'LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE' | Testing only specified filesystem instead all
+                          supported (for tests with '.all_filesystems').
 | 'LTP_DEV_FS_TYPE'     | Filesystem used for testing (default: 'ext2').
 | 'LTP_TIMEOUT_MUL'     | Multiply timeout, must be number >= 1 (> 1 is useful for
                           slow machines to avoid unexpected timeout).
diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
index fc072cadfd..f61c3e503d 100644
--- a/lib/tst_supported_fs_types.c
+++ b/lib/tst_supported_fs_types.c
@@ -139,8 +139,17 @@ const char **tst_get_supported_fs_types(const char *const *skiplist)
 	unsigned int i, j = 0;
 	int skip_fuse;
 	enum tst_fs_impl sup;
+	const char *only_fs;
 
 	skip_fuse = tst_fs_in_skiplist("fuse", skiplist);
+	only_fs = getenv("LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE");
+
+	if (only_fs) {
+		tst_res(TINFO, "WARNING: testing only %s", only_fs);
+		if (tst_fs_is_supported(only_fs))
+			fs_types[0] = only_fs;
+		return fs_types;
+	}
 
 	for (i = 0; fs_type_whitelist[i]; i++) {
 		if (tst_fs_in_skiplist(fs_type_whitelist[i], skiplist)) {
-- 
2.34.1


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
  2021-12-13 19:34 [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems Petr Vorel
@ 2021-12-14  7:46 ` Li Wang
  2021-12-14  8:29   ` Petr Vorel
  0 siblings, 1 reply; 7+ messages in thread
From: Li Wang @ 2021-12-14  7:46 UTC (permalink / raw)
  To: Petr Vorel; +Cc: LTP List


[-- Attachment #1.1: Type: text/plain, Size: 2508 bytes --]

On Tue, Dec 14, 2021 at 3:34 AM Petr Vorel <pvorel@suse.cz> wrote:

> LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE environment variable tests only that
> filesystem instead of all supported filesystems.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  doc/user-guide.txt           | 2 ++
>  lib/tst_supported_fs_types.c | 9 +++++++++
>  2 files changed, 11 insertions(+)
>
> diff --git a/doc/user-guide.txt b/doc/user-guide.txt
> index 6a9fb33005..098916d23d 100644
> --- a/doc/user-guide.txt
> +++ b/doc/user-guide.txt
> @@ -15,6 +15,8 @@ For running LTP network tests see
> `testcases/network/README.md`.
>                            'n' or '0': never colorize.
>  | 'LTP_DEV'             | Path to the block device to be used
>                            (C: '.needs_device = 1', shell:
> 'TST_NEEDS_DEVICE=1').
> +| 'LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE' | Testing only specified filesystem
> instead all
> +                          supported (for tests with '.all_filesystems').
>


My only concern is that the variable name is too long and not easy
to remember/understand usage. Can we find a better name?
    LTP_ONE_FS_TYPE
    LTP_ASGD_FD_TYPE
    LTP_FS_TYPE_DEBUG
or some else.

P.s.
And btw I often use .skip_filesystems skip other FS for debugging :).



>  | 'LTP_DEV_FS_TYPE'     | Filesystem used for testing (default: 'ext2').
>  | 'LTP_TIMEOUT_MUL'     | Multiply timeout, must be number >= 1 (> 1 is
> useful for
>                            slow machines to avoid unexpected timeout).
> diff --git a/lib/tst_supported_fs_types.c b/lib/tst_supported_fs_types.c
> index fc072cadfd..f61c3e503d 100644
> --- a/lib/tst_supported_fs_types.c
> +++ b/lib/tst_supported_fs_types.c
> @@ -139,8 +139,17 @@ const char **tst_get_supported_fs_types(const char
> *const *skiplist)
>         unsigned int i, j = 0;
>         int skip_fuse;
>         enum tst_fs_impl sup;
> +       const char *only_fs;
>
>         skip_fuse = tst_fs_in_skiplist("fuse", skiplist);
> +       only_fs = getenv("LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE");
> +
> +       if (only_fs) {
> +               tst_res(TINFO, "WARNING: testing only %s", only_fs);
> +               if (tst_fs_is_supported(only_fs))
> +                       fs_types[0] = only_fs;
> +               return fs_types;
> +       }
>
>         for (i = 0; fs_type_whitelist[i]; i++) {
>                 if (tst_fs_in_skiplist(fs_type_whitelist[i], skiplist)) {
> --
> 2.34.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>

-- 
Regards,
Li Wang

[-- Attachment #1.2: Type: text/html, Size: 4232 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
  2021-12-14  7:46 ` Li Wang
@ 2021-12-14  8:29   ` Petr Vorel
  2021-12-14  9:04     ` Li Wang
  2021-12-14 10:35     ` Cyril Hrubis
  0 siblings, 2 replies; 7+ messages in thread
From: Petr Vorel @ 2021-12-14  8:29 UTC (permalink / raw)
  To: Li Wang; +Cc: LTP List

Hi Li,

> On Tue, Dec 14, 2021 at 3:34 AM Petr Vorel <pvorel@suse.cz> wrote:

> > LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE environment variable tests only that
> > filesystem instead of all supported filesystems.

...
> > +++ b/doc/user-guide.txt
...
> > 'TST_NEEDS_DEVICE=1').
> > +| 'LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE' | Testing only specified filesystem
> > instead all
> > +                          supported (for tests with '.all_filesystems').

> My only concern is that the variable name is too long and not easy
> to remember/understand usage. Can we find a better name?
>     LTP_ONE_FS_TYPE
>     LTP_ASGD_FD_TYPE
>     LTP_FS_TYPE_DEBUG
Yes, it's too long. LTP_FS_TYPE_DEBUG sounds best to me, but no strong opinion
about it.

If we agree we want this, we can consider to use some switch instead or print
this variable in help output (-h), with other variables from
https://github.com/linux-test-project/ltp/wiki/User-Guidelines.

> or some else.

> P.s.
> And btw I often use .skip_filesystems skip other FS for debugging :).
I do use it as well, but it's I wanted to have way to debug single filesystem
without having to recompile (easier on embedded or non-intel platforms run via
some frameworks).

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
  2021-12-14  8:29   ` Petr Vorel
@ 2021-12-14  9:04     ` Li Wang
  2021-12-14 10:35     ` Cyril Hrubis
  1 sibling, 0 replies; 7+ messages in thread
From: Li Wang @ 2021-12-14  9:04 UTC (permalink / raw)
  To: Petr Vorel; +Cc: LTP List


[-- Attachment #1.1: Type: text/plain, Size: 1525 bytes --]

On Tue, Dec 14, 2021 at 4:29 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li,
>
> > On Tue, Dec 14, 2021 at 3:34 AM Petr Vorel <pvorel@suse.cz> wrote:
>
> > > LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE environment variable tests only that
> > > filesystem instead of all supported filesystems.
>
> ...
> > > +++ b/doc/user-guide.txt
> ...
> > > 'TST_NEEDS_DEVICE=1').
> > > +| 'LTP_ALL_FILESYSTEMS_ONLY_FS_TYPE' | Testing only specified
> filesystem
> > > instead all
> > > +                          supported (for tests with
> '.all_filesystems').
>
> > My only concern is that the variable name is too long and not easy
> > to remember/understand usage. Can we find a better name?
> >     LTP_ONE_FS_TYPE
> >     LTP_ASGD_FD_TYPE
> >     LTP_FS_TYPE_DEBUG
> Yes, it's too long. LTP_FS_TYPE_DEBUG sounds best to me, but no strong
> opinion
> about it.
>
> If we agree we want this, we can consider to use some switch instead or
> print
> this variable in help output (-h), with other variables from
> https://github.com/linux-test-project/ltp/wiki/User-Guidelines.
>

Yes for sure, I agree to add this for debugging, since skip_filesystem is
not very convenient to some degree.



>
> > or some else.
>
> > P.s.
> > And btw I often use .skip_filesystems skip other FS for debugging :).
> I do use it as well, but it's I wanted to have way to debug single
> filesystem
> without having to recompile (easier on embedded or non-intel platforms run
> via
> some frameworks).
>

Indeed.

>
> Kind regards,
> Petr
>
>

-- 
Regards,
Li Wang

[-- Attachment #1.2: Type: text/html, Size: 2951 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
  2021-12-14  8:29   ` Petr Vorel
  2021-12-14  9:04     ` Li Wang
@ 2021-12-14 10:35     ` Cyril Hrubis
  2021-12-14 11:27       ` Petr Vorel
  1 sibling, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2021-12-14 10:35 UTC (permalink / raw)
  To: Petr Vorel; +Cc: LTP List

Hi!
> > My only concern is that the variable name is too long and not easy
> > to remember/understand usage. Can we find a better name?
> >     LTP_ONE_FS_TYPE
> >     LTP_ASGD_FD_TYPE
> >     LTP_FS_TYPE_DEBUG
> Yes, it's too long. LTP_FS_TYPE_DEBUG sounds best to me, but no strong opinion
> about it.

Not sure about the "DEBUG" in the name. I would go for a variation of
the first name "LTP_SINGLE_FS_TYPE" or "LTP_LIMIT_FS_TYPE"

> If we agree we want this, we can consider to use some switch instead or print
> this variable in help output (-h), with other variables from
> https://github.com/linux-test-project/ltp/wiki/User-Guidelines.

Printing the variables on -h does sounds reasonabe.

-- 
Cyril Hrubis
chrubis@suse.cz

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
  2021-12-14 10:35     ` Cyril Hrubis
@ 2021-12-14 11:27       ` Petr Vorel
  2021-12-14 12:14         ` Li Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2021-12-14 11:27 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: LTP List

Hi all,

> Hi!
> > > My only concern is that the variable name is too long and not easy
> > > to remember/understand usage. Can we find a better name?
> > >     LTP_ONE_FS_TYPE
> > >     LTP_ASGD_FD_TYPE
> > >     LTP_FS_TYPE_DEBUG
> > Yes, it's too long. LTP_FS_TYPE_DEBUG sounds best to me, but no strong opinion
> > about it.

> Not sure about the "DEBUG" in the name. I would go for a variation of
> the first name "LTP_SINGLE_FS_TYPE" or "LTP_LIMIT_FS_TYPE"
LTP_SINGLE_FS_TYPE looks better for me, because I'd understand LIMIT to run
fewer filesystems but possibly more than one.

> > If we agree we want this, we can consider to use some switch instead or print
> > this variable in help output (-h), with other variables from
> > https://github.com/linux-test-project/ltp/wiki/User-Guidelines.

> Printing the variables on -h does sounds reasonabe.
+1 (post v2).

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems
  2021-12-14 11:27       ` Petr Vorel
@ 2021-12-14 12:14         ` Li Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Li Wang @ 2021-12-14 12:14 UTC (permalink / raw)
  To: Petr Vorel; +Cc: LTP List


[-- Attachment #1.1: Type: text/plain, Size: 385 bytes --]

On Tue, Dec 14, 2021 at 7:27 PM Petr Vorel <pvorel@suse.cz> wrote:


>
> > Not sure about the "DEBUG" in the name. I would go for a variation of
> > the first name "LTP_SINGLE_FS_TYPE" or "LTP_LIMIT_FS_TYPE"
> LTP_SINGLE_FS_TYPE looks better for me, because I'd understand LIMIT to run
> fewer filesystems but possibly more than one.
>

+1 for LTP_SINGLE_FS_TYPE

-- 
Regards,
Li Wang

[-- Attachment #1.2: Type: text/html, Size: 1002 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-12-14 12:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 19:34 [LTP] [PATCH 1/1] lib: Add support for debugging .all_filesystems Petr Vorel
2021-12-14  7:46 ` Li Wang
2021-12-14  8:29   ` Petr Vorel
2021-12-14  9:04     ` Li Wang
2021-12-14 10:35     ` Cyril Hrubis
2021-12-14 11:27       ` Petr Vorel
2021-12-14 12:14         ` Li Wang

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.