if6-* combined with if4-* tests

Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com>
---
 testcases/network/stress/interface/if6-addr-adddel |  291 -------------------
 .../network/stress/interface/if6-addr-addlarge     |  298 --------------------
 testcases/network/stress/interface/if6-mtu-change  |  259 -----------------
 .../network/stress/interface/if6-route-adddel      |  289 -------------------
 .../network/stress/interface/if6-route-addlarge    |  287 -------------------
 testcases/network/stress/interface/if6-updown      |  251 ----------------
 6 files changed, 0 insertions(+), 1675 deletions(-)
 delete mode 100644 testcases/network/stress/interface/if6-addr-adddel
 delete mode 100644 testcases/network/stress/interface/if6-addr-addlarge
 delete mode 100644 testcases/network/stress/interface/if6-mtu-change
 delete mode 100644 testcases/network/stress/interface/if6-route-adddel
 delete mode 100644 testcases/network/stress/interface/if6-route-addlarge
 delete mode 100644 testcases/network/stress/interface/if6-updown

diff --git a/testcases/network/stress/interface/if6-addr-adddel 
b/testcases/network/stress/interface/if6-addr-adddel
deleted file mode 100644
index 09d9b7d..0000000
--- a/testcases/network/stress/interface/if6-addr-adddel
+++ /dev/null
@@ -1,291 +0,0 @@
-#!/bin/sh
-
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2005                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-##                                                                            
##
-################################################################################
-#
-# File:
-#   if6-addr-adddel
-#
-# Description:
-#  Verify the IPv6 connectivity isn't broken with adding and deleting an
-#  IPv6 address many times
-#    test01 - by ifconfig command
-#    test02 - by ip command
-#
-# Setup:
-#   See ltp-yyyymmdd/testcases/network/stress/README
-#
-# Author:
-#   Mitsuru Chinen <mi...@jp.ibm.com>
-#
-# History:
-#      Oct 19 2005 - Created (Mitsuru Chinen)
-#
-#-----------------------------------------------------------------------
-# Uncomment line below for debug output.
-#trace_logic=${trace_logic:-"set -x"}
-$trace_logic
-
-# Make sure the value of LTPROOT
-LTPROOT=${LTPROOT:-`(cd ../../../../ ; pwd)`}
-export LTPROOT
-
-# Total number of the test case
-TST_TOTAL=2
-export TST_TOTAL
-
-# Default of the test case ID and the test case count
-TCID=if6-addr-adddel
-TST_COUNT=0
-export TCID
-export TST_COUNT
-
-# Check the environmanet variable
-. check_envval || exit $TST_TOTAL
-
-# The number of the add/delete IPv6 address
-NS_TIMES=${NS_TIMES:-10000}
-
-# The interval of the check interface activity
-CHECK_INTERVAL=${CHECK_INTERVAL:-`expr $NS_TIMES \/ 100`}
-
-# The number of the test link where tests run
-LINK_NUM=0
-
-# Network portion of the IPv6 address
-IPV6_NETWORK="fd00:1:1:1"
-
-# Netmask of the tested network
-IPV6_NETMASK_NUM=64
-
-# Host portion of the IPv6 address of the remote host
-RHOST_IPV6_HOST=":1"
-
-# Host portion of a IPv6 address of the local host for TCP traffic
-LHOST_IPV6_HOST_FIXED=":99"
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_setup
-#
-# DESCRIPTION:
-#   Preparation
-#
-# SET VALUES:
-#   rhost_ipv6addr     - IPv6 Address of the remote host
-#   lhost_ifname       - Interface name of the local host
-#   rhost_ifname       - Interface name of the remote host
-#
-#-----------------------------------------------------------------------
-do_setup()
-{
-    TCID=if6-addr-adddel
-    TST_COUNT=0
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Set IPv6 address to the interfaces
-    add_ipv6addr rhost ${LINK_NUM} ${IPV6_NETWORK} ${RHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to add an IPv6 address at the remote host"
-    fi
-
-    # IPv6 address of the remote host
-    rhost_ipv6addr="${IPV6_NETWORK}:${RHOST_IPV6_HOST}"
-
-    # Get the Interface name of local host
-    lhost_ifname=`get_ifname lhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the local host"
-       exit $TST_TOTAL
-    fi
-
-    # Get the Interface name of remote host
-    rhost_ifname=`get_ifname rhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the remote host"
-       exit $TST_TOTAL
-    fi
-}
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_cleanup
-#
-# DESCRIPTION:
-#   Recover the tested interfaces
-#
-#-----------------------------------------------------------------------
-do_cleanup()
-{
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-}
-
-
-#-----------------------------------------------------------------------
-#
-# FUNCTION:
-#   test_body
-#
-# DESCRIPTION:
-#   main code of the test
-#
-# Arguments:
-#   $1: define the test type
-#       1 - ifconfig command case
-#       2 - ip command case
-#
-#-----------------------------------------------------------------------
-test_body()
-{
-    test_type=$1
-
-    TCID=if6-addr-adddel0$test_type
-    TST_COUNT=$test_type
-
-    case $test_type in
-       1)
-       test_command="ifconfig"
-       ;;
-       2)
-       test_command="ip"
-       ;;
-       *)
-       tst_resm TBROK "unspecified case"
-       return 1
-       ;;
-    esac
-
-    tst_resm TINFO "Verify the IPv6 connectivty is not broken when the 
$test_command command adds, then deletes an IPv6 address $NS_TIMES times"
-
-    # Make sure the interface is initialized
-    initialize_if lhost ${LINK_NUM}
-
-    # IPv6 address of the localhost
-    lhost_ipv6addr=${IPV6_NETWORK}::${test_type}${test_type}
-
-    # Add an IPv6 address for TCP traffic
-    add_ipv6addr lhost ${LINK_NUM} ${IPV6_NETWORK} ${LHOST_IPV6_HOST_FIXED}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to assign an IPv6 address at the local host"
-       return 1
-    fi
-    lhost_fixed_ipv6addr="${IPV6_NETWORK}:${LHOST_IPV6_HOST_FIXED}"
-
-    # Check the connctivity
-    ret=`$LTP_RSH $RHOST ${LTPROOT}/testcases/bin/check_icmpv6_connectivity 
$rhost_ifname $lhost_fixed_ipv6addr' ; echo $?'`
-    if [ $ret -ne 0 ]; then
-       tst_resm TBROK "Test Link $LINK_NUM is somthing wrong."
-       return 1
-    fi
-
-    # Make a background TCP traffic from the non-alias address
-    server_pid=`bg_tcp_traffic make ${lhost_fixed_ipv6addr}`
-
-    # Start the loop
-    cnt=0
-    while [ $cnt -lt $NS_TIMES ]; do
-       # Add
-       case $test_type in
-           1)
-           ifconfig $lhost_ifname add ${lhost_ipv6addr}/${IPV6_NETMASK_NUM}
-           ;;
-           2)
-           ip addr add ${lhost_ipv6addr}/${IPV6_NETMASK_NUM} dev $lhost_ifname
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TFAIL "Failed to add an IPv6 address at $cnt times"
-           return 1
-       fi
-
-       # Check the connectivity
-       cnt=`expr $cnt + 1`
-       if [ $CHECK_INTERVAL -ne 0 ]; then
-           if [ `expr $cnt % ${CHECK_INTERVAL}` -eq 0 ]; then
-               check_icmpv6_connectivity $lhost_ifname $rhost_ipv6addr
-               if [ $? -ne 0 ]; then
-                   tst_resm TFAIL "$lhost_ifname is broken."
-                   return 1
-               fi
-           fi
-       fi
-
-       # Check the background TCP traffic
-       bg_tcp_traffic check $server_pid
-       if [ $? -ne 0 ]; then
-           server_pid=`bg_tcp_traffic make ${lhost_fixed_ipv6addr}`
-       fi
-
-       # Delete
-       case $test_type in
-           1)
-           ifconfig $lhost_ifname del ${lhost_ipv6addr}/${IPV6_NETMASK_NUM}
-           ;;
-           2)
-           ip addr del ${lhost_ipv6addr}/${IPV6_NETMASK_NUM} dev $lhost_ifname
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TFAIL "Failed to del an IPv6 addrss at $cnt times"
-           return 1
-       fi
-    done
-
-    # Stop the background TCP traffic
-    bg_tcp_traffic killall
-
-    tst_resm TPASS "Test is finished correctly."
-    return 0
-}
-
-
-#-----------------------------------------------------------------------
-#
-# Main
-#
-# Exit Value:
-#   The number of the failure
-#
-#-----------------------------------------------------------------------
-
-RC=0
-do_setup
-test_body 1 || RC=`expr $RC + 1`       # Case of ifconfig command
-test_body 2 || RC=`expr $RC + 1`       # Case of ip command
-do_cleanup
-
-exit $RC
diff --git a/testcases/network/stress/interface/if6-addr-addlarge 
b/testcases/network/stress/interface/if6-addr-addlarge
deleted file mode 100644
index 7d95857..0000000
--- a/testcases/network/stress/interface/if6-addr-addlarge
+++ /dev/null
@@ -1,298 +0,0 @@
-#!/bin/sh
-
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2005                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-##                                                                            
##
-################################################################################
-#
-# File:
-#   if6-addr-addlarge
-#
-# Description:
-#   Verify the IPv6 connectivity is not broken with adding a large number
-#   of IPv6 address
-#    test01 - by ifconfig command
-#    test02 - by ip command
-#
-# Setup:
-#   See ltp-yyyymmdd/testcases/network/stress/README
-#
-# Author:
-#   Mitsuru Chinen <mi...@jp.ibm.com>
-#
-# History:
-#      Oct 19 2005 - Created (Mitsuru Chinen)
-#
-#-----------------------------------------------------------------------
-# Uncomment line below for debug output.
-#trace_logic=${trace_logic:-"set -x"}
-$trace_logic
-
-# Make sure the value of LTPROOT
-LTPROOT=${LTPROOT:-`(cd ../../../../ ; pwd)`}
-export LTPROOT
-
-# Total number of the test case
-TST_TOTAL=2
-export TST_TOTAL
-
-# Default of the test case ID and the test case count
-TCID=if6-addr-addlarge
-TST_COUNT=0
-export TCID
-export TST_COUNT
-
-# Check the environmanet variable
-. check_envval || exit $TST_TOTAL
-
-# The number of the add IPv6 addr
-IP_TOTAL=${IP_TOTAL:-10000}
-
-# The interval of the check interface activity
-CHECK_INTERVAL=${CHECK_INTERVAL:-`expr $IP_TOTAL \/ 100`}
-
-# The number of the test link where tests run
-LINK_NUM=0
-
-# Network portion of the IPv6 address
-IPV6_NETWORK="fd00:1:1:1"
-
-# Netmask of the tested network
-IPV6_NETMASK_NUM=64
-
-# Host portion of the IPv6 address
-LHOST_IPV6_HOST=":2"
-RHOST_IPV6_HOST=":1"
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_setup
-#
-# DESCRIPTION:
-#   Preparation
-#
-# SET VALUES:
-#   lhost_ifname       - Interface name of the local host
-#   rhost_ifname       - Interface name of the remote host
-#   rhost_ipv6addr     - IP address of the remote host
-#
-#-----------------------------------------------------------------------
-do_setup()
-{
-    TCID=if6-addr-addlarge
-    TST_COUNT=0
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Set IPv6 address to the interfaces
-    add_ipv6addr rhost ${LINK_NUM} ${IPV6_NETWORK} ${RHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to add an IPv6 address at the remote host"
-       exit $TST_TOTAL
-    fi
-
-    # Get the Interface name of the local host
-    lhost_ifname=`get_ifname lhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the local host"
-       exit $TST_TOTAL
-    fi
-
-    # Get the Interface name of the remote host
-    rhost_ifname=`get_ifname rhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the remote host"
-       exit $TST_TOTAL
-    fi
-
-    # IPv6 address of the remote host
-    rhost_ipv6addr="${IPV6_NETWORK}:${RHOST_IPV6_HOST}"
-}
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_cleanup
-#
-# DESCRIPTION:
-#   Recover the tested interfaces
-#
-#-----------------------------------------------------------------------
-do_cleanup()
-{
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-}
-
-
-#-----------------------------------------------------------------------
-#
-# FUNCTION:
-#   test_body
-#
-# DESCRIPTION:
-#   main code of the test
-#
-# Arguments:
-#   $1: define the test type
-#       1 - ifconfig command case
-#       2 - ip command case
-#
-#-----------------------------------------------------------------------
-test_body()
-{
-    test_type=$1
-
-    TCID=if6-addr-addlarge0$test_type
-    TST_COUNT=$test_type
-
-    case $test_type in
-       1)
-       test_command="ifconfig"
-       ;;
-       2)
-       test_command="ip"
-       ;;
-       *)
-       tst_resm TBROK "unspecified case"
-       return 1
-       ;;
-    esac
-
-    tst_resm TINFO "Verify the IPv6 connectivity is not broken when the 
$test_command command adds $IP_TOTAL IPv6 addresses"
-
-    # Make sure the interface is initialized
-    initialize_if lhost ${LINK_NUM}
-
-    # Set the fixed address
-    add_ipv6addr lhost ${LINK_NUM} ${IPV6_NETWORK} ${LHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to add IPv6 address to the interface at the 
local host"
-       return 1
-    fi
-    lhost_ipv6addr="${IPV6_NETWORK}:${LHOST_IPV6_HOST}"
-
-    # Check the connctivity
-    ret=`$LTP_RSH $RHOST ${LTPROOT}/testcases/bin/check_icmpv6_connectivity 
$rhost_ifname $lhost_ipv6addr' ; echo $?'`
-    if [ $ret -ne 0 ]; then
-       tst_resm TBROK "Test Link $LINK_NUM is somthing wrong."
-       return 1
-    fi
-
-    # Make a background TCP traffic from the fixed address
-    server_pid=`bg_tcp_traffic make $lhost_ipv6addr`
-
-    # Start the loop
-    cnt=0
-    x=0 ; y=0 ; xymax=255
-    while [ $cnt -lt $IP_TOTAL ]; do
-       # Create
-       hex_x=`printf '%02x' $x`
-       hex_y=`printf '%02x' $y`
-       case $test_type in
-           1)
-           add_ipv6addr="${IPV6_NETWORK}:1:${hex_x}:${hex_y}:1"
-           ifconfig ${lhost_ifname} add ${add_ipv6addr}/${IPV6_NETMASK_NUM}
-           ;;
-           2)
-           add_ipv6addr="${IPV6_NETWORK}:2:${hex_x}:${hex_y}:1"
-           ip addr add ${add_ipv6addr}/${IPV6_NETMASK_NUM} dev ${lhost_ifname}
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TINFO "Failed to add an address. It seems to reach the max 
number."
-           break
-       fi
-
-       # Check the connectivity
-       cnt=`expr $cnt + 1`
-       if [ $CHECK_INTERVAL -ne 0 ]; then
-           if [ `expr $cnt % ${CHECK_INTERVAL}` -eq 0 ]; then
-               # Do ping from the remote host to the new local host address
-               ret=`$LTP_RSH $RHOST 
${LTPROOT}/testcases/bin/check_icmpv6_connectivity $rhost_ifname  
${add_ipv6addr}' ; echo $?'`
-               if [ $ret -ne 0 ]; then
-                   tst_resm TFAIL "The interface ${lhost_ifname} is broken at 
$cnt time."
-                   return 1
-               fi
-           fi
-       fi
-
-       # Check the background TCP traffic
-       bg_tcp_traffic check $server_pid
-       if [ $? -ne 0 ]; then
-           server_pid=`bg_tcp_traffic make $lhost_ipv6addr`
-       fi
-
-       # Define next IP address to add
-       y=`expr $y + 1`
-       if [ $y -gt $xymax ]; then
-           y=0
-           x=`expr $x + 1`
-           if [ $x -gt $xymax ]; then
-               tst_resm INFO "Too large times. Finished $cnt times."
-               break
-           fi
-       fi
-    done
-
-    # Check the connecitivy again
-    check_icmpv6_connectivity $lhost_ifname $rhost_ipv6addr
-    if [ $? -ne 0 ]; then
-       tst_resm TFAIL "The interface ${lhost_ifname} is broken."
-       return 1
-    fi
-
-    # Stop the background TCP traffic
-    bg_tcp_traffic killall
-
-    tst_resm TPASS "Test is finished correctly."
-    return 0
-}
-
-
-#-----------------------------------------------------------------------
-#
-# Main
-#
-# Exit Value:
-#   The number of the failure
-#
-#-----------------------------------------------------------------------
-
-RC=0
-do_setup
-test_body 1 || RC=`expr $RC + 1`      # Case of ifconfig command
-test_body 2 || RC=`expr $RC + 1`      # Case of ip command
-do_cleanup
-
-exit $RC
diff --git a/testcases/network/stress/interface/if6-mtu-change 
b/testcases/network/stress/interface/if6-mtu-change
deleted file mode 100644
index 79a20d2..0000000
--- a/testcases/network/stress/interface/if6-mtu-change
+++ /dev/null
@@ -1,259 +0,0 @@
-#!/bin/sh
-
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2005                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-##                                                                            
##
-################################################################################
-#
-# File:
-#   if6-mtu-change
-#
-# Description:
-#   Verify the IPv6 connectivity isn't broken with changing MTU many times
-#    test01 - by ifconfig command
-#    test02 - by ip command
-#
-# Setup:
-#   See ltp-yyyymmdd/testcases/network/stress/README
-#
-# Author:
-#   Mitsuru Chinen <mi...@jp.ibm.com>
-#
-# History:
-#      Oct 19 2005 - Created (Mitsuru Chinen)
-#
-#-----------------------------------------------------------------------
-# Uncomment line below for debug output.
-#trace_logic=${trace_logic:-"set -x"}
-$trace_logic
-
-# Make sure the value of LTPROOT
-LTPROOT=${LTPROOT:-`(cd ../../../../ ; pwd)`}
-export LTPROOT
-
-# Total number of the test case
-TST_TOTAL=2
-export TST_TOTAL
-
-# Default of the test case ID and the test case count
-TCID=if6-mtu-change
-TST_COUNT=0
-export TCID
-export TST_COUNT
-
-# Check the environmanet variable for the test
-. check_envval || exit $TST_TOTAL
-
-# The number of the change of the MTU
-MTU_CHANGE_TIMES=${MTU_CHANGE_TIMES:-1000}
-
-# The interval of the change [second]
-CHANGE_INTERVAL=${CHANGE_INTERVAL:-5}
-
-# The array of the value which MTU is changed into sequentially
-CHANGE_VALUES="1280 1445 1335 1390 1500 1280 1500 1280 1335 1500"
-
-# The number of the test link where tests run
-LINK_NUM=0
-
-# Network portion of the IPv6 address
-IPV6_NETWORK="fd00:1:1:1"
-
-# Host portion of the IPv6 address of the remote host
-LHOST_IPV6_HOST=":2" # local
-RHOST_IPV6_HOST=":1" # remote
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_setup
-#
-# DESCRIPTION:
-#   Make a IPv6 connectivity
-#
-# SET VALUES:
-#   lhost_ipv6addr     - IPv6 Address of the local host
-#   rhost_ipv6addr     - IPv6 Address of the remote host
-#   lhost_ifname       - Interface name of the localhost
-#
-#-----------------------------------------------------------------------
-do_setup()
-{
-    TCID=if6-mtu-change
-    TST_COUNT=0
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Set IPv6 address to the interfaces
-    add_ipv6addr lhost ${LINK_NUM} ${IPV6_NETWORK} ${LHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to add an IPv6 address at the local host"
-       exit $TST_TOTAL
-    fi
-    add_ipv6addr rhost ${LINK_NUM} ${IPV6_NETWORK} ${RHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to add an IPv6 address at the remote host"
-       exit $TST_TOTAL
-    fi
-
-    # IPv6 address of the local and remote host
-    lhost_ipv6addr="${IPV6_NETWORK}:${LHOST_IPV6_HOST}"
-    rhost_ipv6addr="${IPV6_NETWORK}:${RHOST_IPV6_HOST}"
-
-    # Get the Interface name of local host
-    lhost_ifname=`get_ifname lhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the local host"
-       exit $TST_TOTAL
-    fi
-}
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_cleanup
-#
-# DESCRIPTION:
-#   Recover the tested interfaces
-#
-#-----------------------------------------------------------------------
-do_cleanup()
-{
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-}
-
-
-#-----------------------------------------------------------------------
-#
-# FUNCTION:
-#   test_body
-#
-# DESCRIPTION:
-#   main code of the test
-#
-# Arguments:
-#   $1: define the test type
-#       1 - ifconfig command case
-#       2 - ip command case
-#
-#-----------------------------------------------------------------------
-test_body()
-{
-    test_type=$1
-
-    TCID=if6-mtu-change0${test_type}
-    TST_COUNT=${test_type}
-
-    case $test_type in
-       1)
-       test_command="ifconfig"
-       ;;
-       2)
-       test_command="ip"
-       ;;
-       *)
-       tst_resm TBROK "unspecified case"
-       return 1
-       ;;
-    esac
-
-    tst_resm TINFO "Verify the IPv6 connectivity is not broken when the 
$test_command command changes MTU $MTU_CHANGE_TIMES times every 
$CHANGE_INTERVAL seconds"
-
-    # Check the connctivity
-    check_icmpv6_connectivity $lhost_ifname $rhost_ipv6addr
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Test Link $LINK_NUM is somthing wrong."
-       return 1
-    fi
-
-    # Make a background TCP traffic
-    server_pid=`bg_tcp_traffic make $lhost_ipv6addr`
-
-    # Start the loop
-    mtu_array_len=`echo $CHANGE_VALUES | wc -w`
-    cnt=0
-    while [ $cnt -lt $MTU_CHANGE_TIMES ]; do
-       # Wait CHANGE_INTERVAL second
-       sleep $CHANGE_INTERVAL
-
-       # Change
-       nth=`expr $cnt % $mtu_array_len`
-       field=`expr $nth + 1`
-       mtu=`echo $CHANGE_VALUES | cut -d ' ' -f $field`
-
-       case $test_type in
-           1)
-           ifconfig $lhost_ifname mtu $mtu
-           ;;
-           2)
-           ip link set $lhost_ifname mtu $mtu
-           ;;
-       esac
-
-       # Check the background TCP traffic
-       bg_tcp_traffic check $server_pid
-       if [ $? -ne 0 ]; then
-           server_pid=`bg_tcp_traffic make $lhost_ipv6addr`
-       fi
-
-       cnt=`expr $cnt + 1`
-    done
-
-    # Stop the background TCP traffic
-    bg_tcp_traffic killall
-
-    # Verify the connectivity again
-    check_icmpv6_connectivity $lhost_ifname $rhost_ipv6addr
-    if [ $? -ne 0 ]; then
-       tst_resm TFAIL "$lhost_ifname is broken."
-       return 1
-    fi
-    tst_resm TPASS "Test is finished correctly."
-    return 0
-}
-
-
-#-----------------------------------------------------------------------
-#
-# Main
-#
-# Exit Value:
-#   The number of the failure
-#
-#-----------------------------------------------------------------------
-
-RC=0
-do_setup
-test_body 1 || RC=`expr $RC + 1`      # Case of ifconfig command
-test_body 2 || RC=`expr $RC + 1`      # Case of ip command
-do_cleanup
-
-exit $RC
diff --git a/testcases/network/stress/interface/if6-route-adddel 
b/testcases/network/stress/interface/if6-route-adddel
deleted file mode 100644
index 9e7a9c3..0000000
--- a/testcases/network/stress/interface/if6-route-adddel
+++ /dev/null
@@ -1,289 +0,0 @@
-#!/bin/sh
-
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2005                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-##                                                                            
##
-################################################################################
-#
-# File:
-#   if6-route-adddel
-#
-# Description:
-#   Verify the IPv6 connectivity is not broken with adding and deleting
-#   an IPv6 route many times
-#    test01 - by route command
-#    test02 - by ip command
-#
-# Setup:
-#   See ltp-yyyymmdd/testcases/network/stress/README
-#
-# Author:
-#   Mitsuru Chinen <mi...@jp.ibm.com>
-#
-# History:
-#      Oct 19 2005 - Created (Mitsuru Chinen)
-#
-#-----------------------------------------------------------------------
-# Uncomment line below for debug output.
-#trace_logic=${trace_logic:-"set -x"}
-$trace_logic
-
-# Make sure the value of LTPROOT
-LTPROOT=${LTPROOT:-`(cd ../../../../ ; pwd)`}
-export LTPROOT
-
-# Total number of the test case
-TST_TOTAL=2
-export TST_TOTAL
-
-# Default of the test case ID and the test case count
-TCID=if6-route-adddel
-TST_COUNT=0
-export TCID
-export TST_COUNT
-
-# Check the environmanet variable
-. check_envval || exit $TST_TOTAL
-
-# The number of the add/delete an IPv6 route
-NS_TIMES=${NS_TIMES:-10000}
-
-# The interval of the check interface activity
-CHECK_INTERVAL=${CHECK_INTERVAL:-`expr $NS_TIMES \/ 100`}
-
-# The number of the test link where tests run
-LINK_NUM=0
-
-# Network portion of the IPv6 address
-IPV6_NETWORK="fd00:1:1:1"
-
-# Netmask of for the tested network
-IPV6_NETMASK_NUM=64
-
-# Host portion of the IPv6 address
-LHOST_IPV6_HOST=":2"
-RHOST_IPV6_HOST=":1"
-
-# The destination network to add and delete
-ADDDEL_ROUTE="fd00:100:1:1::/64"
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_setup
-#
-# DESCRIPTION:
-#   Make a IPv6 connectivity
-#
-# SET VALUES:
-#   rhost_ipv6addr     - IPv6 Address of the remote host
-#   lhost_ifname       - Interface name of the localhost
-#   rhost_ifname        - Interface name of the local host
-#
-#-----------------------------------------------------------------------
-do_setup()
-{
-    TCID=if6-route-adddel
-    TST_COUNT=0
-
-    # Initialize the interfaces of the remote host
-    initialize_if rhost ${LINK_NUM}
-
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Set IPv6 address to the interfaces
-    add_ipv6addr rhost ${LINK_NUM} ${IPV6_NETWORK} ${RHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to add an IPv6 address at the remote host"
-       exit $TST_TOTAL
-    fi
-
-    # IPv6 address of the remote host
-    rhost_ipv6addr="${IPV6_NETWORK}:${RHOST_IPV6_HOST}"
-
-    # Get the Interface name of local host
-    lhost_ifname=`get_ifname lhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the local host"
-       exit $TST_TOTAL
-    fi
-
-    # Get the Interface name of the remote host
-    rhost_ifname=`get_ifname rhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the remote host"
-       exit $TST_TOTAL
-    fi
-}
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_cleanup
-#
-# DESCRIPTION:
-#   Recover the tested interfaces
-#
-#-----------------------------------------------------------------------
-do_cleanup()
-{
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-}
-
-
-#-----------------------------------------------------------------------
-#
-# FUNCTION:
-#   test_body
-#
-# DESCRIPTION:
-#   main code of the test
-#
-# Arguments:
-#   $1: define the test type
-#       1 - route command case
-#       2 - ip command case
-#
-#-----------------------------------------------------------------------
-test_body()
-{
-    test_type=$1
-
-    TCID=if6-route-adddel0$test_type
-    TST_COUNT=$test_type
-
-    case $test_type in
-       1)
-       test_command="route"
-       ;;
-       2)
-       test_command="ip"
-       ;;
-       *)
-       tst_resm TBROK "unspecified case"
-       return 1
-       ;;
-    esac
-
-    tst_resm TINFO "Verify the IPv6 connectivity is not broken when the 
$test_command command adds, then deletes an IPv6 route $NS_TIMES times"
-
-    # Initialize the interface of the local host
-    initialize_if lhost ${LINK_NUM}
-
-    # Assign IPv6 address to the interface of the local host
-    add_ipv6addr lhost ${LINK_NUM} ${IPV6_NETWORK} ${LHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to assign an IPv6 address at the local host"
-       return 1
-    fi
-    lhost_ipv6addr="${IPV6_NETWORK}:${LHOST_IPV6_HOST}"
-
-    # Check the connctivity
-    ret=`$LTP_RSH $RHOST ${LTPROOT}/testcases/bin/check_icmpv6_connectivity 
$rhost_ifname $lhost_ipv6addr' ; echo $?'`
-    if [ $ret -ne 0 ]; then
-       tst_resm TBROK "Test Link $LINK_NUM is somthing wrong."
-       return 1
-    fi
-
-    # Make a background TCP traffic from the non-alias address
-    server_pid=`bg_tcp_traffic make ${lhost_ipv6addr}`
-
-    # Start the loop
-    cnt=0
-    while [ $cnt -lt $NS_TIMES ]; do
-       # Add the route
-       case $test_type in
-           1)
-           route -A inet6 add $ADDDEL_ROUTE dev $lhost_ifname
-           ;;
-           2)
-           ip route add $ADDDEL_ROUTE dev $lhost_ifname
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TFAIL "Cannot add a route to $ADDDEL_ROUTE".
-           return 1
-       fi
-
-       # Delete the route
-       case $test_type in
-           1)
-           route -A inet6 del $ADDDEL_ROUTE dev $lhost_ifname
-           ;;
-           2)
-           ip route del $ADDDEL_ROUTE dev $lhost_ifname
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TFAIL "Cannot delte a route to $ADDDEL_ROUTE".
-           return 1
-       fi
-
-       # Check the connectivity
-       cnt=`expr $cnt + 1`
-       if [ $CHECK_INTERVAL -ne 0 ]; then
-           if [ `expr $cnt % ${CHECK_INTERVAL}` -eq 0 ]; then
-               check_icmpv6_connectivity $lhost_ifname $rhost_ipv6addr
-               if [ $? -ne 0 ]; then
-                   tst_resm TFAIL "The route is broken at ${cnt} time"
-                   return 1
-               fi
-           fi
-       fi
-
-       # Check the background TCP traffic
-       bg_tcp_traffic check $server_pid
-       if [ $? -ne 0 ]; then
-           server_pid=`bg_tcp_traffic make ${lhost_ipv6addr}`
-       fi
-    done
-
-    # Stop the background TCP traffic
-    bg_tcp_traffic killall
-
-    tst_resm TPASS "Test is finished correctly."
-    return 0
-}
-
-
-#-----------------------------------------------------------------------
-#
-# Main
-#
-# Exit Value:
-#   The number of the failure
-#
-#-----------------------------------------------------------------------
-
-RC=0
-do_setup
-test_body 1 || RC=`expr $RC + 1`       # Case of route command
-test_body 2 || RC=`expr $RC + 1`       # Case of ip command
-do_cleanup
-
-exit $RC
diff --git a/testcases/network/stress/interface/if6-route-addlarge 
b/testcases/network/stress/interface/if6-route-addlarge
deleted file mode 100644
index 4e394f9..0000000
--- a/testcases/network/stress/interface/if6-route-addlarge
+++ /dev/null
@@ -1,287 +0,0 @@
-#!/bin/sh
-
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2005                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-##                                                                            
##
-################################################################################
-#
-# File:
-#   if6-route-addlarge
-#
-# Description:
-#   Verify the IPv6 connectivity is not broken with adding and deleting
-#   an IPv6 route many times
-#    test01 - by route command
-#    test02 - by ip command
-#
-# Setup:
-#   See ltp-yyyymmdd/testcases/network/stress/README
-#
-# Author:
-#   Mitsuru Chinen <mi...@jp.ibm.com>
-#
-# History:
-#      Oct 19 2005 - Created (Mitsuru Chinen)
-#
-#-----------------------------------------------------------------------
-# Uncomment line below for debug output.
-#trace_logic=${trace_logic:-"set -x"}
-$trace_logic
-
-# Make sure the value of LTPROOT
-LTPROOT=${LTPROOT:-`(cd ../../../../ ; pwd)`}
-export LTPROOT
-
-# Total number of the test case
-TST_TOTAL=2
-export TST_TOTAL
-
-# Default of the test case ID and the test case count
-TCID=if6-route-addlarge
-TST_COUNT=0
-export TCID
-export TST_COUNT
-
-# Check the environmanet variable
-. check_envval || exit $TST_TOTAL
-
-# The number of the add/delete IPv6 alias
-ROUTE_TOTAL=${ROUTE_TOTAL:-10000}
-
-# The interval of the check interface activity
-CHECK_INTERVAL=${CHECK_INTERVAL:-`expr $ROUTE_TOTAL \/ 100`}
-
-# The number of the test link where tests run
-LINK_NUM=0
-
-# Network portion of the IPv6 address
-IPV6_NETWORK="fd00:1:1:1"
-
-# Netmask of for the tested network
-IPV6_NETMASK_NUM=64
-
-# Host portion of the IPv6 address
-LHOST_IPV6_HOST=":2"
-RHOST_IPV6_HOST=":1"
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_setup
-#
-# DESCRIPTION:
-#   Make a IPv6 connectivity
-#
-# SET VALUES:
-#   rhost_ipv6addr     - IPv6 Address of the remote host
-#   lhost_ifname       - Interface name of the local host
-#   rhost_ifname        - Interface name of the remote host
-#
-#-----------------------------------------------------------------------
-do_setup()
-{
-    TCID=if6-route-addlarge
-    TST_COUNT=0
-
-    # Initialize the interfaces of the remote host
-    initialize_if rhost ${LINK_NUM}
-
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Set IPv6 address to the interfaces
-    add_ipv6addr rhost ${LINK_NUM} ${IPV6_NETWORK} ${RHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to set an IPv4 address at the remote host"
-       exit $TST_TOTAL
-    fi
-
-    # IPv6 address of the remote host
-    rhost_ipv6addr="${IPV6_NETWORK}:${RHOST_IPV6_HOST}"
-
-    # Get the Interface name of local host
-    lhost_ifname=`get_ifname lhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the remote host"
-       exit $TST_TOTAL
-    fi
-
-    # Get the Interface name of the remote host
-    rhost_ifname=`get_ifname rhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the remote host"
-       exit $TST_TOTAL
-    fi
-}
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_cleanup
-#
-# DESCRIPTION:
-#   Recover the tested interfaces
-#
-#-----------------------------------------------------------------------
-do_cleanup()
-{
-    # Make sure the TCP traffic server/client doesn't run
-    bg_tcp_traffic killall
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-}
-
-#-----------------------------------------------------------------------
-#
-# FUNCTION:
-#   test_body
-#
-# DESCRIPTION:
-#   main code of the test
-#
-# Arguments:
-#   $1: define the test type
-#       1 - route command case
-#       2 - ip command case
-#
-#-----------------------------------------------------------------------
-test_body()
-{
-    test_type=$1
-
-    TCID=if6-route-addlarge0$test_type
-    TST_COUNT=$test_type
-
-    case $test_type in
-       1)
-       test_command="route"
-       ;;
-       2)
-       test_command="ip"
-       ;;
-       *)
-       tst_resm TBROK "unspecified case"
-       return 1
-       ;;
-    esac
-
-    tst_resm TINFO "Verify the IPv6 connectivity is not broken when the 
$test_command command adds $ROUTE_TOTAL IPv6 routes"
-
-    # Initialize the interface of the local host
-    initialize_if lhost ${LINK_NUM}
-
-    # Assign IPv6 address to the interface of the local host
-    add_ipv6addr lhost ${LINK_NUM} ${IPV6_NETWORK} ${LHOST_IPV6_HOST}
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to add IPv6 address at the local host"
-       return 1
-    fi
-    lhost_ipv6addr="${IPV6_NETWORK}:${LHOST_IPV6_HOST}"
-
-    # Check the connctivity
-    ret=`$LTP_RSH $RHOST ${LTPROOT}/testcases/bin/check_icmpv6_connectivity 
$rhost_ifname $lhost_ipv6addr' ; echo $?'`
-    if [ $ret -ne 0 ]; then
-       tst_resm TBROK "Test Link $LINK_NUM is somthing wrong."
-       return 1
-    fi
-
-    # Make a background TCP traffic from the non-alias address
-    server_pid=`bg_tcp_traffic make ${lhost_ipv6addr}`
-
-    # Start the loop
-    cnt=0
-    x=0 ; y=0 ; xymax=255
-    while [ $cnt -lt $ROUTE_TOTAL ]; do
-       # Add the route
-       x_hex=`printf "%x" $x`
-       y_hex=`printf "%x" $y`
-       add_route="fd00:11:${x_hex}:${y_hex}::/64"
-       case $test_type in
-           1)
-           route -A inet6 add $add_route dev $lhost_ifname
-           ;;
-           2)
-           ip route add $add_route dev $lhost_ifname
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TINFO "Failed to add more route. It seems to reach max 
number."
-           break
-       fi
-
-       # Check the connectivity
-       cnt=`expr $cnt + 1`
-       if [ $CHECK_INTERVAL -ne 0 ]; then
-           if [ `expr $cnt % ${CHECK_INTERVAL}` -eq 0 ]; then
-               check_icmpv6_connectivity $lhost_ifname $rhost_ipv6addr
-               if [ $? -ne 0 ]; then
-                   tst_resm TFAIL "The route is broken at ${cnt} time"
-                   return 1
-               fi
-           fi
-       fi
-
-       # Check the background TCP traffic
-       bg_tcp_traffic check $server_pid
-       if [ $? -ne 0 ]; then
-           server_pid=`bg_tcp_traffic make ${lhost_ipv6addr}`
-       fi
-
-       # Define the next network address
-       y=`expr $y + 1`
-       if [ $y -gt $xymax ]; then
-           y=0
-           x=`expr $x + 1`
-           if [ $x -gt $xymax ]; then
-               tst_resm INFO "Too large times. Finished $cnt times."
-               break
-           fi
-       fi
-    done
-
-    # Stop the background TCP traffic
-    bg_tcp_traffic killall
-
-    tst_resm TPASS "Test is finished correctly."
-    return 0
-}
-
-
-#-----------------------------------------------------------------------
-#
-# Main
-#
-# Exit Value:
-#   The number of the failure
-#
-#-----------------------------------------------------------------------
-
-RC=0
-do_setup
-test_body 1 || RC=`expr $RC + 1`       # Case of route command
-test_body 2 || RC=`expr $RC + 1`       # Case of ip command
-do_cleanup
-
-exit $RC
diff --git a/testcases/network/stress/interface/if6-updown 
b/testcases/network/stress/interface/if6-updown
deleted file mode 100644
index 5a09cb8..0000000
--- a/testcases/network/stress/interface/if6-updown
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/bin/sh
-
-################################################################################
-##                                                                            
##
-## Copyright (c) International Business Machines  Corp., 2005                 
##
-##                                                                            
##
-## This program is free software;  you can redistribute it and#or modify      
##
-## it under the terms of the GNU General Public License as published by       
##
-## the Free Software Foundation; either version 2 of the License, or          
##
-## (at your option) any later version.                                        
##
-##                                                                            
##
-## This program is distributed in the hope that it will be useful, but        
##
-## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
##
-## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
##
-## for more details.                                                          
##
-##                                                                            
##
-## You should have received a copy of the GNU General Public License          
##
-## along with this program;  if not, write to the Free Software               
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
USA    ##
-##                                                                            
##
-##                                                                            
##
-################################################################################
-#
-# File:
-#   if6-updown
-#
-# Description:
-# Verify the IPv6 connectivity isn't broken with upping and downing
-# an interface many times
-#    test01 - by ifconfig command
-#    test02 - by ip command
-#
-# Setup:
-#   See ltp-yyyymmdd/testcases/network/stress/README
-#
-# Author:
-#   Mitsuru Chinen <mi...@jp.ibm.com>
-#
-# History:
-#      Oct 19 2005 - Created (Mitsuru Chinen)
-#
-#-----------------------------------------------------------------------
-# Uncomment line below for debug output.
-#trace_logic=${trace_logic:-"set -x"}
-$trace_logic
-
-# Make sure the value of LTPROOT
-LTPROOT=${LTPROOT:-`(cd ../../../../ ; pwd)`}
-export LTPROOT
-
-# Total number of the test case
-TST_TOTAL=2
-export TST_TOTAL
-
-# Default of the test case ID and the test case count
-TCID=if6-updown
-TST_COUNT=0
-export TCID
-export TST_COUNT
-
-# Check the environmanet variable
-. check_envval || exit $TST_TOTAL
-
-# The number of the interface up/down in each test case
-IF_UPDOWN_TIMES=${IF_UPDOWN_TIMES:-10000}
-
-# The interval of the check interface activity
-CHECK_INTERVAL=${CHECK_INTERVAL:-`expr $IF_UPDOWN_TIMES \/ 100`}
-
-# The number of the test link where tests run
-LINK_NUM=0
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_setup
-#
-# DESCRIPTION:
-#   Make a IPv6/IPv6 connectivity
-#
-# SET VALUES:
-#   rhost_ipv6lladdr   - IPv6 Link-local Address of the remote host
-#   lhost_ifname       - Interface name of the localhost
-#
-#-----------------------------------------------------------------------
-do_setup()
-{
-    TCID=if6-updown
-    TST_COUNT=0
-
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-
-    # Get the Interface name of local host
-    lhost_ifname=`get_ifname lhost ${LINK_NUM}`
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Failed to get the interface name at the local host"
-       exit $TST_TOTAL
-    fi
-
-    # Get IPv6 link-local address of the remote host
-    rhost_ifname=`get_ifname rhost ${LINK_NUM}`
-    ipcom_output=`mktemp -p $TMPDIR`
-    $LTP_RSH $RHOST "PATH=/sbin:/usr/sbin:$PATH ip -f inet6 addr show dev 
$rhost_ifname" > $ipcom_output
-    rhost_ipv6lladdr=`fgrep 'scope link' $ipcom_output | awk '{ print $2 }' | 
sed "s/\/.*$//"`
-    rm -f $ipcom_output
-    if [ x$rhost_ipv6lladdr = x ]; then
-       tst_resm TBROK "Link-local address is not found at $rhost_ifname on the 
remote host"
-       exit $TST_TOTAL
-    fi
-}
-
-
-
-#-----------------------------------------------------------------------
-#
-# NAME:
-#   do_cleanup
-#
-# DESCRIPTION:
-#   Recover the tested interfaces
-#
-#-----------------------------------------------------------------------
-do_cleanup()
-{
-    # Initialize the interfaces
-    initialize_if lhost ${LINK_NUM}
-    initialize_if rhost ${LINK_NUM}
-}
-
-#-----------------------------------------------------------------------
-#
-# FUNCTION:
-#   test_body
-#
-# DESCRIPTION:
-#   main code of the test
-#
-# Arguments:
-#   $1: define the test type
-#       1 - ifconfig command case
-#       2 - ip command case
-#
-#-----------------------------------------------------------------------
-test_body()
-{
-    test_type=$1
-
-    TCID=if6-updown0$test_type
-    TST_COUNT=$test_type
-
-    case $test_type in
-       1)
-       test_command="ifconfig"
-       ;;
-       2)
-       test_command="ip"
-       ;;
-       *)
-       tst_resm TBROK "unspecified case"
-       return 1
-       ;;
-    esac
-
-    tst_resm TINFO "Verify the IPv6 connectivity is not broken when the 
$test_command command ups, then downs an interface $IF_UPDOWN_TIMES times"
-
-    # Check the connctivity
-    check_icmpv6_connectivity $lhost_ifname $rhost_ipv6lladdr
-    if [ $? -ne 0 ]; then
-       tst_resm TBROK "Test Link $LINK_NUM is somthing wrong."
-       return 1
-    fi
-
-    # Start the loop
-    cnt=0
-    while [ $cnt -lt $IF_UPDOWN_TIMES ]; do
-       # Down
-       case $test_type in
-           1)
-           ifconfig $lhost_ifname down
-           ;;
-           2)
-           ip link set $lhost_ifname down
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TFAIL "Failed to disable $lhost_ifname"
-           return 1
-       fi
-
-       # Wait 0-2 seconds for imcomplete/complete DAD.
-       sleep `expr $cnt % 3`
-
-       # Up
-       case $test_type in
-           1)
-           ifconfig $lhost_ifname up
-           ;;
-           2)
-           ip link set $lhost_ifname up
-           ;;
-       esac
-       if [ $? -ne 0 ]; then
-           tst_resm TFAIL "Failed to enable $lhost_ifname"
-           return 1
-       fi
-
-       # Check the connectivity every CHECK_INTERVAL time
-       cnt=`expr $cnt + 1`
-       if [ $CHECK_INTERVAL -ne 0 ]; then
-           if [ `expr $cnt % ${CHECK_INTERVAL}` -eq 0 ]; then
-               check_icmpv6_connectivity $lhost_ifname $rhost_ipv6lladdr
-               if [ $? -ne 0 ]; then
-                   tst_resm TFAIL "$lhost_ifname is broken at ${cnt} time"
-                   return 1
-               fi
-           fi
-       fi
-    done
-
-    # Check the connectivity again
-    check_icmpv6_connectivity $lhost_ifname $rhost_ipv6lladdr
-    if [ $? -ne 0 ]; then
-       tst_resm TFAIL "$lhost_ifname is broken."
-       return 1
-    fi
-    tst_resm TPASS "Test is finished successfully."
-
-    return 0
-}
-
-
-#-----------------------------------------------------------------------
-#
-# Main
-#
-# Exit Value:
-#   The number of the failure
-#
-#-----------------------------------------------------------------------
-
-RC=0
-do_setup
-test_body 1 || RC=`expr $RC + 1`       # Case of ifconfig command
-test_body 2 || RC=`expr $RC + 1`       # Case of ip command
-do_cleanup
-
-exit $RC
-- 
1.7.1


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to