[LTP] [RFC PATCH 1/3] lib/tst_net.sh: Pass $OPTARG as $2 to TST_PARSE_ARGS function

Petr Vorel pvorel@suse.cz
Fri May 4 15:23:20 CEST 2018


Hi,

> So that tests using tst_net.sh with legacy API doesn't have to use
> OPTARG variable directly.
> This helps a transition to new API a bit.

> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/lib/tst_net.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
> index 112bd5cd4..3a0fe0192 100644
> --- a/testcases/lib/tst_net.sh
> +++ b/testcases/lib/tst_net.sh
> @@ -42,7 +42,7 @@ tst_net_read_opts()
>  {
>  	local OPTIND
>  	while getopts "$TST_OPTS" opt; do
> -		$TST_PARSE_ARGS "$opt"
> +		$TST_PARSE_ARGS "$opt" "$OPTARG"
>  	done
>  }

Thanks Alexey for review!
Applied whole patch-set with fixes s/$opt/$1/ you pointed out.


Kind regards,
Petr


More information about the ltp mailing list