Skip to contentSkip to conversation

network: Fix iproute test case error

PATCH In review Hushan Jia 2 participants 2 messages Sep 3, 2009 – Sep 7, 2009

lore
Share & tools
lore

Hushan Jia

author
#0 lore raw

PATCH 1/1 network: Fix iproute test case error

Hello,

When I run network test case testcases/network/iproute/ip_tests.sh, some errors shown:
ip01 0 TINFO : Test #1: changing mtu size of eth0:1 device.
/mnt/ltp/ltp-full-20090731/testcases/bin/ip_tests.sh: line 198: [: -eq: unary operator expected.

The output of
ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://"
is like:
1500 Metric:1
so should print field 1 instead of field 5.

Thanks& Regards,
Hushan

---

network: Fix iproute test case error

testcases/network/iproute/ip_tests.sh +1 -1
diff -Nrup ltp-full-20090831-orig/testcases/network/iproute/ip_tests.sh ltp-full-20090831/testcases/network/iproute/ip_tests.sh
@@ -194,7 +194,7 @@ test01()
  			"Test #1: ip command failed. Reason: "
  		return $RC
  	else
-		MTUSZ=`ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://" | awk '{print $5}'`
+		MTUSZ=`ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://" | awk '{print $1}'`
  		if [ $MTUSZ -eq 300 ]
  		then
  			tst_resm TPASS "Test #1: changing mtu size success"

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw
Quoted 12 lines · Hushan Jia

Hello,

When I run network test case testcases/network/iproute/ip_tests.sh, some errors shown:
ip01 0 TINFO : Test #1: changing mtu size of eth0:1 device.
/mnt/ltp/ltp-full-20090731/testcases/bin/ip_tests.sh: line 198: [: -eq: unary operator expected.

The output of
ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://"
is like:
1500 Metric:1
so should print field 1 instead of field 5.

Quoted 8 lines

Thanks& Regards,
Hushan

---

network: Fix iproute test case error

Hey, Thanks.

Regards--
Subrata

Quoted 15 lines

diff -Nrup ltp-full-20090831-orig/testcases/network/iproute/ip_tests.sh ltp-full-20090831/testcases/network/iproute/ip_tests.sh

testcases/network/iproute/ip_tests.sh +1 -2
@@ -194,7 +194,7 @@ test01()
  			"Test #1: ip command failed. Reason: "
  		return $RC
  	else
-		MTUSZ=`ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://" | awk '{print $5}'`
+		MTUSZ=`ifconfig eth0:1 | grep -i MTU | sed "s/^.*MTU://" | awk '{print $1}'`
  		if [ $MTUSZ -eq 300 ]
  		then
  			tst_resm TPASS "Test #1: changing mtu size success"
 
 
------------------------------------------------------------------------------
Quoted 8 lines

Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list