Ah, find your patch here :) Just as you said, net_cmdlib.sh source cmdlib.sh, so how about do it like test.sh, add a global variable $CMD_LIB_LOADED in cmdlib.sh and add
[ -z "$CMD_LIB_LOADED" ] && . cmdlib.sh in test_net.sh ? For function read_opts(), I greped ltp and only found tests under tcp_cmds use it. So I think it's OK to change all net_cmdlib.sh directly. But as your wish, you can send it separately, not a big deal. Thanks Hangbin Liu On Wed, Oct 08, 2014 at 03:57:43PM +0400, Alexey Kodanev wrote: > copy read_opts() from net_cmdlib.sh library > > Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com> > --- > testcases/lib/test_net.sh | 18 ++++++++++++++++++ > 1 files changed, 18 insertions(+), 0 deletions(-) > > diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh > index 8cbcb70..2436264 100644 > --- a/testcases/lib/test_net.sh > +++ b/testcases/lib/test_net.sh > @@ -137,3 +137,21 @@ tst_iface() > link_num=$(( $link_num + 1 )) > echo "$(tst_get_ifaces $type)" | awk '{ print $'"$link_num"' }' > } > + > +# Blank for an IPV4 test; 6 for an IPV6 test. > +TST_EXEC_SUFFIX= > + > +tst_read_opts() > +{ > + OPTIND=0 > + while getopts "6" opt; do > + case "$opt" in > + 6) > + TST_EXEC_SUFFIX=6;; > + *) > + tst_brkm TBROK "tst_read_opts: unknown option: $opt" > + ;; > + esac > + done > + OPTIND=0 > +} > -- > 1.7.1 > > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk > _______________________________________________ > Ltp-list mailing list > Ltp-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ltp-list -- Thanks & Best Regards Hangbin Liu <liuhang...@gmail.com> ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list