[LTP] [PATCH v3 4/5] tst_test.sh: Cleanup getopts usage
Cyril Hrubis
chrubis@suse.cz
Mon May 9 16:05:43 CEST 2022
Hi!
> >> +. netns_helper.sh
> >> +
> >> +PROG=$1
> >> +IP_VER=$2
> >> +COM_TYPE=$3
> >
> > Can't we just keep these at the top along with the rest of the
> > variables? I do not see them redefined anywhere but maybe I miss
> > something.
>
> tst_test.sh has to process command line arguments before these variables
> can be set. Otherwise you'd have to put all command line switches
> *AFTER* the positional arguments.
I did sleep on this and I guess that the cleanest solution for this is
to pass the positional arguments to the test setup function instead.
What do you think?
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list