[LTP] [PATCH 1/2] tst_test.sh: Print environment variables in help

Cyril Hrubis chrubis@suse.cz
Tue Feb 8 14:27:55 CET 2022


Hi!
> diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
> index 30614974c3..a7fd7b19c6 100644
> --- a/testcases/lib/tst_test.sh
> +++ b/testcases/lib/tst_test.sh
> @@ -448,12 +448,30 @@ tst_usage()
>  	if [ -n "$TST_USAGE" ]; then
>  		$TST_USAGE
>  	else
> -		echo "usage: $0"
> -		echo "OPTIONS"
> +		cat << EOF
> +usage: $0
> +
> +Options
> +-------
> +EOF

I think that the cat EOF syntax inside of else branch is a bit
confusing, especially sice it prints just three lines of text...


But other than that:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list