On Thu, Sep 11, 2014 at 01:41:29PM +0400, Alexey Kodanev wrote: > Hi, > > On 09/11/2014 10:24 AM, Hangbin Liu wrote: > >Some systems use biosdevname instead of ethX now. So add a global variable > >INTERFACE for networktest.sh which can make us use other NIC name in all > >scripts. > > > >v2: use INTERFACE to be same with networkstress.sh > > > >Signed-off-by: Hangbin Liu <liuhang...@gmail.com> > >--- > > testscripts/networktests.sh | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > >diff --git a/testscripts/networktests.sh b/testscripts/networktests.sh > >index b136749..210257e 100755 > >--- a/testscripts/networktests.sh > >+++ b/testscripts/networktests.sh > >@@ -4,6 +4,7 @@ > > # ---***** THESE MUST BE SET FOR CORRECT OPERATION *****--- > > export RHOST= > > export PASSWD= > >+export INTERFACE=${INTERFACE:-"eth0"} > > # ---***************************************************--- > > cd `dirname $0` > >@@ -51,6 +52,7 @@ usage() { > > echo " -R|r: rpc tests" > > echo " -S|s: sctp tests" > > echo " -T|t: TCP/IP command tests" > >+ echo " -I|i: Test interface (default: $INTERFACE)" > > echo " -V|v: Enable verbose" > > echo " -H|h: This Usage" > > echo "*) 'default' runs multicast, rpc, nfs and some of TCP/IP command" > >@@ -60,7 +62,7 @@ usage() { > > # Parse options > > CMD=0 > >-while getopts WwDd6LlMmNnRrSsTtVvHh OPTION > >+while getopts WwDd6LlMmNnRrSsTtI:i:VvHh OPTION > > do > > case $OPTION in > > W|w) CMD=$CMD_WHOLE;; > >@@ -72,6 +74,7 @@ do > > R|r) CMD=$(($CMD|$CMD_RPC));; > > S|s) CMD=$(($CMD|$CMD_SCTP));; > > T|t) CMD=$(($CMD|$CMD_TCPCMDS|$CMD_TCPCMDS_ADD));; > >+ I|i) INTERFACE=${OPTARG};; > > V|v) VERBOSE="yes";; > > H|h) usage; exit 0 ;; > > *) echo "Error: invalid option..."; usage; exit 1 ;; > > I'd like to apply network configuration patch > (http://sourceforge.net/p/ltp/mailman/message/32683953/) which is adding two > interface variables: RHOST_INTERFACE and LHOST_INTERFACE. It'll allow to set > all network configuration parameters in one file, network.sh. Do you > agree/disagree with that changes?
Ah, sorry I missed this patch. For RHOST_INTERFACE, I would prefer to use the original RHOST_HWADDRS, cause in my team, we will exchange IPv4/v6 address and MAC address before multi host testing, but we never exchange interface name. And that's also what networkstress.sh and other test cases did. For other info, I will reply your patch directly. Thanks for letting me know this. -- Thanks & Best Regards Hangbin Liu <liuhang...@gmail.com> ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list