diff mbox series

[1/1] tst_tmpdir: Print used temporary dir and its filesystem

Message ID 20240724071123.923397-1-pvorel@suse.cz
State Accepted
Headers show
Series [1/1] tst_tmpdir: Print used temporary dir and its filesystem | expand

Commit Message

Petr Vorel July 24, 2024, 7:11 a.m. UTC
It helps debugging to know used filesystem (and in case of
.all_filesystems the underlying filesystem).

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/tst_tmpdir.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Li Wang July 24, 2024, 7:31 a.m. UTC | #1
On Wed, Jul 24, 2024 at 3:12 PM Petr Vorel <pvorel@suse.cz> wrote:

> It helps debugging to know used filesystem (and in case of
> .all_filesystems the underlying filesystem).
>

Make sense!
Reviewed-by: Li Wang <liwang@redhat.com>


> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  lib/tst_tmpdir.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
> index 1fb1bd698e..dd817c9cc2 100644
> --- a/lib/tst_tmpdir.c
> +++ b/lib/tst_tmpdir.c
> @@ -312,6 +312,9 @@ void tst_tmpdir(void)
>
>                 tst_exit();
>         }
> +
> +       tst_resm(TINFO, "Using %s as tmpdir (%s filesystem)", TESTDIR,
> +                        tst_fs_type_name(tst_fs_type(NULL, TESTDIR)));
>  }
>
>  void tst_rmdir(void)
> --
> 2.45.2
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>
Petr Vorel July 26, 2024, 9:10 a.m. UTC | #2
Hi Li,
> On Wed, Jul 24, 2024 at 3:12 PM Petr Vorel <pvorel@suse.cz> wrote:

> > It helps debugging to know used filesystem (and in case of
> > .all_filesystems the underlying filesystem).


> Make sense!
> Reviewed-by: Li Wang <liwang@redhat.com>

Thanks, merged!

I might send another one to print tested kernel version.

Kind regards,
Petr
diff mbox series

Patch

diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c
index 1fb1bd698e..dd817c9cc2 100644
--- a/lib/tst_tmpdir.c
+++ b/lib/tst_tmpdir.c
@@ -312,6 +312,9 @@  void tst_tmpdir(void)
 
 		tst_exit();
 	}
+
+	tst_resm(TINFO, "Using %s as tmpdir (%s filesystem)", TESTDIR,
+			 tst_fs_type_name(tst_fs_type(NULL, TESTDIR)));
 }
 
 void tst_rmdir(void)