Message ID | 20180503122222.2996-2-pvorel@suse.cz |
---|---|
State | Accepted |
Delegated to: | Petr Vorel |
Headers | show |
Series | net: Cleanup variables in TST_PARSE_ARGS functions for legacy API | expand |
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
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 }
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(-)