ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
* [LTP] [PATCH] commands/df01.sh: print more logs when test fails
@ 2022-07-07 12:58 Jan Stancek
  2022-07-08  2:39 ` xuyang2018.jy
  2022-08-19 15:27 ` Petr Vorel
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Stancek @ 2022-07-07 12:58 UTC (permalink / raw)
  To: ltp

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/commands/df/df01.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
index f74032c962e5..6b20f21d0d74 100755
--- a/testcases/commands/df/df01.sh
+++ b/testcases/commands/df/df01.sh
@@ -103,6 +103,11 @@ df_check()
 
 	grep ${TST_DEVICE} output | grep -q "${total}.*${used}"
 	if [ $? -ne 0 ]; then
+		echo "total: ${total}, used: ${used}"
+		echo "df saved output:"
+		cat output
+		echo "df output:"
+		$@
 		return 1
 	fi
 }
-- 
2.27.0


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

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

* Re: [LTP] [PATCH] commands/df01.sh: print more logs when test fails
  2022-07-07 12:58 [LTP] [PATCH] commands/df01.sh: print more logs when test fails Jan Stancek
@ 2022-07-08  2:39 ` xuyang2018.jy
  2022-07-12  7:40   ` Jan Stancek
  2022-08-19 15:27 ` Petr Vorel
  1 sibling, 1 reply; 6+ messages in thread
From: xuyang2018.jy @ 2022-07-08  2:39 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi Jan

Looks good to me,
Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com>

Best Regards
Yang Xu
> Signed-off-by: Jan Stancek<jstancek@redhat.com>
> ---
>   testcases/commands/df/df01.sh | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
> index f74032c962e5..6b20f21d0d74 100755
> --- a/testcases/commands/df/df01.sh
> +++ b/testcases/commands/df/df01.sh
> @@ -103,6 +103,11 @@ df_check()
>
>   	grep ${TST_DEVICE} output | grep -q "${total}.*${used}"
>   	if [ $? -ne 0 ]; then
> +		echo "total: ${total}, used: ${used}"
> +		echo "df saved output:"
> +		cat output
> +		echo "df output:"
> +		$@
>   		return 1
>   	fi
>   }

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

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

* Re: [LTP] [PATCH] commands/df01.sh: print more logs when test fails
  2022-07-08  2:39 ` xuyang2018.jy
@ 2022-07-12  7:40   ` Jan Stancek
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Stancek @ 2022-07-12  7:40 UTC (permalink / raw)
  To: xuyang2018.jy; +Cc: ltp

On Fri, Jul 8, 2022 at 4:40 AM xuyang2018.jy@fujitsu.com
<xuyang2018.jy@fujitsu.com> wrote:
>
> Hi Jan
>
> Looks good to me,
> Reviewed-by: Yang Xu <xuyang2018.jy@fujitsu.com>

Pushed.


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

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

* Re: [LTP] [PATCH] commands/df01.sh: print more logs when test fails
  2022-07-07 12:58 [LTP] [PATCH] commands/df01.sh: print more logs when test fails Jan Stancek
  2022-07-08  2:39 ` xuyang2018.jy
@ 2022-08-19 15:27 ` Petr Vorel
  2022-08-20 20:40   ` Jan Stancek
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2022-08-19 15:27 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi Jan,

> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  testcases/commands/df/df01.sh | 5 +++++
>  1 file changed, 5 insertions(+)

> diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
> index f74032c962e5..6b20f21d0d74 100755
> --- a/testcases/commands/df/df01.sh
> +++ b/testcases/commands/df/df01.sh
> @@ -103,6 +103,11 @@ df_check()

>  	grep ${TST_DEVICE} output | grep -q "${total}.*${used}"
>  	if [ $? -ne 0 ]; then
> +		echo "total: ${total}, used: ${used}"
> +		echo "df saved output:"
I wonder why you didn't use tst_res TINFO? It'd be more readable as the output
can be quite long...
> +		cat output
> +		echo "df output:"
> +		$@

Kind regards,
Petr

>  		return 1
>  	fi
>  }

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

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

* Re: [LTP] [PATCH] commands/df01.sh: print more logs when test fails
  2022-08-19 15:27 ` Petr Vorel
@ 2022-08-20 20:40   ` Jan Stancek
  2022-08-22 10:28     ` Petr Vorel
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Stancek @ 2022-08-20 20:40 UTC (permalink / raw)
  To: Petr Vorel; +Cc: LTP List

On Fri, Aug 19, 2022 at 5:27 PM Petr Vorel <pvorel@suse.cz> wrote:
>
> Hi Jan,
>
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> >  testcases/commands/df/df01.sh | 5 +++++
> >  1 file changed, 5 insertions(+)
>
> > diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
> > index f74032c962e5..6b20f21d0d74 100755
> > --- a/testcases/commands/df/df01.sh
> > +++ b/testcases/commands/df/df01.sh
> > @@ -103,6 +103,11 @@ df_check()
>
> >       grep ${TST_DEVICE} output | grep -q "${total}.*${used}"
> >       if [ $? -ne 0 ]; then
> > +             echo "total: ${total}, used: ${used}"
> > +             echo "df saved output:"
> I wonder why you didn't use tst_res TINFO? It'd be more readable as the output
> can be quite long...

It didn't cross my mind at the time. It looks like the df failures are
coming to a resolution,
so I don't mind if you want to drop these 'echos' later.

> > +             cat output
> > +             echo "df output:"
> > +             $@
>
> Kind regards,
> Petr
>
> >               return 1
> >       fi
> >  }
>


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

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

* Re: [LTP] [PATCH] commands/df01.sh: print more logs when test fails
  2022-08-20 20:40   ` Jan Stancek
@ 2022-08-22 10:28     ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2022-08-22 10:28 UTC (permalink / raw)
  To: Jan Stancek; +Cc: LTP List

> On Fri, Aug 19, 2022 at 5:27 PM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi Jan,

> > > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > > ---
> > >  testcases/commands/df/df01.sh | 5 +++++
> > >  1 file changed, 5 insertions(+)

> > > diff --git a/testcases/commands/df/df01.sh b/testcases/commands/df/df01.sh
> > > index f74032c962e5..6b20f21d0d74 100755
> > > --- a/testcases/commands/df/df01.sh
> > > +++ b/testcases/commands/df/df01.sh
> > > @@ -103,6 +103,11 @@ df_check()

> > >       grep ${TST_DEVICE} output | grep -q "${total}.*${used}"
> > >       if [ $? -ne 0 ]; then
> > > +             echo "total: ${total}, used: ${used}"
> > > +             echo "df saved output:"
> > I wonder why you didn't use tst_res TINFO? It'd be more readable as the output
> > can be quite long...

> It didn't cross my mind at the time. It looks like the df failures are
> coming to a resolution,
> so I don't mind if you want to drop these 'echos' later.

Thanks! I wasn't sure if the reason was to print to stdout (tst_res prints to
stderr), looks like that was not the reason.

Kind regards,
Petr

> > > +             cat output
> > > +             echo "df output:"
> > > +             $@

> > Kind regards,
> > Petr

> > >               return 1
> > >       fi
> > >  }



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

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

end of thread, other threads:[~2022-08-22 10:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 12:58 [LTP] [PATCH] commands/df01.sh: print more logs when test fails Jan Stancek
2022-07-08  2:39 ` xuyang2018.jy
2022-07-12  7:40   ` Jan Stancek
2022-08-19 15:27 ` Petr Vorel
2022-08-20 20:40   ` Jan Stancek
2022-08-22 10:28     ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).