[LTP] [PATCH] commands/df01.sh: print more logs when test fails

Petr Vorel pvorel@suse.cz
Mon Aug 22 12:28:28 CEST 2022


> 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
> > >  }




More information about the ltp mailing list