ip02: set original mtu size back. this test will modify mtu to 300.
ip05: if there is not only one route, using "head" command will get
      wrong result.

Signed-off-by: Vincent Hsu <[email protected]>
---
 testcases/network/iproute/ip_tests.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/testcases/network/iproute/ip_tests.sh 
b/testcases/network/iproute/ip_tests.sh
index ce4cabc..0416300 100755
--- a/testcases/network/iproute/ip_tests.sh
+++ b/testcases/network/iproute/ip_tests.sh
@@ -187,6 +187,8 @@ test01()

        tst_resm TINFO "Test #1: changing mtu size of eth0:1 device."

+       MTUSZ_BAK=`ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://" \
+               | awk '{print $1}'`
        ip link set eth0:1 mtu 300 >$LTPTMP/tst_ip.err 2>&1
        if [ $RC -ne 0 ]
        then
@@ -198,6 +200,8 @@ test01()
                if [ $MTUSZ -eq 300 ]
                then
                        tst_resm TPASS "Test #1: changing mtu size success"
+                       ip link set eth0:1 mtu $MTUSZ_BAK \
+                               >$LTPTMP/tst_ip.err 2>&1
                else
                        tst_resm FAIL NULL \
                                "Test #1: MTU value not set to 300: ifconfig 
returned: $MTUSZ"
@@ -453,7 +457,8 @@ test05()
                10.6.6.6 via 127.0.0.1 dev lo
                EOF

-               ip route show | head -n1 >$LTPTMP/tst_ip.out 2>&1 || RC=$?
+               ip route show | grep "10.6.6.6 via 127.0.0.1 dev lo" \
+                       >$LTPTMP/tst_ip.out 2>&1 || RC=$?
                if [ $RC -ne 0 ]
                then
                        tst_res TFAIL $LTPTMP/tst_ip.err \
--
1.7.9.5


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to