public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] network: Fix iproute test case error
@ 2009-09-03  9:22 Hushan Jia
  2009-09-07 11:40 ` Subrata Modak
  0 siblings, 1 reply; 2+ messages in thread
From: Hushan Jia @ 2009-09-03  9:22 UTC (permalink / raw)
  To: ltp-list

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

Signed-off-by: Hushan Jia<hjia@redhat.com>

diff -Nrup ltp-full-20090831-orig/testcases/network/iproute/ip_tests.sh ltp-full-20090831/testcases/network/iproute/ip_tests.sh
--- ltp-full-20090831-orig/testcases/network/iproute/ip_tests.sh	2009-09-03 16:47:56.000000000 +0800
+++ ltp-full-20090831/testcases/network/iproute/ip_tests.sh	2009-09-03 16:51:04.000000000 +0800
@@ -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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH] network: Fix iproute test case error
  2009-09-03  9:22 [LTP] [PATCH] network: Fix iproute test case error Hushan Jia
@ 2009-09-07 11:40 ` Subrata Modak
  0 siblings, 0 replies; 2+ messages in thread
From: Subrata Modak @ 2009-09-07 11:40 UTC (permalink / raw)
  To: Hushan Jia; +Cc: ltp-list

On Thu, 2009-09-03 at 17:22 +0800, Hushan Jia wrote: 
> 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
> 
> Signed-off-by: Hushan Jia<hjia@redhat.com>

Hey, Thanks.

Regards--
Subrata

> diff -Nrup ltp-full-20090831-orig/testcases/network/iproute/ip_tests.sh ltp-full-20090831/testcases/network/iproute/ip_tests.sh
> --- ltp-full-20090831-orig/testcases/network/iproute/ip_tests.sh	2009-09-03 16:47:56.000000000 +0800
> +++ ltp-full-20090831/testcases/network/iproute/ip_tests.sh	2009-09-03 16:51:04.000000000 +0800
> @@ -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
> Ltp-list@lists.sourceforge.net
> 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-07 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03  9:22 [LTP] [PATCH] network: Fix iproute test case error Hushan Jia
2009-09-07 11:40 ` Subrata Modak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox