ip02: set original mtu size back. this test will set 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 |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/testcases/network/iproute/ip_tests.sh 
b/testcases/network/iproute/ip_tests.sh
index ce4cabc..e16f6c4 100755
--- a/testcases/network/iproute/ip_tests.sh
+++ b/testcases/network/iproute/ip_tests.sh
@@ -187,6 +187,7 @@ 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 +199,7 @@ 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 +455,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


------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to