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

Petr Vorel pvorel@suse.cz
Fri Aug 19 17:27:00 CEST 2022


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


More information about the ltp mailing list